Commit Graph

269 Commits

Author SHA1 Message Date
Martin Stjernholm efe6a4d748 Add a product variable to override APEX modules in boot jar lists.
Test: m droid SOONG_CONFIG_art_module_source_build=false
      on internal branch
Bug: 180325915
Change-Id: I3ab64860fe4a60468ec8dad6517d1d67f72f13c7
2021-03-02 20:53:59 +00:00
Joe Onorato 38a57bf1df Generate FlatConfig objects from GenericConfig objects.
Doesn't include tests. More of those will come later.

Test: build/make/tools/product_config/test.sh
Change-Id: Icd2b455ac5f7b4773ba332fc40e994dc6f024f1b
2021-02-22 17:18:07 -08:00
Treehugger Robot 3f631cf2ab Merge "Deprecate PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS" 2021-02-20 01:47:43 +00:00
Jeongik Cha c5da20e886 Deprecate PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS
There is no module relying on PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS

Test: m
Bug: 150820813
Change-Id: I461ab2654513a3b921bec5d46c39d474b6324ca2
2021-02-19 21:49:59 +09:00
Joe Onorato f20c93afa3 Emit and parse the product config variables from kati/make
Test: cls && rm -rf out/config/ && m product-config-test product-config && java -jar out/host/linux-x86/testcases/product-config-test/product-config-test.jar && time ( product-config --ckati_bin /source/kati/ckati > ~/Desktop/out.txt )
Change-Id: I52e5c07f9aaf899f9d45680313275c6d9e246ff2
2021-02-17 10:02:41 -08:00
Sasha Smundak 94da140c70 Mark PRODUCT_SUPPORTS_xxx variables as single item instead of list
Evidenced by assignments across code base.

Test: treehugger
Bug: 116769560
Change-Id: I900217fc5745d3c29f844b968f9abc338b3a56ff
2021-02-10 22:36:25 -08:00
Kelvin Zhang 239a79ae19 Emit virtual_ab_compression prop to dynamic_parttiion_info.txt
Test: mm -j && mm -j dist, make sure virtual_ab_compression is set to
true in dynamic_partition_info.txt of target_File.zip

Change-Id: Id0d46bd8ed738b2b69a0c01481b7db0c7127f773
2021-01-19 16:11:32 -05:00
Treehugger Robot dec924e081 Merge "Revert^2 "Always turn on compatible property"" 2020-12-15 12:00:10 +00:00
JaeMan Park d06fe704b3 Merge "Add java_sdk_library enforcement flags to product.mk" 2020-12-15 00:00:05 +00:00
Anton Hansson d1258eb2f8 Add a "relaxed" mode for require-artifacts-in-path
This is useful when a makefile will produces different artifacts
depending on other configuration. Having an allow-list that's too strict
can make it a little  difficult to make progress.

Test: m nothing in follow-up
Change-Id: Ic8235912bcbaa8e249a752e042d4f42be4466e34
(cherry picked from commit 0b6fde311ac6bc2b64e69858382117a362645502)
2020-12-09 16:30:43 +00:00
JaeMan Park 33d9aad0ba Add java_sdk_library enforcement flags to product.mk
Add flags that is used for java_sdk_library enforcement
to product.mk.

PRODUCT_ENFORCE_INTER_PARTITION_JAVA_SDK_LIBRARY is flag
for enabling java_sdk_library enforcement.

PRODUCT_INTER_PARTITION_JAVA_LIBRARY_ALLOWLIST is allowlist
for java_sdk_library enforcement, and it is consists of name
of dependency modules.

Test: m nothing
Bug: 168180538
Change-Id: I8743d9475be53b16f2c9e43d731c576bc56ddfbc
2020-12-09 14:02:38 +09:00
Mohammad Samiul Islam c87781a020 Add a product flag that will enable compressed APEX on device
The product flag is only defined in this CL. No device has been
configured to use this flag yet.

The flag is overridable using environment variable. This way, developers
can enable APEX compression on various targets.

Bug: 137802149
Test: build/soong/soong_ui.bash --dumpvar-mode PRODUCT_COMPRESSED_APEX #false
Test: export OVERRIDE_PRODUCT_COMPRESSED_APEX \
  build/soong/soong_ui.bash --dumpvar-mode PRODUCT_COMPRESSED_APEX #true
Change-Id: I10e4909258cee9b4670bc3f10ff3a0ad5013c864
2020-12-03 14:58:47 +00:00
Inseob Kim 2e88158571 Revert^2 "Always turn on compatible property"
This reverts commit facfb54ee4.

Reason for revert: Fixed broken targets

Change-Id: Ia713b08cf15fd356494984964a1e61eaa9991266
2020-11-19 09:48:49 +00:00
Inseob Kim facfb54ee4 Revert "Always turn on compatible property"
This reverts commit 9994e96c7d.

Reason for revert: broken targets on the internal branch

Change-Id: Ic440fb1ca6ae5774a1d51e8fe1f3724426511841
2020-11-18 11:04:17 +00:00
Inseob Kim 9994e96c7d Always turn on compatible property
It's mandatory for devices launching with Android P or later.
Some makefiles still depend on PRODUCT_COMPATIBLE_PROPERTY, so rather
than aggressively removing all codes, this forces
PRODUCT_COMPATIBLE_PROPERTY to be true.

Bug: 170082975
Test: m
Change-Id: I49dab8d573c21781e6295a8581a5ad2944e165d7
2020-11-17 10:00:40 +00:00
Sasha Smundak 0301d64545 Mark PRODUCT_xxx variables as single item instead of list
Evidenced by soong_config.mk settings and assignements across code base.

Test: treehugger
Bug: 116769560
Change-Id: I7dc27049a32df7b39680d93bddb23e6e6f1e84ca
2020-11-12 10:19:02 -08:00
Daniel Norman 42879ff536 Various fixes to PRODUCT_BUILD_<IMAGE> variables.
- Introduces PRODUCT_BUILD_VENDOR_BOOT_IMAGE.
  - Controls vendor_boot.img, replacing TARGET_NO_VENDOR_BOOT.
  - Matches the naming convention of other similar vars.
- Guards boot-debug.img behind BUILDING_BOOT_IMAGE
- Restructures BUILDING_BOOT_IMAGE to give priority to
  PRODUCT_BUILD_BOOT_IMAGE, as do other partitions.
- ^ for BUILDING_RECOVERY_IMAGE.

Test: PRODUCT_BUILD_{BOOT,RECOVERY,VENDOR_BOOT}_IMAGE := false
      m dist
      Observe no boot, boot-debug, recovery, or vendor_boot images.
Bug: 169968221
Bug: 170423509
Change-Id: I629bf08ba08e5db14c1bf92bb338fb3ce59d5b73
2020-10-08 22:31:52 +00:00
GeQi 6e44e3d1e4 fix a typo for single PRODUCT_PRODUCT_VNDK_VERSION
Bug: 144534640
Test: build

Signed-off-by: GeQi <geqi@xiaomi.com>
Change-Id: I5bf47abd70e84e89930846c25b2592dac1100082
2020-09-04 14:08:57 +08:00
Yifan Hong f496f1b94f Add odm_dlkm partition.
Test: define odm_dlkm in CF.
Bug: 156020364
Change-Id: I5593d09a1cdf13e651a13e951336555a7475865e
2020-07-16 12:34:29 -07:00
Yifan Hong cfb917a1c7 Add vendor_dlkm partition.
Test: define vendor_dlkm for CF.
Bug: 156020364

Change-Id: I459059e1c20df7a285a377b8b3bbc8decc60b124
2020-07-13 14:20:56 -07:00
Colin Cross d1cbfeaa3a Use inclusive language in build/make part 2
Test: m checkbuild
Bug: 158889297
Change-Id: I63bac680cc63a8564f35ae85dda1a0b09c9fd541
2020-06-24 12:03:08 -07:00
Jiyong Park cd0c931b89 Merge "Organize product vars for adding properties" 2020-06-15 10:00:22 +00:00
Colin Cross c3ad80467e Use inclusive language in build/make
Test: m checkbuild
Change-Id: I54a7e55d3fdd5571ef1ae33ebe443c10d138fd28
2020-06-11 14:37:54 -07:00
Jiyong Park eb49b34b1e Organize product vars for adding properties
Properties for <partition>/build.prop are now added via
PRODUCT_<PARTITION>_PROPERTIES.

PRODUCT_SYSTEM_PROPERTIES is added. PRODUCT_SYSTEM_DEFAULT_PROPERTIES
will be deprecated.

PRODUCT_VENDOR_PROPERTIES is added. PRODUCT_PROPERTY_OVERRIDES and
PRODUCT_DEFAULT_PROPERTY_OVERRIDES will be deprecated in favor of the new
variable.

For other partitions (odm, system_ext, product), there is no change.

Exempt-From-Owner-Approval: cherry-pick from internal master

Bug: 117892318
Test: m
Merged-In: I98f3b5d0da661b3ad75260a23754e655103b7a44
(cherry picked from commit ad810b6dae)
Change-Id: I98f3b5d0da661b3ad75260a23754e655103b7a44
2020-06-11 15:35:23 +09:00
Ulya Trafimovich 40e55c20eb Add product variable PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS.
If true, incorrect order of system server jars does not cause a build
error. The order is non-optimal if some jar X precedes its dependency Y.
In that case dexpreopt will be unable to resolve any rerefences from X
to Y.

Test: lunch cf_x86_phone-userdebug && m nothing
Test: lunch aosp_car_arm && m nothing

Bug: 140451054

Change-Id: I70efd365fa9fbd9e40792d646f8471d009164924
Merged-In: I70efd365fa9fbd9e40792d646f8471d009164924
(cherry picked from commit 17715b48f0)
2020-06-03 17:38:26 +01:00
Yo Chiang 1db657a1ed Check module existence with ALL_MODULES subvars
Use ALL_MODULES.*.PATH to check module existence.
Use get-modules-for-2nd-arch to check the existence of second arch
variant.
Fix some typos *existant -> existent

Bug: 155869107
Test: lunch mainline_system_arm64; m
Test: lunch generic; m
Change-Id: Ic10fb34a11da0bfbfc528da7496fd929b1d77113
2020-05-20 16:02:07 +00:00
Yifan Hong 65afc07f9d Support forcefully generating non-AB packages.
Force generate a non-A/B update package when requested.

Bug: 154344887
Test: ota_from_target_files.py --force_non_ab ...
Test: apply it as well

Change-Id: I5e81eb161722e07ef50081b6a16685cbc9963ae2
(cherry picked from commit 7169f754cc)
Merged-In: I5e81eb161722e07ef50081b6a16685cbc9963ae2
2020-05-19 15:23:27 -07:00
Rock.Yeh 2a703ce2f6 Add PRODUCT_SYSTEM_SERVER_JARS_EXTRA interface
This interface allows vendor to append their system server jars after AOSP's
without changing inherit order.

Test: booting
Test: build pass on branch r-fs-release with this patch

Change-Id: I0ddf35bdf725c262f817985f5494b5968db21fcd
2020-04-23 10:29:40 +08:00
Po Hu 012118da8f Add PRODUCT_BOOT_JARS_EXTRA interface
This interface allows vendor to append their boot jars after AOSP's
without changing inherit order.

Test: get_build_var PRODUCT_BOOT_JARS
Change-Id: I6beb8cc9d7fcf0d474b24f634e81657aa42e7ed7
Bug: 152267233
2020-03-26 10:31:39 +00:00
Jeongik Cha d99e77d6d6 Make RRO packages for system_ext
Until now, packages from system_ext don't create RRO packages, instead
it uses static overlay, but to make system_ext common, it should use
RRO.

Bug: 150820813
Test: m && check if there are RRO packages that use from system_ext apps
Change-Id: Id0ddb66adca07a6bb4dda66fbee49fd476ac5342
2020-03-18 00:55:48 +00:00
Ivan Lozano 3cd1ebeaee Remove execute-only support.
With kernel support being removed for execute-only memory layouts,
remove support for XOM until there's kernel support again.

This allows us to gain the code-size improvements from
"-z noseparate-code".

Bug: 147300048
Test: Compiled binaries no longer marked XOM by default.

Change-Id: I08a054e903b202f513d3b3381afd606bb87cf257
2020-02-13 14:20:28 -05:00
Justin Yun f19d840d13 Define PRODUCT_PRODUCT_VNDK_VERSION
PRODUCT_PRODUCT_VNDK_VERSION sets the VNDK version for product
partition. It may have "current" to use the PLATFORM_VNDK_VERSION.
If PRODUCT_PRODUCT_VNDK_VERSION is set, the native modules in product
partition are enforced to use VNDK's only from the system partition
as BOARD_VNDK_VERSION did to vendor partition.

Bug: 144534640
Test: build
Change-Id: I7ea148f0f8b7e44be7810adcacb30702d66831f1
2019-12-21 00:49:09 +00:00
Jooyung Han 9efe534ef1 Add PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
For GSI targets, this variable is set true, and Soong will install both
"flattened" and "unflattened" APEXes together in /system_ext and /system
respectively.

Bug: 137802149
Test: lunch aosp_arm64-userdebug && m
  resulting apex images under /system/apex
  and flattened apexes under /system/system_ext/apex

Change-Id: Ib72d1b9dbd59727942da39323ee7e60ac6e14882
2019-12-12 02:04:43 +09:00
Roshan Pius 626f6371dc base_system.mk: Align formatting for updatable boot jar variable
Migrate PRODUCT_UPDATABLE_BOOT_MODULES &
PRODUCT_UPDATABLE_BOOT_LOCATIONS to a new PRODUCT_UPDATABLE_BOOT_JARS.
This new variable uses the same format as
PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS, i.e <apex>:<jar> pair.

Test: Compiles & flashed device. Ensured that the bootclasspath & system_server class
paths remain the same.

Change-Id: I1cb26d5ec825cd1f5282a6e0255094ddf2fe046a
2019-11-28 12:59:08 +00:00
Roshan Pius d6e239fc35 base_system.mk: Support system_server jars from apexes
Allow system_server jars delivered via apex. Regular system_server
jars are located in /system/framework folder. But, jars delivered via
apex are mounted at /apex/<module_name>/javalib. Also, not all the
libraries in /apex/<module_name>/javalib will be a system_server jar,
so adding a mechanism to list out the jar file explicitly within the
apex module.

Bug: 144722612
Bug: 141785760
Test: Compiles (both with empty & non-empty PRODUCT_SYSTEM_SERVER_APEX_JARS
value set)

Change-Id: Ia181ab22fdf2da575bfd532c1cd90a2f54742528
2019-11-22 12:48:09 -08:00
Jeongik Cha 7452979a9e Enforce hidden apis usage in product(make)
Only if PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is set,
every app and java library in product cannot use hidden APIs anymore.

Bug: 132780927
Test: m
Test: set PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE, and check whether build
error occurs.
Change-Id: Ib6c260a16b9cbb95be70d8db3082a15e151687f1
2019-11-06 19:41:47 +09:00
Anton Hansson cca8cdb993 Ensure current product use PRODUCT_* vars directly
Disallow use of the long-form PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_*
after the short-form has been assigned, to ensure modifications are
made to the right variable.

Macros that need to work with multiple products get a convenience
macro that is redefined at the right moment.

Test: compare_target_files
Test: build_test
Change-Id: Ib0e57b1bc51b1f308296a150b9b7590a0bb5c313
2019-10-30 14:29:42 +00:00
Paul Trautrim 23b46e54ac Merge "Add PRODUCT_BUILD_VBMETA_IMAGE to control vbmeta generation" 2019-08-20 00:07:35 +00:00
Treehugger Robot a7832d5543 Merge "Add a product build var for mainline module certs" 2019-08-15 07:43:46 +00:00
Paul Trautrim 4e14323a31 Add PRODUCT_BUILD_VBMETA_IMAGE to control vbmeta generation
In line with the existing PRODUCT_BUILD_*_IMAGE variables, add a flag to
control whether vbmeta is generated.

Bug: 139328573
Test: manual
Change-Id: Id71026f9b0de9019e82e8ef594e718a4b0f3628f
2019-08-13 16:43:39 +09:00
Yifan Hong 7d37b40c6e Add virtual A/B product.
- Add PRODUCT_VIRTUAL_AB_OTA(_RETROFIT)
- Set ro.virtual_ab.{enabled,retrofit} respectively.

A device will do the following to enable virtual a/b or retrofit:

$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota_retrofit.mk)

Bug: 135752105
Test: build with device with flag set
Change-Id: I6cb1207aef3ddcc40e215e20589abf995ec81aac
2019-08-07 18:31:33 -07:00
Remi NGUYEN VAN 87d0f2703f Add a product build var for mainline module certs
OEMs may need to have different device configurations that use different
signing configurations for mainline modules. The network stack mainline
module has a sepolicy context referencing its certificate, so the
generated plat_mac_permission.xml differs based on the module signing
configuration.

The added PRODUCT_MAINLINE_SEPOLICY_DEV_CERTIFICATES variable defines a
per-product directory for the certificates, so that which certificate to
use can be configured in the product makefile, instead of replacing the
certificate file itself.

This change is to be submitted together with another change in sepolicy
makefile.

Test: changed certificate path, m, verified plat_mac_permissions.xml has
      new certificate.
Bug: 134995443
Bug: 138097611

Change-Id: I863a9904d4a2ea2abad679ae0969d50e374f269d
2019-08-07 18:54:04 +09:00
Elliott Hughes 0548439172 Remove PRODUCT_IOT.
Test: treehugger
Change-Id: Ic214ebda6c65e7e51e39151b10f4ce965b35c121
2019-07-30 09:01:15 -07:00
Justin Yun 6151e3f1ea Rename product_services to system_ext
Bug: 134359158
Test: build and check if system_ext.img is created
Change-Id: I67f2e95dd29eac6a28e07e24ea973d3a134c3bfc
2019-07-09 08:57:19 +00:00
Kavi Gupta 7185f8cc2d Modify build to put dumpcoverage agent into /system/lib
This location allows the agent to be attached to arbitrary processes.

It only makes sense to include libdumpcoverage.so on coverage builds,
as these are the only builds that have any information to be dumped.

Test: manual, used examples in README (see other CL) to test whether
it works on a userdebug_coverage build on cuttlefish

Change-Id: Ib2fece1b41a3b5d16c8a2a444c5486137e475fda
2019-06-27 09:28:39 -07:00
Anton Hansson 528fdc021f Fix non-existing modules check
This variable was accidentally changed to refer to the
shorthand PRODUCT_XYZ instead of PRODUCTS.<mk>.PRODUCT_XYZ
in a previous mass-migration, but that shorthand didn't
exist for these variables. Add it in.

Also whitelist the offender introduced since it was broken.

Test: lunch generic; m nothing
Change-Id: I29dd73c29796743e770afa0c2ceb4f8583dc6e1e
2019-06-25 21:52:58 +01:00
Anton Hansson 879b007555 Make PRODUCT_CHARACTERISTICS a single-valued variable
Values should be comma-separated, and things won't go down well
if there are multiple words in this variable.

Bug: 123783710
Test: Put this in product_config.mk and ran multiproduct_kati:
      ifneq (1,$(words $(PRODUCT_CHARACTERISTICS)))
        $(error oops)
      endif
Change-Id: I5627f416093d68d8d19916a914739686b74d392f
2019-05-13 18:15:32 +01:00
Treehugger Robot 765e433d24 Merge "Add PRODUCT_EXTRA_VNDK_VERSIONS product variables" 2019-05-09 08:25:23 +00:00
Isaac Chen e9723507a1 Add PRODUCT_EXTRA_VNDK_VERSIONS product variables
PRODUCT_EXTRA_VNDK_VERSIONS should be in _product_list_vars
because it's used as a list with probably more than one version
included/set in differemt makefiles.

Bug: 132046980
Test: $ lunch aosp_x86_ab-userdebug
      $ m -j
      $ find $OUT/system/ -name vndk-* # vndk-27 directory is included

Change-Id: Iee9b7b678a23eed781cc761d820db9ff67ae5d34
2019-05-08 15:46:00 +08:00
Chris Gross a784ef197c Add BUILD_RECOVERY_IMAGE and BUILD_BOOT_IMAGE flags
Bug: 123428770
Test: Built system-only image and checked that no boot.img or
recovery.img files where created. Booted the resulting merged build on
device.

Change-Id: I760476502775e68125907c39e66b8665e789a798
2019-05-07 11:00:37 -07:00