target-files.zip may indirectly depend on the rsync'd recovery ramdisk
files when BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is true.
Bug: 181095653
Test: manual
Change-Id: I673bb48b1fbb7a54455cda411f9444f05ddaa24f
This follows the same steps as OpenSplitPolicy() in
system/core/init/selinux.cpp on the device.
Bug: 178864050
Test: merge_target_files for R+S and S+S devices
Test: test_merge_target_files
Change-Id: Ia41a436bfda8e2cb65706122f0ff3805b99d16e1
Gather all BOARD_BOOTCONFIG parameters.
Create vendor-bootconfig.img with parameters seperated by newlines. Pass
that file to mkbootimg as --vendor_bootconfig to add it to the
vendor_boot.img.
Test: Add BOARD_BOOTCONFIG parameters in cuttlefish .mk file
Check vendor-bootconfig.img for expected output
Verify expected vendor_boot.img format with:
unpack_bootimg --boot_image vendor_boot.img
Test: Update Cuttlefish bootloader to handle the new vendor_boot.img and
check /proc/bootconfig for the expexted parameters.
Bug: 173815685
Change-Id: Iaa9b71b4bc64375777a5353396e83bb2beb25c47
repack_bootimg is useful to add files into a ramdisk, then repack
a boot.img. Note that mkbootimg, unpack_bootimg, lz4, minigzip, etc.,
that repack_bootimg depends are already in otatools.zip.
Bug: 174443192
Test: `m otatools-package`, unzip $OUT/otatools.zip, export $PATH
with ./otatools/bin and checks unpack_bootimg can run
Change-Id: Id4fbf2076b50522b95ab46dfeb1e2b7115d6606d
BOARD_<partition>_KERNEL_MODULES_BLOCKLIST_FILE<kernel_version> checks
the syntax of and installs a prebuilt modules.blocklist file.
Example usage:
```
BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := \
$(wildcard <path to prebuilt modules.blocklist>)
```
Then the modules blocklist would be install to
(vendor|vendor_dlkm)/lib/modules/modules.blocklist.
Bug: 175165656
Test: Create a blocklist with incorrect syntax, verify build fails
Test: Verify the new macro indeed installs the blocklist file
Change-Id: Icb75aae1bdb45546792f28f4c4e8d06d9439391a
target_files.zip passes a list of files to soong_zip in a file list
file, which soong_zip interprets as a glob. Adding a file called "["
causes soong_zip to error with "syntax error in pattern". Use an RSP
file instead, which after I1de7829c668538204fc4a2ac793a4f88dbc886c9
does not interpret entries as globs.
Bug: 179297188
Test: m target-files-package
soong_zip: don't glob RSP file entries
File arguments are considered globs, but RSP file entries should be
considered filenames without globbing. Escape RSP file entries so
they don't get treated as globs later.
Bug: 179297188
Test: zip_test.go
Change-Id: I0736f2d1802114217cba03ee32b67479c9d98da8
vendor-ramdisk-debug.cpio.lz4 will be packed into a
vendor_boot-debug.img and usually won't be flashed directly.
Moving it to the intermediate build directory.
Bug: None
Test: make vendorbootimage_debug
Change-Id: I86ea72c7a3484a90286139624408d07ce4bf994c
Test: mm -j && mm -j dist, make sure virtual_ab_compression is set to
true in dynamic_partition_info.txt of target_File.zip
Change-Id: Id0d46bd8ed738b2b69a0c01481b7db0c7127f773
When building vendor_boot v4 with multiple vendor ramdisks, pass the
name of each ramdisk to mkbootimg.
Bug: 177882072
Test: Modify a device BoardConfig and verify the built vendor_boot.img
with unpack_bootimg
Change-Id: I679d277aa88f1e10678d2f74b579e4140536e267
Commit I56dda56bab7def1540f4fb506323e3e605620cd4 adds
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT and includes
$(TARGET_RECOVERY_ROOT_OUT) directory when building vendor
ramdisk if BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is set.
We should do the same thing when building the vendor debug
ramdisk as well. Otherwise, lacking some recovery files
makes the device unable to boot into fastbootd/recovery mode.
Bug: 177712689
Test: `make vendorbootimage_debug`, then unpack
./obj/PACKAGING/vendor-boot-debug_intermediates/vendor-ramdisk-debug.cpio.lz4
to check it includes recovery resources via:
`lz4 -d -c ../vendor-ramdisk-debug.cpio.lz4 | cpio -idm`
Test: device can boot into fastbootd after flashing vendor_boot-debug.img
Change-Id: I4744c6600866436ed7d5a321e67e20b8f3da8a81
As we add more partitions, INTERNAL_*IMAGE_FILES variables has grown
and the places where the variables are referenced had to be touched
everytime. This change introduces a new variable
INTERNAL_ALLIMAGES_FILES which concatnates INTERNAL_*IMAGE_FILES, and
replaces the uses of the variables with the new one.
Bug: N/A
Test: m
Change-Id: I62a0f725a0f6999421d04a6261370be9124e62d7
Add support for partitioning the vendor_boot kernel modules into
multiple vendor ramdisk fragments. The partition granularity is kernel
module directory. This mechanism builds upon the existing
BOARD_KERNEL_MODULE_DIRS mechanism. For example, say we have three
kernel module directories:
BOARD_KERNEL_MODULE_DIRS := foo bar baz
We can then define a vendor ramdisk fragment:
BOARD_MKBOOTIMG_ARGS += --header_version 4
BOARD_VENDOR_RAMDISK_FRAGMENTS := dlkm_foobar
And let said ramdisk to contain the DLKM directories "foo" and "bar":
BOARD_VENDOR_RAMDISK_FRAGMENT.dlkm_foobar.KERNEL_MODULE_DIRS := foo bar
BOARD_VENDOR_RAMDISK_FRAGMENT.dlkm_foobar.MKBOOTIMG_ARGS := <mkbootimg args>
The built vendor_boot image would contain two ramdisks.
The first one being the "default" ramdisk, which contains DLKM directory
"baz" and the rest of the files that get's installed to
$(TARGET_VENDOR_RAMDISK_OUT).
The second one is the "dlkm_foobar" ramdisk, which contains the two DLKM
directories.
Design doc: go/vendor-boot-v4
Bug: 162864255
Test: Modify BoardConfig.mk to have a product build v4 vendor_boot
Test: Use unpack_bootimg to verify the vendor_boot image
Test: Teach a bootloader how to handle v4 boot image, flash boot &
vendor_boot and boot device
Change-Id: Ibb1bbd7ebe36430c55ec6c4818c1d3888a319089
* Prerequisites: external/f2fs-tools: sload compression support
* Must work with corresponding changes in system/extras repository
* If Board config does not change, it falls back to old behavior,
i.e. no compression for the system partition
* Kernel f2fs compression support is a prerequisite if the Board config
enables the compression (see below)
* Necessary board config change
(e.g. device/<vendor>/<product>/BoardConfig-common.mk)
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := f2fs
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 200000000
BOARD_SYSTEMIMAGE_FILE_SYSTEM_COMPRESS := true
BOARD_SYSTEMIMAGE_F2FS_SLOAD_COMPRESS_FLAGS := <sload compress sub-options>
Setting BOARD_SYSTEMIMAGE_FILE_SYSTEM_COMPRESS to true enables both the
compression support when the initial empty file system be made (mkfs.f2fs)
and the compression flag (-c) when the system image files be side-loaded
by sload.
Sload compress sub-options (i.e. options other than -c) will be provided
by BOARD_SYSTEMIMAGE_F2FS_SLOAD_COMPRESS_FLAGS. If it is not given, or
is empty, the default sub-options will be used
Please refer to the sload.f2fs manual page.
Setting BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE to f2fs is trivially necessary.
* File system table (fstab), notably the file 'fstab.hardware', should
also changed:
- The file type must be changed to f2fs
- Perhaps also other f2fs-specific options
Bug: 170918499
Test: Pixel4a userdebug build (from build id 6918751)
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: Id9d67b5cb35dc806e06ff1320e89114abc996a28
It was in the middle of some other logic in main.mk
Put it in Makefile instead next to the other "information" dist txt
files.
Test: make and diff certificate_violation_modules.txt
Change-Id: I5b73a0f89ccf3de69e7608a0568d2b4b6f37e98c
Protected KVM relies on protected VM firmware (pvmfw) to bootstrap the
trust in protected VMs. This firmware is AVB protected and stored in the
pvmfw partition.
Test: build a target with BOARD_PREBUILT_PVMFWIMAGE set, saw the image
included in the product files and used avbtool to check the footer
and vbmeta.img details.
Bug: 171280178
Change-Id: I4d6a1819f307c77ca60c0dd3dff39ee28cece4f6
This is needed after
commit 21c34f78e8
which starts calling host_init_verifier in merge_target_files,
a binary in releasetools.
Test: m otatools
Change-Id: Iee762de9fd6f890b5cc26ee5507da2f3f284fc14
Files are copied into the recovery installation directory by a rule
that runs rsync. The previous logic tried to avoid racing with the
rsync rule by depending on the final packaged recovery image, but
if BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is set then
INSTALLED_RECOVERYIMAGE_TARGET is left empty and no dependency was
added. Depend on the timestamp file used as the output of the rule
that runs rsync instead.
Test: query dependencies of installed-files-recovery.txt
Fixes: 173772240
Change-Id: I5ec77a6933e3a83fe4e4819e0e246017d824d8a5
List of stub libraries from system (and bionic APEX) is currently
managed in static file. This change generates the list at build time and
adds to the system config so linkerconfig can use it.
Bug: 172889962
Test: Build cuttlefish and confirmed list is generated in
/system/etc/linker.config.pb
Change-Id: Idd5a93442f398dd8e88c767c694ddae64d1bb713
Add installed-files-vendor-ramdisk.txt build artifact, so that it is
easy to see what files landed on the vendor ramdisk.
Test: clean build, inspect installed-files-vendor-ramdisk.txt
Change-Id: Ie84d06dc968ad972ab2bfa79db4d1839ba09e09f
check_vintf now accepts a file that contains the full kernel
release string as the first half of --kernel. Use it.
With this patch, BOARD_KERNEL_VERSION can be a full kernel release
string like 5.4.42-something, or 5.4.42-android12-0-something.
The content of target_files/META/kernel_version.txt also contains the
full kernel release, not just the kernel version.
Bug: 161317193
Test: m check-vintf-all
Change-Id: I3b52639f557532077894d9356c745c16b41dd91c
check_vintf now accept a path to a file that contains the kernel
version string. Use it.
Test: m check-vintf-all and manual inspect
Bug: 161317193
Change-Id: I4812c93f352686d73c5832d59e43a297d93e67a2
Currently we support skip building vbmeta.img when
PRODUCT_BUILD_VBMETA_IMAGE is set to false, which is used
when generating a system-only or vendor-only build artifacts.
However, when using `make dist` to build target files,
vbmeta.img is still generated. This change fixes this by
passing the related info to misc_info.txt for the release
tool to skip building vbmeta.img when necessary.
To make this happen, a device config should:
1. Set PRODUCT_BUILD_VBMETA_IMAGE := false
2. Remove 'vbmeta' from AB_OTA_PARTITIONS:
AB_OTA_PARTITIONS += \
boot \
system \
- vbmeta \
dtbo \
product \
system_ext \
vbmeta_system
Bug: 161659370
Test: `make dist` and checks the target file does not include vbmeta.img
Change-Id: Iddca9fe0b171a50a80e5a88aa462e118f18a7e6f
This reverts commit 78b55b2244.
Reason for revert: Replaced by Ib99aca13d4d:
ANDROID: GKI: build in a kernel command line of "rw"
Prebuilt is checked in at Ie34b5b017:
Update kernel to builds 6964541
Fixes: 171512004
Test: TH
Change-Id: I2aec88cc22483a6b3a671fc664d465624a14e5b0
Cuttlefish doesn't support updating the vendor partition. So we change
ota_from_target_files to only generate updates for partitions in
BOARD_PARTIAL_OTA_UPDATE_PARTITIONS_LIST. This CL puts the prop in
misc_info.txt, which will be read by ota scrips
Bug: 171999375
Test: mm -j
Change-Id: I4d9c97c717cb73806f95684b3bc81ef285ccbb8b