Commit graph

26509 commits

Author SHA1 Message Date
Treehugger Robot
9885f2f744 Merge "BOARD_SYSTEMSDK_VERSIONS should depend on BOARD_*_API_LEVEL if it exists" 2021-10-05 01:47:30 +00:00
Cole Faust
4de9bc79fb Merge "Add RBC board configuration" 2021-10-05 00:49:48 +00:00
Treehugger Robot
7fe5450be2 Merge "Allow compatibility suite also build a test list" 2021-10-04 20:43:52 +00:00
Dan Shi
fd4802435c Allow compatibility suite also build a test list
The list of tests will be used to filter tests during test mapping run.

Bug: 201591516
Test: m dist cts vts
Change-Id: I2fd63b93c78af4fa88672aa903c87a4777691806
2021-10-04 11:41:06 -07:00
Yi-Yo Chiang
747a0c12eb Merge changes If929bcf9,I9fb5c7fc
* changes:
  Dedup build rules of ramdisk-(debug|test-harness).img
  Build vendor_ramdisk[-debug].img if building vendor_boot.img
2021-10-04 09:50:36 +00:00
Howard Chen
c1b9c1d801 Merge "Make GSI target to export bootimage to DIST" 2021-10-04 06:36:32 +00:00
Cole Faust
e5e7a2d531 Add RBC board configuration
This does largely the same thing as in product configuration,
it converts the board makefiles and evaluates them in place
of an $(include).

Bug: 201700692
Test: Temporarily replace the ifndef RBC_BOARD_CONFIG with RBC_PRODUCT_CONFIG,
      then ./build/bazel/ci/rbc_product_config.sh aosp_arm64-userdebug
Change-Id: I91c3dd6b91cf6bfeb18a5fff95d53b7a2c113c57
2021-10-01 17:56:54 -07:00
Colin Cross
894e9be3f7 Merge "Support per-testcase directories in all test suites" 2021-10-01 16:27:55 +00:00
Jeongik Cha
fe6ef7c08a BOARD_SYSTEMSDK_VERSIONS should depend on BOARD_*_API_LEVEL if it exists
BOARD_SYSTEMSDK_VERSIONS should be checked by BOARD_API_LEVEL,
BOARD_SHIPPING_API_LEVEL, or PRODUCT_SHIPPING_API_LEVEL in a forward
order.

Bug: 201489975
Test: BOARD_SYSTEMSDK_VERSIONS := 30, PRODUCT_SHIPPING_API_LEVEL := 31,
BOARD_API_LEVEL := 30, and then check if there isn't an error

Change-Id: I00e3bf8dda6e6e87a2daf42c74d703503cbeed1f
2021-10-01 23:30:13 +09:00
Yi-Yo Chiang
6c51a43bcc Dedup build rules of ramdisk-(debug|test-harness).img
Adjust code location, factor out common code, eliminate dead code.

Bug: 201753847
Test: Presubmit; change is noop
Change-Id: If929bcf92bc03305058d2d8179c8dba351961c8e
2021-10-01 21:45:44 +08:00
Yi-Yo Chiang
870ea163c2 Build vendor_ramdisk[-debug].img if building vendor_boot.img
Make vendor_boot.img / vendor_ramdisk.img symmetrical to boot.img /
ramdisk.img.

Bug: 201753847
Test: Build and check vendor_ramdisk[-debug].img
Change-Id: I9fb5c7fca09a77446bd140ca549c2091fc9c6a40
2021-10-01 21:45:34 +08:00
Ulyana Trafimovich
85ed8ef84f Merge "Remove unused variable SKIP_BOOT_JARS_CHECK." 2021-10-01 07:21:39 +00:00
Yi-Yo Chiang
710e74588b Merge "Refactor build logic of boot-debug & vendor_boot-debug" 2021-10-01 01:35:23 +00:00
Ulya Trafimovich
ddec79ce54 Remove unused variable SKIP_BOOT_JARS_CHECK.
The variable is no longer used after https://r.android.com/1737753.

Bug: 189298093
Test: m
Change-Id: I6bcb6735189429551ebca697441f2a1edb5c4dfa
2021-09-30 14:00:34 +01:00
Yi-Yo Chiang
4d7c613c58 Refactor build logic of boot-debug & vendor_boot-debug
Add PRODUCT variables
  PRODUCT_BUILD_DEBUG_BOOT_IMAGE
  PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE
as toggles to enable/disable building boot-debug & vendor_boot-debug.

Bug: 200945738
Test: m bootimage_debug
Change-Id: Ic032b8594f776f911d7b6345a97d64fed930d890
2021-09-30 18:32:55 +08:00
Howard Chen
95339b0d91 Make GSI target to export bootimage to DIST
This is to support a bootimage only target in AB.

Bug: 198363484
Test: lunch aosp_arm64-userdebug; make bootimage dist

Change-Id: I9a32c365f635ec4693675a1969d7a1e684c8f55a
2021-09-30 07:10:05 +00:00
Treehugger Robot
64bc620d8c Merge "Show mk2rbc warnings when they occur" 2021-09-30 00:32:45 +00:00
Cole Faust
e96edc34ce Fix parsing issues in board_config.mk
Soong's "androidmk" makefile parser couldn't parse
board_config.mk due to these issues.

Fixes: 201440410
Test: Manually
Change-Id: I2dc298fb969a140e14f704a8c9f9f2ec98be7bc0
2021-09-28 12:43:04 -07:00
Cole Faust
ee8cd58a85 Show mk2rbc warnings when they occur
There was a missing $ for variable expansion,
and $(info) does not seem to show up in soong output,
but $(warning) does.

Fixes: 201431870
Test: After introducing a problem in mk2rbc: m RBC_PRODUCT_CONFIG=1 nothing
Change-Id: Ife7786d27a7315e873ea125ca361e684ffb79e1e
2021-09-28 11:30:03 -07:00
Treehugger Robot
2c8d7798cd Merge "Add more sepolicy variables to soong_config" 2021-09-27 11:05:19 +00:00
Treehugger Robot
b7aced88d6 Merge "Renames boot-debug-*.img in GSI targets" 2021-09-25 03:33:40 +00:00
Treehugger Robot
128bfc440e Merge "Return find_and_copy result in sorted order." 2021-09-25 02:27:35 +00:00
Colin Cross
f4017412e2 Support per-testcase directories in all test suites
There are cases where two modules try to install the same test data
into CTS, which results in collisions when CTS puts the data for all
tests in the same directory.  Add a flag that allows enabling a
per-testcase directory for an individual test for all test suites.

Bug: 193168159
Test: cts-tradefed run commandAndExit CtsBionicTestCases
Change-Id: I4bfaaedfe0e6b8df9c75125b3e2762a4f0d5b395
2021-09-24 16:58:03 -07:00
David Anderson
684e74ae15 Merge "Allow changing the EROFS compressor." 2021-09-24 19:12:53 +00:00
Ivan Lozano
bdf229ce99 Merge "rust: Add EXTRA_CONFIGS to rust test template" 2021-09-24 18:39:47 +00:00
Sasha Smundak
3dc68f1750 Return find_and_copy result in sorted order.
To facilitate regression testing.

Fixes: 200679083
Test: manual
Change-Id: I9c5ee84a26cecd1c1d770b773539a77f8115fe48
2021-09-24 08:54:43 -07:00
Sasha Smundak
e8652d4cd1 Separate output from diagnostics in Starlark product configuration.
Some of the product configuration makefiles use `info` and `warning` Make's
builtins for diagnostics. As running Starlark configuration generates the makefile
as its output, this diagnostics has to go elsewhere. Implement `rblf_log` as
the functional equivalent of `print` that writes to stderr instead of stdout
and use it to implement `info` and `warning` counterparts.

Fixes: 201073196
Test: manual
Change-Id: Ib4d9c10566f9b20310fbee41eda67f0a621b0a84
2021-09-24 08:54:29 -07:00
Yi-Yo Chiang
ad48e9cb87 Merge "Reland: Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT" 2021-09-24 03:10:34 +00:00
Colin Cross
e919f2b8b1 Merge "Remove MAINDEXCLASSES" 2021-09-23 16:19:18 +00:00
Yi-Yo Chiang
f63bd5d4ba Reland: Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
If this option is set, then an additional copy of the debug policy can
be installed to the GSI, and the init-second-stage of GSI could load
debug policy from GSI /system_ext when debug-ramdisk is used.

Bug: 188067818
Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash
  gsi_arm64-user from master, device can boot and `adb root` works
Change-Id: I8c62a3cea026bd26b1994092a14238d22ba1e2df
2021-09-23 14:26:04 +00:00
Bowgo Tsai
a2a5db4466 Renames boot-debug-*.img in GSI targets
Those boot-debug-*.img is used with `repack_bootimg` for a
vendor_boot-debug.img in VTS setup. It is not for GKI boot.img
release.

  https://source.android.com/compatibility/vts/vts-on-gsi#repacking

Renames boot-debug-*.img to boot-with-debug-ramdisk-*.img to
avoid confusion with the official GKI boot.img release.

Bug: 200878300
Test: `lunch gsi_arm64-user` then `make bootimage_debug`
Change-Id: Ia1f6ba847d5b7409fb7a8534432484d2aa972494
2021-09-23 22:19:52 +08:00
Santiago Seifert
1fcf4894d0 Merge "Revert "Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT"" 2021-09-23 13:25:55 +00:00
Ulyana Trafimovich
adcdb18257 Merge "Move copy rule for system server jars from dexpreopt_gen to makefiles." 2021-09-23 13:20:49 +00:00
Santiago Seifert
08fbdf8c75 Revert "Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT"
Revert "Add system_ext_userdebug_plat_sepolicy.cil for GSI"

Revert submission 1824717-gsi_debug_policy

Reason for revert: Breaks the build (see b/200933187).
Reverted Changes:
I37ef02628:Add a copy of debug policy to GSI system image
I9c3dad8bb:Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
I43adc6ada:Add system_ext_userdebug_plat_sepolicy.cil for GSI...
I4d6235c73:Add /system_ext/etc/selinux/ to the debug policy s...
Bug: 200933187
Change-Id: I4252793fbee1b83e3db26f944ac0be6581fa773f
2021-09-23 13:13:40 +00:00
Ulya Trafimovich
44f762a766 Move copy rule for system server jars from dexpreopt_gen to makefiles.
This is necessary in order to expose the copy rule to Ninja. Otherwise
Ninja has a build rule that depends on the copied jar (namely, dexpreopt
commands for all subsequent system server jars that have the current one
in class loader context), but no rule that creates it, so Ninja fails
with a "no rule to make ..." error.

The change only affects system server ed in Android.mk

Previously the problem existed, but was hidden by the fact that the only
system server jar defined in Android.mk was the last one on the list, so
no other jar depended on it. Now that updatable apex jars are also
dexpreopted (https://r.android.com/1828115) the problem was uncovered.

Also the patch removes obsolete logic that disable dexpreopt for
PRODUCT_APEX_SYSTEM_SERVER_JARS; these jars are now preopted (but they
are all defined in Android.bp anyway, so no functional change here).

Bug: 200297762
Test: lunch bertha_x86_64-userdebug && m
Change-Id: I67c6d69f45ca3495f62994b5329f9e424dda4e65
2021-09-23 12:10:04 +01:00
Yi-Yo Chiang
8d0e824a78 Merge "Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT" 2021-09-23 10:07:10 +00:00
David Anderson
40a821f600 Allow changing the EROFS compressor.
This adds BOARD_EROFS_COMPRESSOR to change the compression algorithm
globally, and BOARD_{x}IMAGE_EROFS_COMPRESSOR to change it for
individual partitions.

Bug: N/A
Test: manual test
Change-Id: I2ef831558242a4070ee96269140c33b66c689351
2021-09-22 18:04:27 -07:00
David Anderson
4cf8170fed Merge "Refactor generate-image-prop-dictionary." 2021-09-23 00:31:19 +00:00
Treehugger Robot
562e71bb7e Merge "Add is-board-platform2/is-board-platform-in-list2" 2021-09-22 23:09:11 +00:00
Colin Cross
5a3729b2ba Remove MAINDEXCLASSES
The last user of MAINDEXCLASSES was removed in
Ia88660550c3e57749b8ccb154e97c31aaf2fcf3a.

Test: m checkbuild
Change-Id: I35d9e7d9ff4ac2c07716db59c900b8c3f2cb352e
2021-09-22 15:53:39 -07:00
David Anderson
707e6f5ac8 Refactor generate-image-prop-dictionary.
It's really error prone to add new partitions or image flags given the
amount of code duplication here. Since most images have (or should have)
roughly the same flags, this factors the work out into a helper
function.

Bug: N/A
Test: m, m otapackage
Change-Id: If1a22b9d7b5cf028ba52608322c4383792dae6b9
2021-09-22 14:14:44 -07:00
Treehugger Robot
9d57bf30e5 Merge "Revert "update build rules to use /data/local/tests/unrestricted"" 2021-09-22 06:33:44 +00:00
Guang Zhu
97278c1828 Revert "update build rules to use /data/local/tests/unrestricted"
Revert "update build rules to use /data/local/tests/unrestricted"

Revert submission 1826231-native-test-path

Bug: 199996863

Reason for revert: b/199996863
Reverted Changes:
Ic106011a7:update build rules to use /data/local/tests/unrest...
Id727355ec:update build rules to use /data/local/tests/unrest...

Change-Id: I18301ab3effacd43ff2f136bba9d3244b497a54b
2021-09-22 04:20:05 +00:00
Ivan Lozano
b74088f8b0 rust: Add EXTRA_CONFIGS to rust test template
Bug: 200602232
Test: Extra configs are in generated config
Change-Id: I4abd822f970747a176a746c00d0fa5246441f331
2021-09-21 12:31:22 -04:00
Sasha Smundak
3a1764f8be Add is-board-platform2/is-board-platform-in-list2
This is the first step to get rid of the set of identical macros defined
in utils.mk files in multiple device/google/xxxx directories. The macros
is-board-platform/is-board-platform-in-list will be eventuall replaced
with the new ones.

Bug: 190051051
Test: treehugger
Change-Id: I28017df86dbd899be38f882dd5496c894986d8db
2021-09-20 09:57:36 -07:00
Alexander Smundak
b9306ac477 Merge "Make global config depend on version defaults." 2021-09-20 16:56:10 +00:00
Yuntao Xu
68be5b858c Merge "move cts-test-coverage" 2021-09-17 23:13:58 +00:00
Sasha Smundak
b2220c2990 Make global config depend on version defaults.
Starlark-based product configuration can now share version settings
with makefile product config (mk2rbc converts version_defaults.mk into
version_defaults.rbc which is consumed by runtime initialization).

Bug: 198995713
Test: rbcrun build/make/tests/run.rbc
Change-Id: I1d3ddfed3b15d346b3e10714a195a9f0a3a55a56
2021-09-17 11:00:29 -07:00
Yi-Yo Chiang
0a468fe904 Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
If this option is set, then an additional copy of the debug policy can
be installed to the GSI, and the init-second-stage of GSI could load
debug policy from GSI /system_ext when debug-ramdisk is used.

Bug: 188067818
Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash
  gsi_arm64-user from master, device can boot and `adb root` works
Change-Id: I9c3dad8bb6c5fa88b16762193446dc7e54f326c8
2021-09-17 20:53:56 +08:00
Dan Willemsen
616e7fd9b6 Stop disting monolithic SDK for Mac SDK builds
The Mac SDK build is being reduced to just the build-tools and
platform-tools packages. I'm still working on refactoring those builds
not to require the monolithic SDK to be built first, but we can at least
stop distributing it (and other related files) now.

Most of these checks can likely go away once the build refactor is
complete, since we'll be able to move away from the `sdk` target to
something more specific. Right now there's a lot of logic around sdk
being in MAKECMDGOALS that I don't want to unravel with the current
build logic.

Bug: 187222815
Change-Id: I1f711ce063170e41078ad4a125bcd77340a1746c
2021-09-16 14:54:38 -07:00