Commit graph

7555 commits

Author SHA1 Message Date
Lucas Wei
f57333f7fc Make build support vendor_kernel_boot image
Add vendor_kernel_boot image for vendors whose bootloader support
extra first stage booting kernel modules ramdisks. This benefit
kernel repo to build kernel-artifacts only image without Andorid
artifacts dependency.

Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: If07218b86a7751b3d452a172610af960f5f9ec74
2022-03-16 23:13:19 +08:00
Albert Wang
7be6751e00 Merge "Revert "Turn off adb on user builds."" 2022-03-16 02:48:39 +00:00
Rob Seymour
c4e2754380 Update extract items call in merge_dexopt.
Test: merge builds with VSDK image
Change-Id: I7788164ecbd69408d2293f49b98ab88db67e9cd9
2022-03-15 17:43:51 +00:00
Daniel Norman
5f47677f00 Infer merge configs if not provided.
Bug: 221858722
Test: Create a merged package using inferred configs.
Test: atest --host releasetools_test
Change-Id: I93d67ca0f00be3f0e0424ed0a1e44c39ca2f3094
2022-03-10 23:56:12 +00:00
Daniel Norman
2465fc8594 Split the huge merge_target_files script into multiple files.
Bug: 221858722
Test: m otatools; Use to create merged builds
Test: atest --host releasetools_test
Change-Id: I5f932f160d3f6405b41a7721b1c75cc96749e77b
2022-03-10 23:56:00 +00:00
Treehugger Robot
51005914bd Merge "Moves merge scripts into a new merge folder." 2022-03-10 23:39:28 +00:00
Treehugger Robot
e910accc38 Merge "validate_target_files: support gki_arm64" 2022-03-10 00:57:10 +00:00
Bowgo Tsai
341fe02903 validate_target_files: support gki_arm64
gki_arm64 is a special target to build multiple GKI boot-*.img
files. It has neither system.img nor vbmeta.img. Skips checking
system.img and vbmeta.img in this case.

Bug: 223078405
Test: validate_target_files signed-gki_arm64-target_files-8277156.zip
Change-Id: I9d3c102c11787cf70c1e1fc8e6a552f8fd19ff72
2022-03-09 16:35:19 +08:00
David Anderson
060505fb4a Merge "build_image: Remove mkerofsimage.sh." 2022-03-09 04:04:05 +00:00
Treehugger Robot
0cc4ae84ea Merge "Fix small typo in ota script options" 2022-03-09 03:06:26 +00:00
Daniel Norman
2b0b9ca1b7 Moves merge scripts into a new merge folder.
This will be used in the following change to split
merge_target_files into a collection of smaller
more-focused scripts.

Bug: 221858722
Test: m otatools; Use to create merged builds
Change-Id: Ie01dac81c5f9f28f1e0fe037259eabd2478e60b6
2022-03-08 16:37:14 -08:00
Kelvin Zhang
ff35cbd110 Merge "Simplify codes when _LoadOemDicts" 2022-03-08 23:16:32 +00:00
Kelvin Zhang
318a464a71 Fix small typo in ota script options
"enable_zucchin" was used instead of "enable_zucchini"

Test: th
Change-Id: Iaccb07bc6913a28c021fe84d3faeb59504ea1fbb
2022-03-08 15:13:01 -08:00
Daniel Norman
986582f262 Merge "Fix META/care_map.pb generation." 2022-03-08 22:42:54 +00:00
Daniel Norman
799a18c82e Fix META/care_map.pb generation.
In https://r.android.com/1991151 we removed an extra call to
AddCareMapForAbOta() from generate_care_map(), since
AddCareMapForAbOta() is already called by add_img_to_target_files.

However, when add_img_to_target_files generated care_map.pb it
didn't have the proper partition *_image_size values set for
images copied directly from the input target files packages.
This was because the generate_care_map() function, which sets
those *_image_size values, was executed after add_img_to_target_files.

At best this meant that care_map.pb was missing some information.
At worst, care_map.pb is missing entirely (when all images are
copied instead of regenerated).

This change:
- Renames generate_care_map() to set_copied_image_size_props()
  and simplifies the logic a bit.
- Calls set_copied_image_size_props() before calling
  add_img_to_target_files. Now, add_img_to_target_files will
  have all necessary *_image_size values to perform the
  META/care_map.pb generation step.

Bug: 187432243
Bug: 221858722
Bug: 223198503
Test: Use to create a merged build that does not regenerate any images.
      Observe that META/care_map.pb is now generated as expected.
Change-Id: I1b3c8636be8cbe203222e60b1272a5e11f68589b
2022-03-08 19:02:51 +00:00
jiajia tang
c7c8697a62 Simplify codes when _LoadOemDicts
Use function LoadDictionaryFromFile(), instead of
LoadDictionaryFromLines(). Makes codes conciser.

Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I15d6d4281a03be8a2f6f855054b1e4c1c3010fcd
2022-03-08 18:27:24 +08:00
Treehugger Robot
966482dc56 Merge "Add an option to set VABC compression algo" 2022-03-04 23:56:27 +00:00
Kelvin Zhang
84b3a28603 Add an option to set VABC compression algo
When testing on cuttlefish, space consumption isn't a concern, so
compression can be disabled to save time. We also want to test the
non-compressed code path, as we expect some OEMs to use userspace COW
w/o compression.

If no --vabc_compression_param option specified to
ota_from_target_files, we will use the compression algo specified in
target_files's dynamic_partition_info.txt.

Bug: 219966986
Test: th
Change-Id: Ie18064b15938550ad6fb4efc86fc100c12321dc0
2022-03-04 12:29:30 -08:00
David Anderson
94ad5bb5ef build_image: Remove mkerofsimage.sh.
These wrapper scripts are difficult to maintain and there's not really
any value add. The argument strings don't match and every new build flag
has to be connected in an extra place.

Bug: 222715577
Test: make with EROFS enabled
Change-Id: Ie0e51cc30aa08b004d5d8345a2a2d885e193ffa9
2022-03-04 11:07:43 -08:00
Iavor-Valentin Iftime
63cde0fd92 Allow vendor_otatools arg to be file or folder
Required by signer script when using "--vendor_otatools" argument.

Bug: 220126689
Bug: 186097910

Test: sign_target_files_apks \
        --vendor_otatools=otatools_vendor_dir \
	--vendor_partitions=vendor,odm \
	merged-target_files.zip \
	signed-target_files.zip

Change-Id: Iaa596f95f9db1e1e423b8306e9590fe27acb76e7
2022-03-04 16:02:46 +00:00
Treehugger Robot
f2a0110d36 Merge "Phony target to report all library names." 2022-03-04 02:23:38 +00:00
Daniel Norman
c44f964a5a Allow missing key for misc_info lookups.
This broke the TV-VF build in ab/8246202.

Change-Id: Ifbf76a3c43c46fcd4280180e45ad23fcbed9346d
2022-03-03 19:42:32 +00:00
Treehugger Robot
0b6921be2b Merge "Add SPL downgrade option help text" 2022-03-03 17:56:41 +00:00
Bob Badour
77570059cd Phony target to report all library names.
Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m nothing reportallnoticelibrarynames

Change-Id: I0f791e2d92b8135d6af3a6c93f0db348fc69f5a1
2022-03-02 22:32:37 -08:00
Treehugger Robot
5b48aeccb2 Merge "Clean up merge_target_files" 2022-03-02 23:51:31 +00:00
Treehugger Robot
92c59c42d3 Merge "Fix releasetools OWNERS for merge." 2022-03-02 01:32:34 +00:00
Colin Cross
1fa84f1135 Merge "Add PLATFORM_DISPLAY_VERSION" 2022-03-02 00:01:05 +00:00
Kelvin Zhang
e174c323e1 Add SPL downgrade option help text
Test: th
Change-Id: I71f916642f6327acad1d0c163a204718002f876d
2022-03-01 15:59:08 -08:00
Daniel Norman
5177fcb28d Fix releasetools OWNERS for merge.
My extra _ meant that OWNERS was removed for merge_target_files.

Change-Id: I15f89b9edf31d126df19b66998520e8545cdfbd0
2022-03-01 17:58:34 +00:00
Yi-yo Chiang
9d164b6300 Merge changes from topic "gki-avb-vts"
* changes:
  releasetools: Update T GKI certification scheme
  Update T GKI certification scheme
2022-03-01 04:47:47 +00:00
Treehugger Robot
171c1e168e Merge "Add to OWNERS for merge tooling." 2022-03-01 02:32:17 +00:00
Colin Cross
a492544a03 Add PLATFORM_DISPLAY_VERSION
Add PLATFORM_DISPLAY_VERSION to version_defaults.mk that will propagate
to the ro.build.version.release_or_preview_display property and
be shown as the Android version for preview releases by Settings.

Bug: 221950960
Test: manual
Change-Id: I697cc59f77f92aa98a8a2573662797e6d3bd2042
2022-02-28 18:01:35 -08:00
Daniel Norman
0374741b7b Clean up merge_target_files
Summary of changes:
- Rename extract_items args to be more generic.
- For many other functions, replace large argument lists with
  the OPTIONS shared object.
- Rename process_* functions to merge_* to be more clear about
  the purpose of the function.
- Remove verbose code in merge_ab_partitions_txt().
- Extract certain logic from merge_misc_info_txt() and place it
  into other existing functions: dynamic partition and selinux
  keys are now processed in their own functions.
- Remove verbose code in merge_package_keys_txt().
- Remove verbose code in create_file_contexts_copies().
- Handle extracting from META directly in merge_meta_files(),
  rather than doing this extraction in create_merged_package()
- Storing the set of framework and vendor partitions in OPTIONS
  so it can be reused by multiple functions without needing to
  be parsed again.

Bug: 221858722
Test: atest test_merge_target_files
Test: Use merge_target_files to merge some builds
Change-Id: I8aa429c8fbb05223127b116aab84b2678ac264a8
2022-02-28 16:48:27 -08:00
Cole Faust
e23ae981cc Remove product debug files
These files are difficult to support in the Starlark product
configuration. They also aren't really a good representation
of products even with Makefiles, because they only display
information from products that have been imported with
import-nodes, but generate empty files for the other products
that are included from the imported ones.

For example, lunching aosp_arm64 then running
`m out/products/build/make/target/product/core_64_bit.mk.txt`
would generate a file full of empty variable assignments.

Bug: 221312856
Test: Presubmits
Change-Id: I18613a628968acc25b57b44e229de7df1b2476ef
2022-02-28 14:43:18 -08:00
Daniel Norman
4cf1e03c1c Add to OWNERS for merge tooling.
Includes more folks to increase "bus factor" for these files,
as well as including the merge test.

Change-Id: I8a5e8d1600fd4e03f75338193609f496a964f790
2022-02-28 22:30:49 +00:00
Baligh Uddin
be2d7d0ce1 Ignore cleanup errors.
Certain binaries may have restrictive permissions.

BUG: 221492085
Test: TH
Change-Id: I56f3c172d9e2c3947e513bdf0b2072457061c547
2022-02-26 02:35:25 +00:00
Tianjie Xu
45714a047e Update owner
Change-Id: I11931bcc51408db3ea8d75db67691ee3eb6e0194
Test: N/A
2022-02-25 19:21:48 +00:00
Jooyung Han
4d0af554ce Merge "Replace pvmfw embedded public key" 2022-02-25 06:39:20 +00:00
Treehugger Robot
bc5a49b504 Merge "Fix ota_from_target_files error in non-AB VF" 2022-02-25 03:03:17 +00:00
Treehugger Robot
14ec6f4157 Merge "Remove catch + sys.exit idiom" 2022-02-25 00:35:45 +00:00
Yi-Yo Chiang
24da1a43bb releasetools: Update T GKI certification scheme
Companion change of I143680b1cab50a6915df56c8273f8741beaf1180.
Basically does the same thing as the other change.

Bug: 211741246
Test: m dist
Test: ./boot_signature_info.sh boot-5.10.img
Change-Id: I40c4d5866c74a9a2d525f9455969b8a71f22bdbb
2022-02-24 21:50:18 +08:00
Melisa Carranza Zúñiga
77c1dfa6d9 Merge "Adding flags and logic to sign updateable SEPolicy in APEX" 2022-02-23 16:36:16 +00:00
Andrew Scull
bbc930b008 Replace pvmfw embedded public key
The virt APEX payload public key needs to be embedded in pvmfw so that
is verifies the right set of images. As things are being resigned,
update that embedded key so that it matches the APEX.

Bug: 220018566
Test: sign_target_files_apks
Change-Id: I09be91275ec1d1aa6f921c54a96c5159571ddead
2022-02-23 16:27:57 +00:00
Po Hu
760de672c7 Fix ota_from_target_files error in non-AB VF
Add recovery-from-boot.p for device with
BOARD_USES_FULL_RECOVERY_IMAGE disabled

Bug: 219871887
Change-Id: Id4bafaa44afe28f57e0a35846012073307965940
Test: Used to merge non-AB VF device
2022-02-23 07:29:24 +00: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