Commit graph

72647 commits

Author SHA1 Message Date
Martin Stjernholm
a7e1611118 Revert "Configure boot image profiles for platform and unbundled ART module"
This reverts commit 1f925ed13e.

Reason for revert: SH regressions in boot and app startup: b/206152027

Bug: 174746397
Bug: 206152027
Change-Id: I60f642b8e4dd8ea04248b835e5b76ffcf01ac300
2021-11-15 17:16:03 +00:00
Yifan Hong
ae48bc0499 Add servicemanager.recovery to base_vendor.mk.
This is so that AIDL HALs can run in recovery.

Test: manual in recovery
Bug: 170338625
Change-Id: Ie9bb7bd554d9d848e6bacd091e2273b7f390c2a9
2021-11-13 00:28:05 -08:00
Yifan Hong
276b8c0230 Add recovery service_contexts.
This allows servicemanager to run in recovery.

Test: manual
Bug: 170338625
Change-Id: I60671af0bcaf13fd545b2f286243fee474caace5
2021-11-13 00:28:05 -08:00
Treehugger Robot
35e7ab363c Merge "Configure boot image profiles for platform and unbundled ART module builds." 2021-11-12 19:56:53 +00:00
Ivan Lozano
d96be59972 Merge soong_{cc,rust}_prebuilt.mk
Much of soong_cc_prebuilt.mk is duplicated in soong_rust_prebuilt.mk.
This adds maintenance burden and increases the risk of bugs or
inconsistencies. Merge the two to simplify this.

Bug: N/A, clean-up
Test: m
Change-Id: I833fba94e299006b34f8e53d5519c6b19f684d39
2021-11-12 13:20:08 -05:00
Treehugger Robot
866d824328 Merge changes from topic "fsverity_digest"
* changes:
  Add fsverity digest manifest
  Implement fsverity metadata generator
2021-11-12 06:26:30 +00:00
Treehugger Robot
edf3230c76 Merge "Revert "Add fsverity test key"" 2021-11-11 18:29:58 +00:00
Martin Stjernholm
1f925ed13e Configure boot image profiles for platform and unbundled ART module
builds.

- Use art/build/boot/boot-image-profile.txt for the primary boot image
  in the ART module, both when it's built from source in platform and
  as an unbundled module.

- Use frameworks/base/boot/boot-image-profile.txt for the framework
  extension image in platform, but not in unbundled builds.

This should obsolete the combined profile
frameworks/base/config/boot-image-profile.txt.

Test: build/soong/soong_ui.bash --dumpvar-mode \
        PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION
  and check that it prints both art/build/boot/boot-image-profile.txt
  and frameworks/base/boot/boot-image-profile.txt in a platform build
  on master.
Test: build/soong/soong_ui.bash --dumpvar-mode \
        PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION
  and check that it prints only art/build/boot/boot-image-profile.txt
  in an unbundled build on master-art.
Test: banchan com.android.art && m
  on master-art and check that
  out/soong/.intermediates/art/build/apex/com.android.art/android_common_com.android.art_image/image.apex/javalib/x86_64/boot.oat
  shrinks from 14 MB to 4.7.
Test: m droid
  on master and check that
  out/soong/.intermediates/art/build/apex/com.android.art/android_common_com.android.art_image/image.apex/javalib/x86_64/boot.oat
  and out/target/product/vsoc_x86_64/system/framework/x86_64/boot-framework.oat
  don't change size significantly.
Test: lunch armv8-eng && art/tools/buildbot-build.sh
  on master-art
Bug: 174746397
Change-Id: I77d7f73b1af414493ca00d2abf3a1e8b32c51d86
2021-11-11 16:01:51 +00:00
Inseob Kim
f69346e0a8 Add fsverity digest manifest
fsverity digest manifest stores a map from files to fsverity digests.
The manifest is installed as a serialized protobuf file, to a signed apk
system/etc/security/fsverity/BuildManifest.apk.

Bug: 193113311
Test: build with PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true
Change-Id: I55fc10400206b8ce0d5f198faea08fe3930b362c
2021-11-11 11:19:44 +00:00
Inseob Kim
b73f8dcc05 Revert "Add fsverity test key"
This reverts commit 10255c8946.

Reason for revert: redundant for now

Change-Id: I756be1cfe3f4c8a2b8226955b8d9d963e40c71ae
2021-11-11 08:43:42 +00:00
Inseob Kim
9cda397948 Implement fsverity metadata generator
Using fsverity tool, fsverity metadata for specific artifacts in system
mage can be generated. Users can do that by setting a makefile variable
PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA to true.

If set to true, the following artifacts will be signed.

- system/framework/*.jar
- system/framework/oat/<arch>/*.{oat,vdex,art}
- system/etc/boot-image.prof
- system/etc/dirty-image-objects

One fsverity metadata container file per one input file will be
generated in system.img, with a suffix ".fsv_meta". e.g. a container
file for "system/framework/foo.jar" will be
"system/framework/foo.jar.fsv_meta".

Bug: 193113311
Test: build with PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true
Change-Id: Ib70d591a72d23286b5debcb05fbad799dfd79b94
2021-11-11 17:30:19 +09:00
Treehugger Robot
372d74a8c9 Merge "Record ALL_DEPS by default." 2021-11-11 04:48:16 +00:00
Eric Miao
6f2d435d8d Merge "Add oatdump and dexdump to dexpreopt_tools.zip" 2021-11-11 04:30:27 +00:00
Jim Tang
5c6410edee Record ALL_DEPS by default.
Abandon the use of RECORD_ALL_DEPS to record ALL_DEPS.

BUG: 204397180

Test: m, and inspect module-info.json.
Change-Id: Iaf35580b52c11ad37017b1fb8e0937b859d3f55b
2021-11-11 10:24:51 +08:00
Treehugger Robot
7bd2d13cde Merge "Fix BOARD_SYSTEMSDK_VERSIONS checks" 2021-11-10 23:38:28 +00:00
Cole Faust
e856367da1 Merge "Add soong_config_get" 2021-11-10 19:46:48 +00:00
Tianjie Xu
7a048996b7 Merge "Fix python3 incompatiable code" 2021-11-10 17:24:09 +00:00
Treehugger Robot
585ec03c47 Merge changes from topic "soong-java-install"
* changes:
  Move java install rules into Soong
  Don't create compatibility suite copy rules for installed path
2021-11-10 17:05:51 +00:00
Anton Hansson
0e21221d30 Merge "Fix product single value variables failed issue" 2021-11-10 16:45:36 +00:00
Tianjie
b049191e78 Fix python3 incompatiable code
http://aosp/1883069 switch the releasetool to use python3.
But target_files_diff still have py2 code that cause failures.
Fix that to unblock OTA generation.

Bug: 205790608
Test: generate an incremental OTA
Change-Id: Ib4d86dc1842afeae8b35681c7d809da140fac600
2021-11-09 23:37:11 -08:00
Cole Faust
70a886c7ce Add soong_config_get
Having a function to get soong config variables
makes it easier to convert to starlark.

Bug: 201700692
Test: m RBC_PRODUCT_CONFIG=1 RBC_BOARD_CONFIG=1 nothing and check output files
Change-Id: I8627555df10d3f66f6154c00be9f0565076f1f94
2021-11-09 17:09:04 -08:00
Treehugger Robot
984ad44276 Merge "Skip signing key check in some cases" 2021-11-10 00:48:27 +00:00
Justin Yun
e81ec6960a Fix BOARD_SYSTEMSDK_VERSIONS checks
BOARD_SYSTEMSDK_VERSIONS must be greater than or equal to the minimum
of PRODUCT_SHIPPING_API_LEVEL and BOARD_API_LEVEL. If BOARD_API_LEVEL
is not defined, read BOARD_SHIPPING_API_LEVEL. If both board api
levels are not defined, compare only with PRODUCT_SHIPPING_API_LEVEL.

Bug: 204964200
Bug: 201489975
Bug: 202919753
Test: manual test with different settings
Change-Id: I36fa0b2fed3bca9ebe1baad46ee1dbe8cb1414e3
2021-11-10 00:34:17 +00:00
Kousik Kumar
8bd19a4143 Merge "Remove unnecessary RBE sourcing in envsetup.sh" 2021-11-09 19:41:49 +00:00
Tianjie Xu
3fcc52519e Merge "Temporarily remove the care_map in the ota package" 2021-11-09 19:38:14 +00:00
Cole Faust
ece722ca92 Merge "Use python 3 for release tools" 2021-11-09 19:16:46 +00:00
Eric Miao
1d0fd2cb91 Add oatdump and dexdump to dexpreopt_tools.zip
Change-Id: If7615e1da24bcb819f595adb88060b164499a598
2021-11-09 18:53:39 +00:00
Kelvin Zhang
4b588cf75a Skip signing key check in some cases
Test: th
Bug: 205657204

Change-Id: I3a2fc886cfb3fe3d53619bfb8fe84aa799d80de3
2021-11-09 08:43:01 -08:00
Treehugger Robot
96f398c06c Merge "Clean SOONG_HOST_OUT for moving rust and sh_binary modules" 2021-11-09 16:29:36 +00:00
Treehugger Robot
a421192568 Merge "Add missing dependency from module name to symlinks" 2021-11-09 10:38:36 +00:00
Tianjie
5856cfbf82 Temporarily remove the care_map in the ota package
The care_map has incorrect size for non-sparse images. Temporarily
removes it until the root cause is fixed

Bug: 205541521
Test: build
Change-Id: I76bcd2c0c778566b4a6c69b6d45428952225d406
2021-11-08 22:55:53 -08:00
liulvping
689c3fb5d7 Fix product single value variables failed issue
Test: source & lunch & make

Signed-off-by: liulvping <liulvping@xiaomi.com>
Change-Id: Idd0e1c561504afb7c7fef4242b3b122cba220ed0
2021-11-09 02:05:25 +00:00
Colin Cross
47cfffea79 Move java install rules into Soong
Remove the copy rules for LOCAL_SOONG_BUILT_INSTALLED, they will already
be created by Soong.

Also clean the soong host tools directory to remove any old copies of
java binaries.

Bug: 204136549
Test: m checkbuild
Change-Id: Ib6b5362ad59aa48770e48541430d6857846926c2
2021-11-08 15:23:32 -08:00
Colin Cross
a69b809425 Don't create compatibility suite copy rules for installed path
Don't create compatibility suite copy rules for $(LOCAL_BUILT_MODULE)
to $(LOCAL_INSTALLED_MODULE), as that could conflict with a Soong
install rule.  Instead, always create the install rule the normal way,
and replace the compatibility suite copy rule with a noop if it is the
same as the normal rule.

Bug: 204136549
Test: m checkbuild
Change-Id: Ic8ac80eda8554fae2b7ecc2516165da020bdaebe
2021-11-08 15:23:32 -08:00
Colin Cross
cf5c18aa8e Clean SOONG_HOST_OUT for moving rust and sh_binary modules
Bug: 204136549
Bug: 205530905
Test: m checkbuild
Test: m && acloud create --local-instance --local-image
Change-Id: I51c2b94bccff3893b9b7c88f08a798a5daccb0f5
2021-11-08 13:31:28 -08:00
Colin Cross
d954ea888a Add missing dependency from module name to symlinks
The rules to install the symlinks had dependencies from PRODUCT_PACKAGES
install rules, but from manual install requests like `m toybox`.  Add
the missing dependencies.  Also add the new declare-0p-target licensing
call.

Fixes: 205524422
Test: m toybox
Change-Id: Ie9a5e37b09250aa271ab153a13f41bc34fa4a38a
2021-11-08 19:40:22 +00:00
Anton Hansson
db7732900b Merge "Do not disable prebuilts for sdk builds" 2021-11-08 10:27:22 +00:00
Cole Faust
c76931fe8b Use python 3 for release tools
The release tools have already been updated in prior cls to
support python 3. To test this, I added code to print the script
name to a temp file at the beginning of every script, and then
ran various builds, ensuring that the scripts were run afterwards.

The builds run:
m brillo_update_payload checkvintf minigzip lz4 toybox unpack_bootimg deapexer (needed for releasetools_test)
m (as both sdk_phone_x86_64 and beagle_x15)
m target-files-package (as both sdk_phone_x86_64 and beagle_x15)
m releasetools_test && out/host/linux-x86/nativetest64/releasetools_test/releasetools_test (25 errors with and without python3)
m check_target_files_signatures apksigner target-files-package && out/host/linux-x86/bin/check_target_files_signatures out/target/product/emulator_x86_64/obj/PACKAGING/target_files_intermediates/sdk_phone_x86_64-target_files-eng.colefaust.zip
m dist
As aosp_cf_x86_64_phone: m dist && sign_target_files_apks  out/dist/aosp_cf_x86_64_phone-target_files-eng.$USER.zip /tmp/signed_target_files.zip && validate_target_files /tmp/signed_target_files.zip

This hit all the scripts except for make_recovery_patch,
merge_builds, and ota_package_parser.

I couldn't find anything that uses merge_builds, so it must
only be run manually.

make_recovery_patch and ota_package_parser are only run if
TARGET_OTA_ALLOW_NON_AB is true (among other things), which
is not the case for any product in aosp.

Test: Described in commit message + presubmits
Change-Id: I1a29eafa7ff1a69973b27055e311de77f7ee628b
2021-11-05 13:47:28 -07:00
Cole Faust
c2becd087a Disallow setting LOCAL_MODULE_STEM for android packages
LOCAL_MODULE_STEM is not used in the packaging code,
except when setting PACKAGES.$(LOCAL_MODULE).STEM.
Having this disconnect between PACKAGES.$(LOCAL_MODULE).STEM
and the actual name of the apk causes an apk signing
step to fail.

Other module types like BUILD_HEADER_LIBRARY explicetly
disallow setting LOCAL_MODULE_STEM, so we can also just
do that for packages.

Fixes: 204027319
Test: Presubmits
Change-Id: Ib3da9a8dd6792a6c9d725cb24b835b32dbb13c40
2021-11-05 12:35:18 -07:00
Cole Faust
2f1bd70c9c Merge "Make starlark board configuration work with sdk_phone_x86_64" 2021-11-05 18:42:12 +00:00
Cole Faust
fdb8f17a83 Merge "Prepare release tools for python 3" 2021-11-05 17:33:04 +00:00
Colin Cross
11b78c16ad Merge "Move tools compiled by Soong to HOST_OUT_EXECUTABLES" 2021-11-05 17:14:59 +00:00
Anton Hansson
30ae089556 Do not disable prebuilts for sdk builds
The artifacts in the SDK zip should be OK to build with a prebuilt
stubs enabled, even if prebuilt apexes are not, because the system
images in the SDK stub are not currently used.

Bug: 205008975
Bug: 204407658
Test: m sdk
Change-Id: Ia78cf87743ff394dcfaa1b43556b230c0dda8742
2021-11-05 16:34:27 +00:00
Cole Faust
b820bcd829 Prepare release tools for python 3
- Sort dictionaries before looping over them
- Don't call sorted() on lists with Nones
- Open file in binary format when serializing protobufs

Change-Id: If5dbc908f7125f6184014b3c1c7891f833d1d8bf
Bug: 203436762
Test: Presubmits
2021-11-04 17:58:44 -07:00
Cole Faust
985fa48a98 Make starlark board configuration work with sdk_phone_x86_64
The main issue with board configuration up till this
cl was that it didn't have access to the product configuration
variables. Pass those in by dumping the make variables to a
temporary file, which is then converted to RBC, loaded,
and passed to the starlark board config..

Bug: 201700692
Test: build/bazel/ci/rbc_product_config.sh -pb sdk_phone_x86_64-userdebug
Change-Id: I9a4946b970ca43c5b5f53a6c507ad2c1a2eca61e
2021-11-04 16:13:24 -07:00
Steven Moreland
ec71cbf0c8 Merge "vintf recovery install parity w/ init_rc" 2021-11-04 22:28:51 +00:00
Treehugger Robot
936e704999 Merge "Fix a failure in signing test" 2021-11-04 07:04:42 +00:00
Kelvin Zhang
2639048c21 Fix a failure in signing test
Pixel moved away from sparse images, so validate_target_files is failing
because it expects sparse images.

Test: th
Change-Id: I322ff10c2afbacfb4d78991be60c11aac92a6d4c
2021-11-03 21:43:22 -07:00
Treehugger Robot
1e392720c2 Merge "Add a compressor types option" 2021-11-04 04:13:13 +00:00
Treehugger Robot
cd128891ed Merge changes from topic "tproto"
* changes:
  Convert .meta_lic files to textproto
  Add macros for non-module license metadata and deps
2021-11-03 18:31:02 +00:00