Commit graph

206 commits

Author SHA1 Message Date
Nicolas Geoffray
cd75414f1e Merge "Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""" 2019-02-13 11:59:39 +00:00
Anton Hansson
2582554c42 Merge "Move dump-products back to the config stage" 2019-02-13 09:12:30 +00:00
Nicolas Geoffray
98f5e86660 Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""
This reverts commit a81dad1bc4.

Test: build && atest android.text.cts.EmojiTest#testEmojiGlyphWebView on Cuttlefish
Change-Id: Ie3c43830fc9a994ed35883abb8ca71d97bd5c44d
2019-02-12 14:00:38 +00:00
Dan Willemsen
5436c7e583 Obsolete add_lunch_combo
Bug: 77599627
Test: source build/envsetup.sh with add_lunch_combo calls in bash & zsh
Change-Id: If12b41d8f9a2f56efdb64ad0dccc25a1e342fdd1
2019-02-11 21:36:25 -08:00
Anton Hansson
dce3f920f2 Move dump-products back to the config stage
It's unnecessary to run all the make file parsing to dump product
configs. Move the dumping to product_config.mk instead, but switch
the output to $(warnings) as stdout is a bit sensitive during
the config stage.

Test: multiproduct_kati -only-config dump-products
Change-Id: I8c7365c9f90ea2bf152b82dfb983bfb0cdcb1697
2019-02-11 21:19:54 +00:00
Colin Cross
05ef66fc0b Merge "Revert "Never strip and store dex files uncompressed when they are preopted on system."" 2019-02-11 19:31:31 +00:00
Colin Cross
a81dad1bc4 Revert "Never strip and store dex files uncompressed when they are preopted on system."
This reverts commit 9cdc3beb3d.

Reason for revert: b/123436620

Change-Id: I45fa9236e37c3b7e2d44ede62a2701db2bc8a20d
2019-02-11 19:30:39 +00:00
Nicolas Geoffray
f07d63390c Merge "Never strip and store dex files uncompressed when they are preopted on system." 2019-02-11 10:31:12 +00:00
Nicolas Geoffray
9cdc3beb3d Never strip and store dex files uncompressed when they are preopted on system.
In order for the runtime module to always be able to compile apps,
make sure we keep a copy of the dex files optimally.

Gated by a product flag if a product doesn't include the module yet.

Test: build
Change-Id: Ia9bba7f6f12f3400078a43d39ba4134cf8818399
2019-02-08 22:45:48 +00:00
Jaewoong Jung
664b72abfe Merge "Make side change for prod override vars support." 2019-02-07 01:50:59 +00:00
Kostya Kortchinsky
027324099f Add option to disable Scudo globally [Make]
This adds an option to turn off Scudo globally, and use it for Go.

Bug: 123228023
Test: verify that Scudo is disabled for a Go build, eg:
lunch marlin_svelte-eng && m -j, check that Scudo is not linked in
out/target/product/marlin/system/bin/mediaextractor
Test: verify that Scudo is enabled otherwise, eg:
lunch marlin-eng && m -j, check that Scudo is linked in
out/target/product/marlin/system/bin/mediaextractor

Change-Id: Idc82d581fade544a474e6f2ff0b54dd191ba0818
Merged-In: Idc82d581fade544a474e6f2ff0b54dd191ba0818
2019-02-04 12:35:04 -08:00
Jaewoong Jung
7dfae5023a Make side change for prod override vars support.
For the new override vars, we don't support make-based overrides because
their primary purpose is to enable Soong migrations for the ones that
use inherit-package.

Bug: 122957760
Test: Manual build tests with Browser2, BrowserGoogle, and Chrome
Change-Id: Ia685511391f61fe143774e12b3b67b526049962a
2019-01-30 14:48:50 -08:00
Logan Chien
0e53d887d6 Add prebuilt ELF binaries checker
This commit introduces a prebuilt ELF binaries checker.  The checker
will check:

1. Whether all DT_NEEDED shared libraries are specified in
   `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES` (Android.mk).

2. Whether all undefined symbols in the prebuilt binary can be resolved
   to defined symbols exported by its dependencies.

This ensures that prebuilt binaries won't silently become ABI
incompatible.

To check the prebuilt binaries, all of the dependencies must be
specified in `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES`
(Android.mk).

If your prebuilt binaries cannot be checked for some reason, you may add
the following property to Android.bp:

    check_elf_files: false,

Or, add the following setting to Android.mk:

    LOCAL_CHECK_ELF_FILES := false

Bug: 119084334
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I523d3083f22fd4053c096d26f61f8375800281c8
2019-01-21 21:35:01 +08:00
Dongwon Kang
167758a153 Move UPDATABLE_BOOT_(MODULES|JARS) to base_system.mk for further extension
Test: build & boot
Bug: 112766913

Change-Id: I5af02d44c4b4163acdc4e3078dcebd84556ee049
2019-01-18 17:06:18 -08:00
Dan Willemsen
674952098b Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
These centralize the decisions on whether to build certain images or
not, and allow the product definition to override that choice.

There are a few use cases here:

 * For GSI-like cases, we only want to build the system image. This
   didn't really change, but it's somewhat simpler to configure, and
   easier to understand the build logic.

 * On the opposite side, when you're planning on using a GSI, the device
   specific build can only build the vendor images (or some other set).

 * Some cases (Fuchsia, etc) don't want to build any images, as they'll
   be distributing the build artifacts in their own packaging.

I suspect in the future, TARGET_BUILD_APPS may be able to be refactored
into the third use case.

Test: treehugger
Test: Create a product definition that includes nothing, try to build it.
Test: compare build-aosp_crosshatch.ninja and build-crosshatch.ninja before/after
Change-Id: I685ab841be3718d3dd7052c28ccd764bb6f1991a
2019-01-18 13:11:34 -08:00
Jeongik Cha
b2c4bb7e3d Dump and enforce certificate for apks
Dump the list of APKs that aren't located at system partition and signed
with system certificate.
And when enforcement option is enabled, it makes build error if there is
the apk that satisfies the condition above.

Bug: 74699609

Test: m -j
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/certificate_violation_modules.txt

Change-Id: I23c41f2665dd97abac3e77d1c82d81ff91b894eb
2019-01-10 11:37:22 +09:00
Jiyong Park
185d41e84d Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
It is a list of <module_name>:<manifest_name> pairs. When the module
name of an APK or an APEX matches with <module_name>, then its app
manifest name is overridden to <manifest_name>.

<module_name> and <manifest_name> can be patterns as in
com.android.%:com.mycompany.android.%.release

Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for
1) an APK in Android.mk
2) an APK in ANdroid.bp
3) an APEX
and check that manifest names are modified as specified

Change-Id: Ic09e059ea7b7ea99a50a1cf423a25aa587ef4466
2019-01-09 21:08:10 +09:00
Yifan Hong
e5d879a193 Allow space in BOARD_*_SIZE variables for dynamic partitions
Allow instances like:
BOARD_SUPER_PARTITION_SIZE := 4294967296 # 4GiB

Test: add trailing space to BOARD_SUPER_PARTITION_SIZE,
BOARD_(group)_SIZE, BOARD_*IMAGE_PARTITION_RESERVED_SIZE,
BOARD_SUPER_PARTITION_(device)_DEVICE_SIZE, build passes.

Fixes: 120042457
Change-Id: Ib7244e3fd2f782657c84cdb74e601ac96176571d
2018-11-28 15:33:17 -08:00
Ivan Lozano
fda9a6f38e Add support for AArch64 XOM binaries.
Adds build system support for generating AArch64 binaries with
execute-only memory layouts via a new LOCAL_XOM property. Also adds
support for an ENABLE_XOM build flag for global builds.

Bug: 77958880
Test: make -j ENABLE_XOM=true
Change-Id: I6af9e3615d0a9fdff802eae50e6ad94311ec8046
2018-11-21 09:05:08 -08:00
Treehugger Robot
b906ebb313 Merge "PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS: allow inheritance" 2018-11-21 00:41:44 +00:00
Yifan Hong
452d9267fc PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS: allow inheritance
Test: with this is true, build
     `verified_assembled_system_matrix.xml`;
      file includes kernel requirements
Change-Id: I833b4fefabefb2f0457171055afe5722981e3589
2018-11-20 11:50:52 -08:00
Yifan Hong
7416b8d143 Remove PRODUCT_USE_LOGICAL_PARTITIONS.
Use PRODUCT_USE_DYNAMIC_PARTITIONS instead.
Test: boots
Fixes: 119286600

Change-Id: I5c0828eac2b6c579edbb494b150bc586b3b576f1
2018-11-20 00:34:30 +00:00
David Anderson
619fe2da5a Add build flags for spanning the super partition across multiple block devices.
This adds BOARD_SUPER_PARTITION_BLOCK_DEVICES, which must contain a list
of the (non-A/B suffixed) partitions that will comprise the super
partition. It is only intended for devices which cannot have a partition
named "super". For each entry, there must be a
BOARD_SUPER_PARTITION_x_DEVICE_SIZE variable defined with the exact size
of that partition (not its image size). The sum of these sizes must be
equal to BOARD_SUPER_PARTITION_SIZE.

Bug: 116802789
Test: device with BOARD_SUPER_PARTITION_BLOCK_DEVICES builds
Change-Id: I1a79c2e08ca99ce7e42207893ef3285caffecf44
2018-11-12 16:12:51 -08:00
Yifan Hong
c5c0124e7d logical partitions -> dynamic partitions
Reflect a name change.

* PRODUCT_USE_LOGICAL_PARTITIONS is deprecated and
will be removed in the future.

* ro.boot.dynamic_partitions is created. ro.boot.logical_partitions
will be removed once all the usage is removed.

Bug: 119286600
Test: builds

Change-Id: I5cb8bb1f5ebcee893fbef3a0f047c32de8773830
2018-11-09 16:02:59 -08:00
Anton Hansson
4fa4ba11ef Merge "Allow a hint together with artifact path enforcement" 2018-10-17 07:22:55 +00:00
Yifan Hong
422790ca3d Remove PRODUCT_USE_FASTBOOTD flag.
It is not used.
Test: builds

Change-Id: Iff5fbae524945cebd9c8911762e7fc7fb8ac19aa
2018-10-16 13:34:18 -07:00
Anton Hansson
83ba31cd95 Allow a hint together with artifact path enforcement
This enables specifying a product-specific error message, to
accompany the otherwise potentially cryptic message.

Bug: 117637311
Bug: 80410283
Test: downstream product
Test: lunch mainline_arm64; m nothing
Change-Id: I9953d44d6338e5a79c5ed651716d3e39647ec87a
2018-10-16 07:41:02 +01:00
Yifan Hong
b43012f0ad Support "updatable groups".
* BOARD_SUPER_PARTITION_GROUPS defines a list of "updatable groups". Each
updatable group is a group of partitions that share the same pool of free
spaces.

* For each group in BOARD_SUPER_PARTITION_GROUPS, a BOARD_{GROUP}_SIZE and
BOARD_{GROUP}_PARTITION_PARTITION_LIST may be defined.
    - BOARD_{GROUP}_SIZE: The maximum sum of sizes of all
      partitions in the group.
      If empty, no limit is enforced on the sum of sizes for this group.
    - BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that
      belongs to this group.
      If empty, no partitions belong to this group, and the sum of sizes is
      effectively 0.

* BOARD_SUPER_PARTITION_PARTITION_LIST should not be defined
by the device. It is now computed from all
BOARD_{GROUP}_PARTITION_PARTITION_LIST.

* Each 'updatable group' has its own pool of space for its
partitions to grow into. Enforce the following:
    * sum(all partitions) <= super partition (/ 2 for A/B)
    * For each group, sum(partitions in group) <= group size
    * sum(all group sizes) <= super partition (/ 2 for A/B)

Test: builds
Bug: 111610495
Change-Id: I072b011714ec31a1d8813cc75edd27da3c6ff39a
Merged-In: I072b011714ec31a1d8813cc75edd27da3c6ff39a
2018-10-04 13:08:56 -07:00
Dario Freni
f31bc450d2 Add a way to override LOCAL_PRODUCT_MODULE.
This CL introduces the product variable
PRODUCT_FORCE_PRODUCT_MODULES_TO_SYSTEM_PARTITION, which can contain a
list of module names to be "unmarked" from being LOCAL_PRODUCT_MODULE.

If a module name is included in this variable and if that module is
declared as LOCAL_PRODUCT_MODULE, the setting will be overriden and the
module will be installed in /system. This is useful to control this
behavior on a device-specific level.

Test: m; and checked resulting output.
Bug: 110072687
Change-Id: Iaab663a7ed757c1dd4f16169b0ac3d71650014d2
2018-08-16 18:39:12 +01:00
Bowgo Tsai
d624fa63d5 Add support for /odm partition
This CL is largely an adaptation of Change-Id
I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d

tools/vendor_buildinfo.sh is also renamed to tools/device_buildinfo.sh.
The caller then can invoke device_buildinfo.sh "vendor" | "odm" to
generate properties for vendor.img and odm.img, respectively.

It adds the following variables:

- BOARD_AVB_ODM_KEY_PATH
- BOARD_AVB_ODM_ALGORITHM
- BOARD_AVB_ODM_ROLLBACK_INDEX_LOCATION
- BOARD_ODMIMAGE_FILE_SYSTEM_TYPE
- BOARD_ODMIMAGE_EXTFS_INODE_COUNT
- BOARD_ODMIMAGE_EXTFS_RSV_PCT
- BOARD_ODMIMAGE_PARTITION_SIZE
- BOARD_ODMIMAGE_JOURNAL_SIZE
- BOARD_ODMIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_ODMIMAGE_SQUASHFS_COMPRESSOR
- BOARD_ODMIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_ODMIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_ODMIMAGE
- BOARD_USES_ODMIMAGE
- LOCAL_ODM_MODULE
- PRODUCT_ODM_BASE_FS_PATH
- PRODUCT_ODM_VERITY_PARTITION
- PRODUCT_ODM_PROPERTIES
- TARGET_COPY_OUT_ODM
- TARGET_OUT_ODM
- TARGET_OUT_ODM_*

Bug: 64195575
Test: boot a Taimen with existing images

Test: `make odmimage` with
      - BOARD_AVB_ENABLE := true
      - BOARD_ODMIMAGE_PARTITION_SIZE := 62914560
      - BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
      - TARGET_COPY_OUT_ODM := odm
      - PRODUCT_ODM_PROPERTIES += odm.test.build=success

Test: `make odmimage` with
      - BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE := 10485760
      - BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
      - BOARD_AVB_ENABLE := true
      - TARGET_COPY_OUT_ODM := odm
      - PRODUCT_ODM_PROPERTIES += odm.test.build=success
      - PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true

Change-Id: I4dea7b567ec49a766c7a4683decaf81c7e921d55
2018-08-08 18:59:44 +08:00
Yifan Hong
2dae5721d4 Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags.
Split the flag into PRODUCT_USE_DYNAMIC_PARTITION_SIZE
and PRODUCT_BUILD_SUPER_PARTITION. More sub-flags can be
added with the same way.

Also change some checks with USE_LOGICAL_PARTITIONS with
the appropriate sub-flags.

This allows easier device bring-up to fulfill the requirements
separately.

This also enables dynamic partition size without logical patition.
Originally, to enable BOARD_*_PARTITION_RESERVED_SIZE must also
enable PRODUCT_USE_LOGICAL_PARTITIONS. The patch fix the rule to
let dynamic partition size is able to be used independently.

Fixes: 111966003

Test: make superimage with PRODUCT_USE_LOGICAL_PARTITIONS
Change-Id: I45b29c87bf94356d8416bbd58a14c8982039c222
2018-08-01 00:39:13 +00:00
Yifan Hong
9c35a022e1 build_image.py recognize BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I00c1a96c09cf7bd9274b65ac0afc47462686171d
2018-07-20 16:51:26 -07:00
Yifan Hong
56a6c3bb34 build_image.py recognize BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I26aba694fd3d6a2feed7601524dde52569ba41e2
2018-07-20 16:51:26 -07:00
Dario Freni
5f681e1dd7 Add support for /product-services partition
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432

It adds the following variables:

- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
2018-07-19 11:15:11 +01:00
Anton Hansson
1ebcbd51ee Make including missing modules an error.
Only enable it for the core build files rolling up to generic.mk
for now, and whitelist a couple of modules that are conditionally
defined.

Bug: 7456955
Bug: 80410283
Test: lunch generic; m
Test: lunch full; m
Change-Id: I5448769433d09eaf970c4231874ced3261a5c66b
2018-07-09 11:00:24 +01:00
Yifan Hong
74d07ff8bd Add BOARD_SUPER_PARTITION_*
Test: builds
Test: build with BOARD_SUPER_PARTITION_SIZE and
      BOARD_SUPER_PARTITION_PARTITION_LIST defined

Bug: 79106666

Change-Id: Ifcd50ecab22ef096ff1eb386f8d87e16fffdcf5e
2018-06-22 10:25:54 -07:00
Yifan Hong
749062d379 build_image.py recognize BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
Test: `make vendorimage`

Test: `make vendorimage` with the following:
    - install a large file to vendor image
    fails as expected (because _PARTITION_SIZE is exceeded)

Test: `make vendorimage` with the following:
    - set PRODUCT_USE_LOGICAL_PARTITIONS to true
    - set BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
    fails as expected (BOARD_VENDORIMAGE_PARTITION_SIZE needs
    to be undefined)

Test: `make vendorimage` with the following:
    - install a large file to vendor image
    - set PRODUCT_USE_LOGICAL_PARTIIONS to true
    - add a small BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
    - remove BOARD_VENDORIMAGE_PARTITION_SIZE
    build succeeds.

Bug: 79106666

Change-Id: Ica8fdce64e8f37d91e66e3d49c0c74fadd15a832
2018-06-22 10:25:54 -07:00
Yifan Hong
bbcba1e353 build_image.py recognize BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
- Copy "use_logical_partitions" to *_image_info.txt before sending
  it to build_image.py, so that the script can use this variable.

- build_image.py emits an additional properties file to inform
  the build system about the system image size.

Test: `make systemimage`

Test: `make systemimage` with the following:
    - install a large file to system image
    fails as expected (because _PARTITION_SIZE is exceeded)

Test: `make systemimage` with the following:
    - set PRODUCT_USE_LOGICAL_PARTITIONS to true
    - set BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
    fails as expected (BOARD_SYSTEMIMAGE_PARTITION_SIZE needs
    to be undefined)

Test: `make systemimage` with the following:
    - install a large file to system image
    - set PRODUCT_USE_LOGICAL_PARTIIONS to true
    - add a small BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
    - remove BOARD_SYSTEMIMAGE_PARTITION_SIZE
    build succeeds.

Test: same for systemotherimage

Bug: 79106666

Change-Id: I574062882acd1ecd633ac38c5a8c5351b90a32d8
2018-06-22 10:25:54 -07:00
Anton Hansson
427d855728 Add support enforcing all path requirements.
Setting PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS to be non-empty will
verify that when an inherited product file makes an path requirement
claim, no files other than the ones it produces are allowed inside its
paths. This allows more rigorous control of what goes where, and
specifically stops accidental inclusion of modules in the wrong places
(which is very easy to do otherwise).

In order to enable iterative improvements to current offenders, support
for a whitelist is also added (via the new
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST property). Verification is
done that this variable corresponds to exactly the list of current
offenders.

Example use:
  PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
  PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := system/priv-app/Dialer/Dialer.apk

Bug: 80410283
Test: In a downstream CL specifying the above.
Change-Id: I58047db08bde34da21759cfc55f398892b1c809a
2018-06-14 11:35:05 +01:00
Anton Hansson
837425b0c0 Add a new macro for products to make artifact path requirements.
When a product adds a path requirement, the build system will verify
that all its artifacts are produced inside these paths, and fail
otherwise.

The paths are all relative to PRODUCT_OUT, and the macro also supports
giving a whitelist, for known existing offenders in the hierarchy. The
build will fail if redundant whitelist entries are present.

Example invocation:
_paths := $(TARGET_COPY_OUT_SYSTEM)/
_whitelist := root/init root/init.rc
$(call require-artifacts-in-path $(_paths), $(_whitelist))

Bug: 80410283
Test: Downstream with a new product definition.
Change-Id: I235de681f65254087a42e345af69b2113b682072
2018-06-13 18:48:53 +01:00
Anton Hansson
061cbcfdae Rename the poorly named ALL_PRODUCTS variable.
There was PRODUCTS, ALL_PRODUCTS and really_all_products, and
ALL_PRODUCTS was in fact not all products. Rename it to what
it really is: parent makefiles, i.e. product makefiles that include
other product makefiles.

Also rename the really_all_products var.

Bug: 80410283
Test: lunch aosp_arm64; m product-graph
Change-Id: I87aec49966e50c364ca2baf5de10fe30f9292a53
2018-05-31 11:03:53 +01:00
Yifan Hong
ef4cd71ebf Add PRODUCT_USE_LOGICAL_PARTITIONS
Test: Set a device with PRODUCT_USE_LOGICAL_PARTITIONS,
      boot, examine /proc/cmdline
Test: build with USE_LOGICAL_PARTITIONS=true

Fixes: 79885414

Change-Id: I593b457786f3cf1bc50dedbc9b603e5408461bcc
2018-05-23 15:10:17 -07:00
Dan Willemsen
b9d63519c0 Use AndroidProducts.mk list from Soong's finder
This saves ~300ms from get_build_var on our internal tree (1.3s ->
1.0s). On AOSP, it only saves ~60ms (0.60s -> 0.54s).

It's also ran during lunch, and twice during every build (though the
second time it was run with Kati's find emulator, which significantly
reduces the overhead).

Bug: 78020936
Test: diff out/.module_paths/AndroidProducts.mk.list with existing find
      results
Change-Id: I195b2840854122e41275e24e886ca8c8cda13dac
2018-05-01 22:56:07 -07:00
Ivan Podogov
d572632f3d Add vendor properties blacklist
This change allows removing some vendor properties from
(vendor|system/vendor)/build.prop file based on a blacklist.

For WearOS Unified Builds, which can change the product name depending on
the chosen locale, we use runtime-generated value for ro.build.fingerprint,
but since the ro.vendor.build.fingerprint cannot be generated the same way,
we always hit a "Mismatched fingerprints" error.

Bug: 71555551
Test: manual
Change-Id: Ifad793187e930a28fbf9325b03468c7ea86076b7
2018-04-11 23:33:07 +01:00
Dan Willemsen
af2e1f8487 Start moving add_lunch_combo to Make
Start deprecating add_lunch_combo, preferring a list of common choices
in each AndroidProducts.mk file.

This list will be validated so that we don't have typos:

https://android-review.git.corp.google.com/c/device/generic/car/+/619533

Or targets that no longer exist.

Bug: 77599627
Test: lunch
Test: lunch 34
Test: lunch aosp_x86_64-eng
Test: lunch aosp_<tab>
Change-Id: Ie0ddaa94cbd6cee26584f56f1706a8ec1333f87e
2018-04-04 17:14:47 -07:00
Zach Riggle
9323b7faf3 Add PRODUCT_PACKAGES_DEBUG_ASAN
This is a list of modules which should be installed by default, but only on
builds which are set up for Address Sanitizer (via SANITIZE_TARGET=address).

Additionally, add sanitizer-status to PRODUCT_PACKAGES_DEBUG so that all
userdebug builds will have the binary.  Currently, the module has the
"debug" tag but it may go away in the future.

Change-Id: I0bea4faf9c2a65380292471437e51ef8324b5af3
2018-03-30 21:09:50 +00:00
Andreas Gampe
c3e151954f Build: Amend minidebug odex setup
Add PRODUCT_OTHER_JAVA_DEBUG_INFO similar to PRODUCT_SYSTEM_SERVER_DEBUG_INFO.
Use WITH_DEXPREOPT_DEBUG_INFO as global default, and allow the product
to opt out by setting the above to "false."

Bug: 75259124
Test: m
Change-Id: Id4a2e5d00a1b73a7e7a0a65146042c0aa0c1b411
2018-03-23 10:40:10 -07:00
Mathieu Chartier
2594230d83 For user and userdebug generate error if DEXPREOPT is not enabled
This prevents cases where system_server is running in interpreter
only mode.

Removed unused flag in product.mk

(cherry-picked from commit 27f4287406)

Bug: 74209329
Test: WITH_DEXPREOPT=false make
Merged-In: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
Change-Id: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
2018-03-07 22:21:43 +00:00
Mathieu Chartier
5c658ac3a9 Add property for generating dm files
Added product property: PRODUCT_DEX_PREOPT_GENERATE_DM_FILES.
If this property is true, APKs compiled as verify will have the dex
files left compressed and the vdex put in a dm file. The vdex file
and oat files are not copied to system partition in this case.

Bug: 70934104
Test: manual

Change-Id: Ie137e14f14642b803a506162de6db8ac65a43f46
2018-02-21 13:50:21 -08:00
Mathieu Chartier
e8fb7cf87b Add a product property for changing the default compiler filter
Add product property for changing default compiler filter:
PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER

Bug: 70934104
Test: Specify PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER in a device.mk

Change-Id: I264631fc3813ef44d43b802b4cd9a8e92098183e
2018-02-15 17:44:37 -08:00