Commit Graph

37538 Commits

Author SHA1 Message Date
Treehugger Robot
d9fc22aeda Merge "Pass PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD to Soong" into main 2024-07-19 03:21:23 +00:00
Kiyoung Kim
c7fea48094 Pass PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD to Soong
Pass PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD to Soong so it can decide if
ART debug APEX should be used instead of ART APEX

Bug: 351698657
Test: AOSP CF eng build succeeded
Change-Id: I1e0683be5cd66f1a18e7aec5b1d96ac6e5f4588a
2024-07-19 10:14:05 +09:00
Michael Wright
41b64550d8 Pass the target product to release-config
If you don't, release-config will read the TARGET_PRODUCT environment
variable to determine the product. This works in most cases, but it's
possible (e.g. via buildspec.mk) to change the target product within
make without modifying the environment variable. In these cases,
release-config will produce the config for one product but then the
build will read the config for a completely different product, leading
to build errors.

Instead, just pass the target product to release-config explicitly so it
generates the config for the product that the build is expecting.

Bug: 353351911
Test: TARGET_SKIP_OTA_PACKAGE="true" build/soong/soong_ui.bash \
    --make-mode TARGET_PRODUCT=apps TARGET_RELEASE=next \
    TARGET_BUILD_VARIANT=user droid dist \
    ANDROID_BUILDSPEC=vendor/google_clockwork/build/app_build_spec.mk \
    ALLOW_MISSING_DEPENDENCIES=true \
    UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true \
    RELAX_USES_LIBRARY_CHECK=true
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:310d7718439d074fe38b25b97eb609f6db66c3d6)
Merged-In: I63e80249ac702b5517f4a3cfd54c8a4dbd416794
Change-Id: I63e80249ac702b5517f4a3cfd54c8a4dbd416794
2024-07-18 20:36:10 +00:00
Sorin Basca
ba29ac54f4 Use JDK 21 instead of 17
Bug: 342332820
Test: TH
Change-Id: Id040a389243220eb4c5b47631bfdd9f27bc00923
2024-07-18 12:05:19 +01:00
Treehugger Robot
60f44e93a8 Merge "Add ASAN_ENABLED and SANITIZE_TARGET_SYSTEM_ENABLED to Soong config variables:" into main 2024-07-18 05:52:52 +00:00
Treehugger Robot
083e56837b Merge "Add BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT as a soong config variable" into main 2024-07-18 00:44:49 +00:00
Nikita Putikhin
bd0cba45be Merge "Use test install base template instead of a hardcoded path" into main 2024-07-17 11:34:28 +00:00
Nelson Li
39f5cc4153 Add ASAN_ENABLED and SANITIZE_TARGET_SYSTEM_ENABLED to Soong config variables:
`SANITIZE_TARGET` is a variable in Android's build system used to
enable sanitizers. Currently, Soong only supports enabling SANITIZE for
individual modules in Android.bp.
Adding ASAN_ENABLED and SANITIZE_TARGET_SYSTEM_ENABLED as Soong config
variables would allow Soong to also support building with Sanitizers by
directly setting the SANITIZE_TARGET environment variable.

Bug: 353164536
Test: SANITIZE_TARGET_SYSTEM=true SANITIZE_TARGET=address m -j asan_extract
Change-Id: I542239ee25d210d903d2481a2b1426f756656308
2024-07-17 16:56:58 +08:00
Nelson Li
12c7751ff2 Add BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT as a soong config variable
This variable allow customizing whether the `ramdisk` and
`vendor_ramdisk` are included in the boot image (ramdisk) or the
vendor boot image (vendor_ramdisk). This is useful for devices that
move recovery resources to the vendor boot partition

Bug: 347636127
Test: Add it to soong_config_module_type
Change-Id: If7a126fe8bdc69173921c0b01f85fb9480f4a36f
2024-07-17 12:02:59 +08:00
Nikita Putikhin
8722201866 Use test install base template instead of a hardcoded path
** This CL reapplies aosp/3150696. Now it is connected to a
corresponding change in rust soong module to ensure system test dir does
not change to avoid b/350479879. **

Make the template more consistent with the native (aka cc) test temlate.

The important change is that vendor tests will be pushed into
/data/local/tests/vendor.

Having the test binary in the vendor test folder makes the linker treat
it as a vendor binary and prefer vendor libraries. Previously, the test
binary was always a system binary (due to being in /data/local/tmp) and
used system libraries first potentially leading to bugs (e.g. the one
attached).

This change also makes vendor tests that use vendor libraries require
root due to an existing SELinux policy issue with atest.

Bug: 347370677
Test: checked with:
 - libsecretkeeper_core_test
 - libauthgraph_boringssl_test
 - libdice_policy.test
 Test steps:
 atest -d <test>.vendor # runs vendor variant, passes
 adb root
 adb shell find / -iname <test> 2>/dev/null
 # before change: /data/local/tmp/<test>
 # after change: /data/local/tests/vendor/<test>
Test: v2/android-kvm-team/avf_presubmit_tests
Change-Id: I19793bd20bc23ff0c78e622bc6b93f9a90d725c0
2024-07-16 12:41:19 +00:00
Inseob Kim
94d502200c Merge changes from topic "cf_system_root_files" into main
* changes:
  Add option to use Soong defined system image
  Add files installed to root to diff allowlist
2024-07-16 04:52:08 +00:00
Inseob Kim
8b6f143b0c Add option to use Soong defined system image
By `USE_SOONG_DEFINED_SYSTEM_IMAGE`, a system image specified by
PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE will replace $OUT/system.img.

Bug: 350599472
Test: USE_SOONG_DEFINED_SYSTEM_IMAGE=true m && cvd start
Change-Id: I294ea5e1ce7f9273d0dafc440320b8f194ccf5ca
2024-07-16 03:01:40 +00:00
Treehugger Robot
32af178175 Merge "core/Makefile: Add desktop pack image hook." into main 2024-07-15 16:10:16 +00:00
Yike Zhang
fb308d3c5d Merge "Link shared libs to per test module folder in host-unit-tests.zip" into main 2024-07-12 21:52:51 +00:00
yike
79422c8ed9 Link shared libs to per test module folder in host-unit-tests.zip
Downstream testing infra needs per test module folder to be
self-contained to prune dependencies and increase testing efficiency.

Bug: 351909435
Test: presubmit
Change-Id: Icda8982af8eb223ba4ae45be7975dc5aa42a183e
2024-07-12 20:58:37 +00:00
Alex Klein
807eb549b5 core/Makefile: Add desktop pack image hook.
Desktop currently has a custom pack image script that is valuable
to run in pre/post-submit builders. Add hook to the core Makefile
to allow running it.

Bug: b:349581445
Test: m
Change-Id: I368d3c8278beeee9f5c3e863043869c18e773728
2024-07-11 10:23:18 -06:00
Pawan Wagh
73a534eb71 Merge "Set system property ro.product.page_size" into main 2024-07-10 02:16:40 +00:00
Pawan Wagh
a08472f17b Set system property ro.product.page_size
When target sets TARGET_BOOTS_16K, it should boot
with 16KB page size. Adding system property based on TARGET_BOOTS_16K.

Test: m Vts16KPageSizeTest && atest -c Vts16KPageSizeTest
Flag: TEST_ONLY
Bug: 350993987
Change-Id: I72c55261ad8d67dfa6be7374e1acd6baddbb3342
2024-07-10 00:07:50 +00:00
Treehugger Robot
000be9651c Merge "Move DTBO target definition outside of BUILDING_RAMDISK_IMAGE guard" into main 2024-07-09 01:15:44 +00:00
cactusnoh
5e67f9bb61 Fix: Move COMPRESSION_COMMAND_DEPS before first use
This is a fixed version of commit a8f0bb8df8
which was reverted recently by commit 88d65e514c.

To be concise, the code that was moved need to be outside of block "ifneq ($(BOARD_KERNEL_MODULES_16K),)"
in order for non 16K builds to have no errors.

Bug: 349524000
Change-Id: I6264c984837b8aa479c353abee1526bab2dd83ec
Signed-off-by: cactusnoh <cactusnoh@gmail.com>
2024-07-08 21:22:44 +00:00
Kelvin Zhang
23a97cd73f Move DTBO target definition outside of BUILDING_RAMDISK_IMAGE guard
DTBO taget definition is unintionally moved inside
ifdef BUILDING_RAMDISK_IMAGE guard by aosp/3150938 . This causes
some targets to miss dtbo building if they don't define a ramdisk.

Test: th
Bug: 350056336
Change-Id: If840cc57af794b7844593eeed5935f5e10567e3f
2024-07-08 09:17:32 -07:00
Justin Yun
d13b9a24bc Move otacerts module from Android.mk to Android.bp
Remove the otacerts module defined in Android.mk. Instead, provide
variables to soong.

Bug: 335364209
Test: Define "PRODUCT_DEFAULT_DEV_CERTIFICATE := \
                 build/make/target/product/security/testkey" and
      m aosp_cf_system_x86_64
Change-Id: I99a484e04984da8bd7f58deecd90c880de16fd71
2024-07-04 14:49:23 +09:00
Zhi Dou
dc7ecb5cd2 Merge "Generate aconfig flag storage file from the aconfig_flag.pb of the pertition" into main 2024-07-03 21:45:21 +00:00
Treehugger Robot
c8be459750 Merge "16kb: Remove PRODUCT_BOOTS_16K build variable" into main 2024-07-03 20:54:29 +00:00
Zhi Dou
a4b29191f0 Generate aconfig flag storage file from the aconfig_flag.pb of the
pertition

Test: m
Bug: 349410287
Change-Id: I6f706e90df7985e81865b18b353e4263dea72c0c
2024-07-03 19:41:27 +00:00
Treehugger Robot
f959947939 Merge "Generate system diff between KATI and SOONG" into main 2024-07-03 04:48:21 +00:00
Juan Yescas
f645d4b1cb 16kb: Remove PRODUCT_BOOTS_16K build variable
The PRODUCT_BOOTS_16K is removed and will be
replaced by TARGET_BOOTS_16K variable.

The TARGET_BOOTS_16K will drive the kernel and
modules to use instead.

Bug: 350529323
Bug: 346868433
Test: Built and boot pgagnostic targets
Flag: EXEMPT bugfix
Change-Id: If539f8a9f8c87650b8f618f302eee2c284d8ec79
2024-07-03 03:00:19 +00:00
Kiyoung Kim
8376b32e42 Generate system diff between KATI and SOONG
There is an effort to generate system image with Soong, but there are
some difference in installed files between Soong defined system image
and KATI defined one. This change generates diffs between installed
files from two sources.

Bug: 346873717
Test: USE_SOONG_DEFINED_SYSTEM_IMAGE=true m -j on aosp_cf_x86_64
generated diff file.

Change-Id: I25c71f88d16a4efb873c21abe70ca9c41c6423ca
Merged-In: I25c71f88d16a4efb873c21abe70ca9c41c6423ca
2024-07-02 02:22:51 +00:00
Jaewan Kim
b38fce721a Increase dump-words-to-file capacity
This replicates previous fix for the similar issue
  0bd9a626bd Increase dump-words-to-file capacity

Change-Id: Ibdd31d9a4588eefa585298cc4f01528f0027395a
Test: ABTD
Bug: 350309689
2024-07-01 00:23:06 +00:00
Steven Moreland
1205488d90 Merge "vendor API level current is 10,000,000" into main 2024-06-28 22:17:32 +00:00
Juan Yescas
48aec87674 16kb: Define PRODUCT_BOOTS_16K to indicate that target boots with 16kb kernel
This build flag will indicate whether the target boots with 16kb kernel.
This flag will be used in pgagnostic targets and targets with
with the _16k suffix.

Define the build flag PRODUCT_BOOTS_16K

- When PRODUCT_BOOTS_16K := true, target boots with 16kb kernel.
- When PRODUCT_BOOTS_16K := false, target boots with 4kb kernel.

If the PRODUCT_BOOTS_16K is not defined, its value will be false by default.

Bug: 346868433
Test: Built Pixel 8 targets
      $ source build/envsetup.sh
      $ lunch husky-trunk_staging-userdebug
      $ get_build_var PRODUCT_BOOTS_16K
      false
Change-Id: Ifc5138dd76d2172e1c3bc2564efe91a0f83c5420
2024-06-28 13:23:05 -07:00
Spandan Das
c380fd04be Merge "Install dexpreopt artifacts of non system apps in system_other" into main 2024-06-28 16:14:58 +00:00
Treehugger Robot
d7d16e3cf6 Merge "Revert "Move COMPRESSION_COMMAND_DEPS before first use"" into main 2024-06-28 11:34:25 +00:00
Gina Ko
88d65e514c Revert "Move COMPRESSION_COMMAND_DEPS before first use"
This reverts commit a8f0bb8df8.

Reason for revert: ramdisk.img size becomes 0

Bug: b/349934403
Change-Id: Ifb837defb5fdc699375b3942d0de9655cb018e11
2024-06-28 08:26:54 +00:00
Steven Moreland
fd54266000 vendor API level current is 10,000,000
since it was a weird thing from the last
change, and 10,000 < 202404.

Bug: N/A
Test: selftest
Change-Id: I467a334b791faaeb1bab892c0e1a80c28a0b5d09
2024-06-28 00:45:57 +00:00
Treehugger Robot
14d19661a0 Merge "Add DTBO partition to dev option boot OTA" into main 2024-06-27 23:50:25 +00:00
Treehugger Robot
8e7b07afa9 Merge "Support custom DTBO image for 16KB target" into main 2024-06-27 23:50:25 +00:00
Treehugger Robot
cd23871bd7 Merge "Reland Move all targets away from non-AB" into main 2024-06-27 22:56:23 +00:00
Treehugger Robot
f101cc6aad Merge "Move COMPRESSION_COMMAND_DEPS before first use" into main 2024-06-27 21:17:02 +00:00
Kelvin Zhang
1ef79a4dad Add DTBO partition to dev option boot OTA
This CL adds DTBO partition to dev option OTA if the product
defined a dtbo image for 16KB kernel(indicated via
BOARD_PREBUILT_DTBOIMAGE_16KB)

Test: build with and w/o BOARD_PREBUILT_DTBOIMAGE_16KB set
Change-Id: I6e02d5bab0fccd193396c54e50ad2a9c3946c51d
2024-06-27 10:34:39 -07:00
Kelvin Zhang
c7712ee290 Support custom DTBO image for 16KB target
Test: set BOARD_PREBUILT_DTBOIMAGE_16KB, and build
Bug: 349590107
Change-Id: If27d5e349ad28f1f803625da7331c3277fe3ca5f
2024-06-27 10:34:32 -07:00
Spandan Das
26e6c5d5f7 Install dexpreopt artifacts of non system apps in system_other
`SYSTEM_OTHER_ODEX_FILTER` is used to determine which odex files go in
system_other partition. Soong and Make adds another filter on top of that.
This additional filter limits the odex files to only system apps, which
means that dexpreopt artifacts of product and system_ext apps are **not**
installed in system_other.

This CL removes this additional filter. After this CL, dexpreopt
artifacts of product and system_ext apps will be installed in system_other.

Bug: 349083274
Test: Verified that .odex files of product apps appear in
intalled-files-system_other.txt and not installed-files-product.txt

Test: Ran this CL on a bunch of targets in git_main and throttled
branchesa (there are some unrelated errors on some targets)
https://android-build.corp.google.com/builds/abtd/run/L93000030004826539
https://android-build.corp.google.com/builds/abtd/run/L53400030004824781
https://android-build.corp.google.com/builds/abtd/run/L41900030004824724
https://android-build.corp.google.com/builds/abtd/run/L87200030004822630
https://android-build.corp.google.com/builds/abtd/run/L67500030004727048
https://android-build.corp.google.com/builds/abtd/run/L41700030004726610
https://android-build.corp.google.com/builds/abtd/run/L61600030004726607

Change-Id: I522b8f00a268058b13bb88ac1b34824bd5c1190e
2024-06-27 02:07:36 +00:00
Kelvin Zhang
a8f0bb8df8 Move COMPRESSION_COMMAND_DEPS before first use
Test: th
Bug: 349524000
Change-Id: I6e9a406a04392ce17ad787c28052ee20f3d162a5
2024-06-26 17:12:20 -07:00
LaMont Jones
acbe15ecdf Only include this partition's flags in aconfig_flags.pb
Flags should only be in one of the files.

Bug: 349410287
Test: manual, TH
Change-Id: I85376298538e2537f8f0f717a0a40a8545e99ea6
2024-06-26 14:41:10 -07:00
Steven Moreland
93e0aad03c Merge "Reland "Consider non-shipping lunch targets to be future."" into main 2024-06-26 19:56:10 +00:00
Kelvin Zhang
2add34e96e Reland Move all targets away from non-AB
Previous build breakage is fixed by aosp/3147481 , so
attempting to reland

This reverts commit 2ddbfee4ca.

Reason for revert: b/348547795

Change-Id: Ie7e6e54a6c1796acc37b43fe14692068e0ea31ca
2024-06-26 17:38:00 +00:00
Steven Moreland
8907ad66d1 Reland "Consider non-shipping lunch targets to be future."
This reverts commit b5b8777686.

Reason for revert: reverted in b/348090986

Change-Id: I2cc85dc4bdf9ed3dc2fb4ff77d9dffa3c32dda76
2024-06-26 17:18:41 +00:00
Yihan Dong
9005bb61f7 Add whitelist for mcts modules
Some MCTS modules should not be removed from CTS because they are
dependencies of both MCTS and CTS.

Add a whitelist as a short term solution.

Test: m cts EXCLUDE_MCTS=true
Bug: 349372705
BYPASS_INCLUSIVE_LANGUAGE_REASON=for mcts only
Change-Id: I26ada6da95a8b3547de9e54781b744facb121b05
2024-06-26 07:09:49 +00:00
Treehugger Robot
8865fcdd10 Merge "Add license metadata declarations which are moved from hardware/libhardware_legacy/Android.mk" into main 2024-06-26 03:05:43 +00:00
Treehugger Robot
d1236812b9 Merge "Fix a bug that BUILD_VERSION_TAGS is ignored" into main 2024-06-26 02:47:00 +00:00