Commit graph

73641 commits

Author SHA1 Message Date
Bowgo Tsai
8c7f820512 Adding BOOT_OS_VERSION for the AVB prop in a boot.img
Devices using a prebuilt boot.img, e.g., a GKI, will re-sign
the boot.img to append AVB footers. Currently the value of
"com.android.build.boot.os_version" in the AVB footer is set
to the Android platform version. However, the GKI image might
be from another release branch, e.g., using a Android12-5.10
GKI in a Android 13 codebase.

Adding BOOT_OS_VERSION to allow specify the value separately.

Bug: 211364958
Test: make, then `avbtool info_image --image $OUT/boot.img`.
Change-Id: I335cc7b6c5a455d566f364df6a7dae79facc7a87
2022-02-22 15:00:22 +08:00
Peter Collingbourne
0e3b095886 Change how we set ro.product.first_api_level.
The goal of this change is to cause ro.product.first_api_level to be
set in /system/build.prop in targets with PRODUCT_FULL_TREBLE=false
(which may be the case for targets without the usual set of
hardware interfaces, such as the mini targets being added in
https://r.android.com/1966051).

Setting ro.product.first_api_level is necessary for devices with newer
kernels to boot because it controls which metadata encryption format
is used, and an old format that is incompatible with new kernels is
used by default (see commit 4073c0b5241b635cb59e9e8a75ddcc783b5a99ce in
system/vold). There also appear to be e.g. bionic tests that check this
property. So it seems reasonable to set it even if PRODUCT_FULL_TREBLE
is false.

To begin with, stop adding it to ADDITIONAL_SYSTEM_PROPERTIES. There's
basically no point in adding it there because it will be filtered
out by the property blocklist for the system partition, whether
PRODUCT_FULL_TREBLE is true or false. This lets us remove the
blocklist entry, which causes ro.product.first_api_level to
appear in /system/build.prop via ADDITIONAL_VENDOR_PROPERTIES on
PRODUCT_FULL_TREBLE=false targets.

Bug: 217455793
Change-Id: I8c07baf9d308ea734ffed5d9b1776b60cdbf3435
2022-02-18 20:03:10 -08:00
David Anderson
c25bd3c8a0 Merge "Revise partition size for system_other.img" 2022-02-19 01:28:24 +00:00
Treehugger Robot
68f7e84519 Merge "Fix ota_from_target_files error in non-AB VF" 2022-02-19 01:19:24 +00:00
Melisa Carranza Zuniga
46930d7a85 Adding flags and logic to sign updateable SEPolicy in APEX
Verify with command:
sign_apex --container_key=testdata/testkey
--payload_key=testdata/testkey_RSA4096.key
--sepolicy_key=testdata/testkey_RSA4096.key
--sepolicy_cert=testdata/testkey.x509.pem
$OUT/system/apex/com.android.sepolicy.apex
$OUT/test/sepolicy.apex

Test: mma and run sign_apex
Change-Id: I8cc5bbc09058b57e463b1d40d4953d62e0438389
2022-02-19 00:01:09 +01:00
Po Hu
a6c5912e4d Fix ota_from_target_files error in non-AB VF
For vendor freeze, vendor.img/odm.img is rebuilt and moved to
the merged target files dir in a special build flow:
https://android-review.googlesource.com/c/platform/build/+/1752968

But considering non-AB case, some more files are generated by
MakeRecoveryPatch() along with vendor.img, such as:
IMAGES/vendor.map
VENDOR/etc/recovery.img
VENDOR/bin/install-recovery.sh

They should be copied to the merged target files dir as well,
in order to pass the check in HasRecoveryPatch() and
GetSparseImage().

Bug: 219871887
Test: Used to merge non-AB VF device
Change-Id: I003186b30e700413d54ee1b7521bd03ba83ad3f5
2022-02-18 13:25:51 -08:00
Daniel Norman
27cbdd9809 Merge changes I1d1ec878,I25c1dc20
* changes:
  Remove unnecessary AddCareMapForAbOta() in merge_target_files.
  Run pyformat on merge_target_files.py
2022-02-18 21:23:19 +00:00
Treehugger Robot
07491322c3 Merge "ota_utils: Don't fail if metadata proto doesn't exist" 2022-02-18 21:20:07 +00:00
Luca Stefani
b6075c581b ota_utils: Don't fail if metadata proto doesn't exist
The protobuf addition is present only in S+
while the legacy metadata is always present

Test: tools/gen_update_config.py with ota from R
Change-Id: I482c75b6b3b2b1ade139e59dc9dc57dbf9731d45
2022-02-18 11:37:43 +00:00
Treehugger Robot
3e77f44587 Merge "check_target_vintf: Properly glob Vintf file list" 2022-02-18 09:22:16 +00:00
Po Hu
1c48b59aa1 Revise partition size for system_other.img
system_other may be dynamic partition.
Do not fix its partition size as system's.

Bug: 220258352
Change-Id: Iacd14769ec14f43e3871d3c50a6627e6471284b1
2022-02-18 09:11:40 +00:00
Treehugger Robot
52f1acbd93 Merge "Emit warning when build.prop import can't be resolved" 2022-02-18 05:58:27 +00:00
Treehugger Robot
a88313f60b Merge "Improve error message for GetMinSdkVersion" 2022-02-18 05:58:23 +00:00
Kelvin Zhang
07c71ac1b9 Remove catch + sys.exit idiom
This is bad, python already prints exceptino message and exit with
non-zero code when an exception is raised, no need to catch the
exception just to print it. In addition, printing an exception does not
print stacktrace, so catch + sys.exit provide less information than
python's default behavior.

Test: th
Change-Id: If6cf2e34d4ebc9f7d172063b4396bf4377dad447
2022-02-17 21:46:21 -08:00
Treehugger Robot
b23cdfb12b Merge "Make it possible to avoid specifying boot partition sizes." 2022-02-18 01:40:25 +00:00
Treehugger Robot
0eebb8580e Merge "Add data_bins to data_dependencies in module-info" 2022-02-18 01:26:07 +00:00
Treehugger Robot
94daa8bfab Merge "Sort AB_OTA_PARTITIONS" 2022-02-18 01:17:45 +00:00
Peter Collingbourne
730200ec86 Make it possible to avoid specifying boot partition sizes.
Virtual platforms may have no boot partition as such, so there
is no practical limit on the partition size. Therefore, make it
possible to omit the partition size (i.e. by omitting a definition of
BOARD_*BOOTIMAGE_PARTITION_SIZE), allowing unrestricted boot partition
sizes on those platforms.

The macro get-bootimage-partition-size needs to return an empty string
in the case where the variable is not defined in order for consumers
such as assert-max-image-size and get-hash-image-max-size that test
its result using $(if) to properly disable the size check in that
case. The indentation was causing the macro to return the string
"  " instead, which caused an unrequested size check to be inserted.
Fix it by removing the indentation.

A separate patch to avbtool makes it possible to omit the
--partition_size argument when passing --dynamic_partition_size.

Change-Id: Ie836feeb4c3e3b86d9c7950ff45933294cea9410
Bug: 142352330
2022-02-17 14:26:56 -08:00
Daniel Norman
a84d13bc6e Remove unnecessary AddCareMapForAbOta() in merge_target_files.
This function is already called by add_img_to_target_files, when needed.

Bug: 187432243
Test: Create a merged build with ab partitions and OTA package
Change-Id: I1d1ec878f4dcf16c8fcbbea10e787a78d1478328
2022-02-17 14:16:40 -08:00
Daniel Norman
e292f5f105 Run pyformat on merge_target_files.py
Test: n/a
Change-Id: I25c1dc20c367e6b733e9fa4ea77d1873f5ba9a9b
2022-02-17 14:16:10 -08:00
Daniel Norman
f14e8caca7 Merge "Fix build break for vendor freeze" 2022-02-17 22:01:22 +00:00
Kelvin Zhang
42ab828754 Emit warning when build.prop import can't be resolved
Some mountpoints are only available at device runtime, so ignore import
failures in release tools.

Bug: 214322896
Test: th
Change-Id: I1e8c4fb08c6b825fa19c0f0e019dfaf2b03f2927
2022-02-17 13:07:55 -08:00
Cole Faust
900999973e Sort AB_OTA_PARTITIONS
Some product config makefiles are being refactored for
the conversion to Starlark. In order to test that the
refactor doesn't cause any meaningful change, we test
that the ninja files are the same before/after the refactor.
Currently, they have differences in the order of AB_OTA_PARTIONS,
which shouldn't matter. In order to increase our confidence
and make the ninja files more stable, sort AB_OTA_PARTITIONS
before it's used.

Bug: 220169197
Test: Presubmits
Change-Id: I6a9f9f2990406d810577cf8930416925f2987311
2022-02-17 11:35:27 -08:00
Peter Collingbourne
8e5920a665 Merge "Reland "Add a core configuration that disables the zygote."" 2022-02-17 18:37:21 +00:00
Anton Hansson
fd9a21b9bd Pass the base sdk extension version to soong
So that it can be added to the soong config.

Bug: 220086085
Test: m nothing && inspect soong.variables
Change-Id: I949059b9284b16220e2489010279aeae98b4b7fb
2022-02-17 11:16:18 +00:00
yangbill
e6b498bf2d Add data_bins to data_dependencies in module-info
This change exports the list of test_data_bins as data dependencies
that are required by modules when running the test.

Bug: 215234071
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: Ie5c1ef70055618a5fa0ba1bcfbcba8054743d41a
2022-02-17 05:17:03 +00:00
Treehugger Robot
b194430f63 Merge "Add sepolicy prebuilt API dirs to soong config" 2022-02-17 01:26:04 +00:00
Treehugger Robot
a2373a7a7a Merge "Fix warning when running fsverity tools" 2022-02-17 01:17:11 +00:00
Treehugger Robot
4d56eccb79 Merge "Update to llvm-ar's new argument format" 2022-02-16 22:26:14 +00:00
Yi Kong
b1ebaebd94 Update to llvm-ar's new argument format
llvm-ar bundled in the next llvm update will stop accepting the legacy
single-dash argument format.

Bug: 219872355
Test: presubmit
Change-Id: Iede68e4b13c3a01c176d26f335f96879c5c72c12
2022-02-16 18:41:09 +08:00
Treehugger Robot
28e4826995 Merge "Revert "Enable io_uring feature for virtual A/B OTA"" 2022-02-16 08:50:36 +00:00
Akilesh Kailash
f1e7fb3af7 Revert "Enable io_uring feature for virtual A/B OTA"
This reverts commit f72860ce18.

Reason for revert: http://b/219642530 - I/O failures seen on one specific device intermittently. Let's pause this; I will revisit it before we land it back as we don't want to hold dogfood builds.

Change-Id: I3a80ccf5f67daed01d5b2e6a502e8acea85a769f
2022-02-16 04:21:01 +00:00
Inseob Kim
293112d59a Fix warning when running fsverity tools
Bug: 219777071
Test: m fsverity_manifest_generator; fsverity_manifest_generator
Change-Id: Ib5dd55b24a81438b9d536bf29c7ff2b4a91faf3f
2022-02-16 11:22:03 +09:00
Peter Collingbourne
69c29e1bc3 Reland "Add a core configuration that disables the zygote."
In targets that do not include a zygote binary, attempting to start the
zygote service will result in repeated service restarts. Avoid this by
providing a way for targets to opt out of declaring a zygote service.

The fvp_mini target does not have a zygote, so apply this opt-out to
that target.

Relanding after fixing breakage on an internal branch.

Bug: 217455793
Change-Id: Ic26f76142afb5f700bd7b12359d62feb2652b617
2022-02-15 16:03:35 -08:00
Devin Moore
c3ee009f38 Merge "Get build.prop for init_boot.img from the ramdisk props" 2022-02-14 17:14:47 +00:00
Inseob Kim
cc665e54e3 Add sepolicy prebuilt API dirs to soong config
Bug: 33691272
Test: build
Change-Id: Id2ea256507cdbcdcd67751c96c911f49f5fdb3f0
2022-02-14 23:10:08 +09:00
Artur Satayev
ac87c5e13a Merge "Introduce ro.build.version.known_codenames sysprop." 2022-02-14 12:08:04 +00:00
Kelvin Zhang
21118bba67 Improve error message for GetMinSdkVersion
Bug: 219148978
Test: th
Change-Id: I72c653b6e7e159abf0b7aca394cf465869542483
2022-02-12 09:41:18 -08:00
Treehugger Robot
6d361637e3 Merge "Add macros for declaring copied file licenses." 2022-02-12 01:59:49 +00:00
Treehugger Robot
5796849ac8 Merge "Support multiple library names per target." 2022-02-11 22:17:17 +00:00
Bob Badour
8cbb845e37 Add macros for declaring copied file licenses.
The PRODUCT_COPY_FILES is populated before definitions.mk mapping
source files to installed files that get copied unchanged.

Need to be able to declare license metadata for the copied files such
that similarly named files in different projects can have different
licenses.

Need a macro to convert target names to their corresponding license
metadata.

Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771

Test: m nothing

Change-Id: Ic244b3525e72b6cd8c4c4305bf5ad430d6e24ccb
2022-02-11 14:10:06 -08:00
Devin Moore
b5195ff5fe Get build.prop for init_boot.img from the ramdisk props
boot.img and init_boot.img get their build properties from the platform
ramdisk properties.

Test: "m dist" then drop the OTA zip file into
android.github.io/analyseOTA to verify init_boot is present.
Bug: 211823573

Change-Id: I411e62bf0fc3cb49d4b12dadb52d9820fca041fa
2022-02-11 18:44:26 +00:00
satayev
2d94586cff Introduce ro.build.version.known_codenames sysprop.
It defines values for Build.VERSION.KNOWN_CODENAMES constant, and should
contain all codenames starting from Q, including current codename
for in development branches.

Bug: 211747008
Test: presubmit
Change-Id: If8995750e369ba39bfc7041580c21b2f96632a78
2022-02-11 13:20:49 +00:00
Treehugger Robot
b52c28d026 Merge "Export runtime dependencies in module-info" 2022-02-11 00:56:26 +00:00
Treehugger Robot
dda4576d52 Merge "add dmesgd to base system" 2022-02-10 21:00:55 +00:00
Alexander Potapenko
0015b6953a add dmesgd to base system
Bug: 215095687
Test: run on a user device with injected KFENCE bugs
Change-Id: I7776d96400d46fa31bcd8f04728877402dce1162
2022-02-10 15:46:01 +01:00
Treehugger Robot
ea586a8d71 Merge "Fix signing failure when no entry to convert to store" 2022-02-10 12:53:00 +00:00
Bob Badour
1848cef686 Merge "Greater-than zero is more idiomatic." 2022-02-10 09:51:29 +00:00
Treehugger Robot
3c84e5f114 Merge "Add an misc_info.txt entry to customize VABC compression" 2022-02-10 08:41:04 +00:00
yangbill
fa5026c4d8 Export runtime dependencies in module-info
This change exports the list of dependencies that are required by
modules at runtime. Note that only the host case is currently
handled.

Bug: 215243373
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: I05199c54da311e59c7ea87595397ee4eecfab6a3
2022-02-10 08:07:13 +00:00