Commit graph

3685 commits

Author SHA1 Message Date
Dan Shi
e8519a7bad Merge "Revert "Allow to override fastboot-info.txt for specific board"" into main 2023-12-13 19:19:16 +00:00
Dan Shi
16490d3207 Revert "Allow to override fastboot-info.txt for specific board"
Revert submission 2871156-fastboot_info

Reason for revert: possble cause of b/315866782

Reverted changes: /q/submissionid:2871156-fastboot_info

Change-Id: I07baf20bd50529a36f2841350a24ba58d480f5e2
2023-12-13 18:58:49 +00:00
Dmitrii Merkurev
aaf82ff626 Merge "Allow to override fastboot-info.txt for specific board" into main 2023-12-13 02:56:12 +00:00
Dmitrii Merkurev
21eeb06291 Allow to override fastboot-info.txt for specific board
Introduce TARGET_BOARD_FASTBOOT_INFO_FILE to override
fastboot-info.txt generated by default

Test: locally with CF target on related change
Bug: 315811289
Change-Id: I52208e49ac1dfe8558849be9befa60df805665e3
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-12-12 22:10:32 +00:00
Treehugger Robot
e47f6ffa2b Merge "Use SOONG_STUB_VENDOR_LIBRARIES for vendor linker.config.pb" into main 2023-12-05 05:47:09 +00:00
Seungjae Yoo
e68d922118 Append pubkey of microdroid-vendor into avb prop of vendor_boot
For protected VM in AVF, the public key of microdroid-vendor partition
should be passed via trustable way. However, pvmfw config data is
constructed from ABL. AVB property is needed to pass the public key from
the source code into ABL, determined in the build time.

Bug: 285854379
Test: avbtool info_image --image $ANDROID_PRODUCT_OUT/vendor_boot.img
Change-Id: I024d1d835cccb27feef1164aca30712dbb8a70da
2023-12-05 12:17:46 +09:00
Jooyung Han
a7bb8532f6 Use SOONG_STUB_VENDOR_LIBRARIES for vendor linker.config.pb
STUB_LIBRARIES lists all stub libraries including "system" libraries.
There can be a library that provides "stub" only for "system" variant
while its vendor variant doesn't. (e.g. libz). In such cases, using
STUB_LIBRARIES will result a wrong "provide" list in
vendor/etc/linker.config.pb.

So, instead, use SOONG_STUB_VENDOR_LIBRARIES which only lists stub
libraries that are installed in /vendor.

Bug: 313806237
Test: m & cvd start
Test: $OUT/vendor/etc/linker.config.pb doesn't list libz.so
Change-Id: If0f2089594bda5f799fd495f80a27493553cb4e1
2023-12-01 16:39:48 +09:00
Daniel Rosenberg
5514a5aaf6 Merge "Add support for different F2FS block sizes" into main 2023-11-30 00:24:46 +00:00
Daniel Rosenberg
d9a520c5bd Add support for different F2FS block sizes
F2FS has been expanded to allow for different block sizes. Currently the
block size must be the same as page size, but this may change in the
future. This gives support for 16K while not restricting the ability to
choose a block size that isn't based on the page size later on.

Bug: 279820706
Test: Boot 16k F2FS device
Change-Id: I4e025d83a5e5ad03d89bc80b02fea390c2cbad69
2023-11-27 18:09:18 -08:00
Yi-Yo Chiang
d6f568f587 Deprecate BOARD_GKI_SIGNING_* vars and build rules
These were for building and signing GKIs in the platform tree.
We are no longer building GKIs this way, so remove these dead build
rules.

Bug: 229701033
Test: presubmit
Change-Id: I0b807de1407988489e994ec5a0da282616ac1af1
2023-11-28 09:31:47 +08:00
Yi-Yo Chiang
f061800468 Deprecate BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK
These variables are no longer used. We don't build GKI in the platform
tree anymore. Remove these vars as we are not maintaining these.

Bug: 229701033
Test: presubmit
Change-Id: If8c978a07094da6a651c1e3f06a437dea9ef52b9
2023-11-24 15:04:33 +08:00
Kelvin Zhang
65c1162eb5 Generate incremental OTAs for 16K/4K boot option
Previously, the 16K/4K boot options OTAs are full OTAs, resulting in
file size of ~20MB each, and ~40M for both OTAs. To reduce the space
usage, use incremental OTAs instead.

Test: th
Bug: 302759296
Bug: 293313353
Change-Id: I61cc84c6c13f151dd6bc5ff37dd31daa5fb31abd
2023-11-06 12:37:49 -08:00
Jooyung Han
aea4c9d496 Merge "Rewrite how to generate apexkeys.txt" into main 2023-11-01 05:13:06 +00:00
Jooyung Han
8b162283f7 Rewrite how to generate apexkeys.txt
Instead of listing all apexes in the source tree, now each apex emits
its own fragment for apexkeys.txt, which is pointed by
LOCAL_APEX_KEYS_FILE. Makefile collects apexkeys.txt from installed apex
files. This is to avoid listing unrelated apexes (not installed,
testdata, unexported namespaces, etc.)

Bug: 304914238
Test: m apexkeys.txt
Test: m blueprint-tests
Change-Id: I6b5601609d16452a0717f09ecaa703ee09693094
2023-11-01 13:06:08 +09:00
Wei Li
2e84027864 Add a phony target for mk2bp_remaining files.
Bug: 308452586
Test: m mk2bp_remaining; CIs
Change-Id: I3d9242db500232da281f148da6b8205ada0b72e2
2023-10-30 11:20:13 -07:00
Kelvin Zhang
57f23bf317 De-duplicate kernel module names
If BOARD_KERNEL_MODULES_16K contains duplicate kernel modules under
different directories, build will fail with 'multiple overriding
commands error' . To fix it, de-dup BOARD_KERNEL_MODULES_16K base on the
basename of kernel modules files.

Test: th
Change-Id: I45d850d5b3804c54b9ec0133d3a657c2db5adb17
2023-10-26 10:29:55 -07:00
Kelvin Zhang
160762a276 Use deterministic salt for AVB footer of prebuilt boot img
When target specified a prebuilt boot.img, current build system will add
avb hash footer to it with a random salt. Use a deterministic salt
instead for more reproducible builds. To stay consistent with
non-prebuilt boot.img code path, we extract the kernel image from
prebuilt boot.img and uses sha256sum of kernel image as the salt.

Test: th
Bug: 293313353
Change-Id: I988999ddc4f18e0b8677b05a3165c847b6a11b52
2023-10-25 13:28:11 -07:00
Jerome Gaillard
ea9dab478c Add key character maps to layoutlib dist files
This makes key character map files from the framework part of the
layoutlib artifacts so that they can be used in Android Studio to
handle platform key events.

Bug: 255328531
Test: N/A
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1894ff5c78ca33be85d983d28be42870bac0bed0)
Merged-In: I147159912f85daafc97364468d6a6c2cfa3916b8
Change-Id: I147159912f85daafc97364468d6a6c2cfa3916b8

NOTE FOR REVIEWERS - errors occurred while applying the patch.
PLEASE REVIEW CAREFULLY.
Errors:
Error applying patch in core/Makefile, hunk HunkHeader[7006,8->7006,8]: Hunk cannot be applied

Original patch:
 From 1894ff5c78ca33be85d983d28be42870bac0bed0 Mon Sep 17 00:00:00 2001
From: Jerome Gaillard <jgaillard@google.com>
Date: Mon, 24 Oct 2022 16:30:25 +0100
Subject: [PATCH] Add key character maps to layoutlib dist files

This makes key character map files from the framework part of the
layoutlib artifacts so that they can be used in Android Studio to
handle platform key events.

Bug: 255328531
Test: N/A
Change-Id: I147159912f85daafc97364468d6a6c2cfa3916b8
---
2023-10-25 01:15:53 +00:00
Sandeep Dhavale
d7cc7e8f9a Add support for specifying erofs blocksize
This change allows us to specify erofs filesystem block size
which will be used to create erofs image.

Either it can be specified at board level using
BOARD_EROFS_BLOCKSIZE. Or per read only partition image
using BOARD_<PARTITION>IMAGE_EROFS_BLOCKSIZE.

Examples:
BOARD_EROFS_BLOCKSIZE := 16384 OR
BOARD_PRODUCTIMAGE_EROFS_BLOCKSIZE := 16384

Bug: 303316443
Test: m and file ${ANDROID_PRODUCT_OUT}/*.img

Change-Id: I9bf3d299ae02165d0bffc62f474a302408d8b9b9
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
2023-10-18 08:23:36 -07:00
Treehugger Robot
0968914e2c Merge "Revert "Add a check that the staging directories don't..."" into main 2023-10-13 05:32:56 +00:00
Cole Faust
be5e391055 Revert "Add a check that the staging directories don't..."
Revert submission 2773149-partition_file_list_check

Reason for revert: b/305103467, b/305103783, b/305103468
Reverted changes: /q/submissionid:2773149-partition_file_list_check

Change-Id: I2fab3b4d7d24af4488e777ad84e12e280c42dcc0
2023-10-13 02:51:10 +00:00
Kelvin Zhang
ad3c30528d Skip stripping 16K GKI kernel modules
GKI kernel modules are required to be signed, but curretnly we strip all
16K kernel modules. Use SYSTEM_DLKM_MODULE_PATTERNS to determine which
modules are GKI, and skip stripping for these kernel modules.

Test: boot using 16K boot image
Bug: 303725887

Change-Id: I4cd71b39ceb75650d03744220ec4ddf4aeeda871
2023-10-12 10:31:44 -07:00
Cole Faust
fe455d1c0c Merge "Add a check that the staging directories don't..." into main 2023-10-12 16:33:12 +00:00
Jooyung Han
737f6e5c18 APEX extraction rule mentions APEXes
so that it's triggered even when APEX list shrinks.
(-d explain will print "command line changed for ...")

To repro:
- Pick one VAPEX with vintf fragment.
- Copy the fragment to /vendor/etc/vintf/manifest (DEVICE_MANIFEST_FILE)
- `m check-vintf-all` should fail
- Remove the APEX from PRODUCT_PACKAGES
- `m check-vintf-all` should pass

Bug: 304769672
Test: m check-vintf-all
   (see above)
Change-Id: Iae9da91105faebfb8a5127fbb02a414b9ffdca10
2023-10-12 10:39:58 +09:00
Cole Faust
80fad16d14 Add a check that the staging directories don't...
...contain extra files after an installclean.

Bug: 205632228
Test: m installclean && m
Change-Id: Ib021465d1089a21bc4f43306b1441348baf71f9c
2023-10-11 17:42:34 -07:00
Tapas Pradhan
d2d30f6baf makefile:strip generic ramdisk kernel modules in android build system.
Buganizer: 298884633
Test: manual test
Change-Id: I72b21d806ab18e8274dff04445415fe8d2613729
2023-10-06 13:30:41 +05:30
Kelvin Zhang
de53f7df43 Use deterministic salt for boot image avb footer
avbtool by default generates a random salt everytime, this makes builds
less reproducible. Use sha256 checksum of kernel image as the hex to
make the build reproducible.

Test: th
Bug: 293313353

Change-Id: I959b3dee77654098ab9fde475f11eaee8d40c790
2023-10-03 12:26:08 -07:00
Cole Faust
985332eaca Merge "Revert^3 "Make the target_files zip reflect the recent partition change"" into main 2023-09-29 18:09:39 +00:00
Cole Faust
83fe17e0a4 Revert^3 "Make the target_files zip reflect the recent partition change"
This reverts commit cb63de55b7.

Reason for revert: Still more broken devices

Change-Id: Ic55ba78dd9c2e34dc96549ac8aba65fdbefd379b
2023-09-29 00:22:27 +00:00
Cole Faust
13d374ab41 Remove other partition's AVB properties
This is to ensure a partition doesn't need to be aware of the other
partitions in order to be built.

Also sort the image info file so it's easier to compare with bazel.

Bug: 297269187
Test: m && emulator on sdk_phone_x86_64-userdebug
Change-Id: I8e4b2049f602c8db109bf53e1359751a9ed9dd7a
2023-09-28 12:04:56 -07:00
Cole Faust
00bf14b0f3 Merge "Revert^2 "Make the target_files zip reflect the recent partition change"" into main 2023-09-25 21:07:57 +00:00
Cole Faust
cb63de55b7 Revert^2 "Make the target_files zip reflect the recent partition change"
This reverts commit 612b362ca3.

Reason for revert: Excluding the failing product in ag/24856527

Change-Id: I28664302a7fd98ce9bd88e6ce9679b53846b1859
2023-09-25 19:41:25 +00:00
Bart Sears
f576d31d62 Merge "Revert "Make the target_files zip reflect the recent partition change"" into main 2023-09-23 20:18:40 +00:00
Ed Tam
612b362ca3 Revert "Make the target_files zip reflect the recent partition change"
This reverts commit 60061340a5.

Reason for revert: Breaking wifi/sim network connectivity
Bug: 301547660

Change-Id: I1ebf27613a3db8f88a060af2ccfe2a07b64bd7eb
2023-09-23 05:24:41 +00:00
Treehugger Robot
ad30396b0e Merge "Make the target_files zip reflect the recent partition change" into main 2023-09-20 19:40:01 +00:00
Cole Faust
60061340a5 Make the target_files zip reflect the recent partition change
The target_files zip includes a copy of all the installed files.
It wasn't updated to match aosp/2746998, causing a discrepency between
the target files zip and what was actually on the device.

Bug: 205632228
Bug: 300267995
Test: m dist, then compared the list of files in out/dist/sdk_phone_x86_64-target_files-colefaust.zip before/after this cl
Change-Id: I825fe110285f4e9550b264dea162a4bd7c3daef6
2023-09-20 18:33:02 +00:00
Kelvin Zhang
4a4bbda6e7 Add an execution check for BOARD_KERNEL_VERSION
Make sure the specified BOARD_KERNEL_VERSION matches what we extract
from the kernel binary. As other parts of the build system might rely on
the kernel version.

Test: set BOARD_KERNERL_VERSION to foo, make sure build fails
Bug: 293313353
Change-Id: I9005d338fcc3dbb692a6ea7a518a5e63219b2c99
2023-09-19 14:36:56 -07:00
Daniel Zheng
2860f5f574 Merge "remove --apply-vbmeta from vbmeta_vendor" into main 2023-09-13 07:26:43 +00:00
Daniel Zheng
ba67aa4aee remove --apply-vbmeta from vbmeta_vendor
Removing this flag as --apply-vbmeta should only be used for root vbmeta
partitions.

Test: m fastboot_info, fastboot flashall
Bug: 299440104
Change-Id: I4910008635b16c4f4194ebd45da26bd1a8875fc1
2023-09-12 09:43:09 -07:00
Jooyung Han
f3c3f40c3b Merge "Run apex_sepolicy_tests for all installed APEXes" into main 2023-09-11 22:30:20 +00:00
Jooyung Han
e78ad74b2b Run apex_sepolicy_tests for all installed APEXes
This is to check if unknown file context labels are used in APEX. The
reason why this is done in Makefile is to cover vendor-specific SE
policy and prebuilt APEXes. Note that there's already a validation check
when building APEXes (in Soong), which only checks the generic rules,
not vendor-specific.

Bug: 299391194
Test: atest apex_sepolicy_tests_test
Test: m
Change-Id: I4378b7530e8433d2bf188db95cb5bf791e3bf778
2023-09-11 13:40:52 +09:00
Cole Faust
152cdfab7c Clean staging dirs in build_image.py
build_image.py now accepts a --input-directory-filter-file argument
that contains a list of files to consider from the input directory.
A new, temporary input directory will be created, and only the
considered files will be copied to it.

This removes most of the need for `m installclean`, as old files or
files built manually will no longer end up on the partition.

Bug: 205632228
Test: Presubmits
Change-Id: I07e0bf8e840abf0b51a2fdf67b758905fb3c5b5b
2023-09-08 16:24:26 -07:00
Firman Prayoga
44d86b138b Merge "Revert "Clean staging dirs in build_image.py"" into main 2023-09-08 04:06:57 +00:00
Firman Prayoga
df21706765 Revert "Clean staging dirs in build_image.py"
Revert submission 2736954-proper_installclean

Reason for revert: Potential culprit for build breakage b/299545346

Reverted changes: /q/submissionid:2736954-proper_installclean

Change-Id: I2b0671bd40b7a74ef02923a777ec899401691454
2023-09-08 01:24:45 +00:00
Cole Faust
c383825953 Merge "Clean staging dirs in build_image.py" into main 2023-09-07 16:41:45 +00:00
Cole Faust
48b81e7386 Clean staging dirs in build_image.py
build_image.py now accepts a --input-directory-filter-file argument
that contains a list of files to consider from the input directory.
A new, temporary input directory will be created, and only the
considered files will be copied to it.

This removes most of the need for `m installclean`, as old files or
files built manually will no longer end up on the partition.

Bug: 205632228
Test: Presubmits
Change-Id: I4c82ac7f1ed49a37271755749c8f72afeeb7f295
2023-09-06 11:51:13 -07:00
Cole Faust
56e8f7009c Merge "Install LOCAL_SOONG_INSTALL_SYMLINKS even if LOCAL_SOONG_INSTALLED_MODULE isn't set" into main 2023-09-06 00:15:09 +00:00
Cole Faust
c67e769b8c Install LOCAL_SOONG_INSTALL_SYMLINKS even if LOCAL_SOONG_INSTALLED_MODULE isn't set
LOCAL_SOONG_INSTALL_SYMLINKS can now be set by the install_symlink
module type. The install_symlink module type doesn't set
LOCAL_SOONG_INSTALLED_MODULE because make tries to copy that file
around, which doesn't work with a symlink.

Bug: 205632228
Test: built and ran the emulator observed the /system/bin/hwservicemanager symlink is still there
Change-Id: I1ec355b5ae057d0b7fe167674d70da6a4d03f6b5
2023-09-05 14:16:38 -07:00
Treehugger Robot
4d779cf4cd Merge "Reland: Add 16k/4k boot OTAs to /system partition" into main 2023-09-05 16:55:20 +00:00
Kelvin Zhang
1738012f6d Reland: Add 16k/4k boot OTAs to /system partition
This allows switching kernels without downloading anything from
internet.

Test: th
Bug: 293313353

This reverts commit 2610f34671.

Change-Id: Iec6c9f9404ac1bb3286613c33d79b00b20c4c8bb
2023-09-01 17:04:43 +00:00