Package the image even if it was built (previously, only the pre-built
version was being included).
Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img
Change-Id: Ifb68ad571be78434f815307a5e4939222a28e7b7
The Mac SDK build is being reduced to just the build-tools and
platform-tools packages. I'm still working on refactoring those builds
not to require the monolithic SDK to be built first, but we can at least
stop distributing it (and other related files) now.
Most of these checks can likely go away once the build refactor is
complete, since we'll be able to move away from the `sdk` target to
something more specific. Right now there's a lot of logic around sdk
being in MAKECMDGOALS that I don't want to unravel with the current
build logic.
Bug: 187222815
Change-Id: I1f711ce063170e41078ad4a125bcd77340a1746c
boot-(test-harness|debug).img is not needed for devices with
a /vendor_boot partition. They can use vendor_boot-(test-harness|debug).img
instead.
Bug: 196001476
Test: make then checks $OUT/*.img
Change-Id: If76df0329c96f718ebf0a0ac138cde3ae859a6c6
When we introduced Dynamic Partitions, we stopped giving readonly
partitions fixed sizes. In addition we introduced deduplication for
ext4. These two factors greatly reduce the impact of sparse images,
since there aren't many fill blocks to optimize.
This patch disables sparsing for images that are rightsized and do not
explicitly specify extra reserved space. This makes the images a little
easier to work with from an engineering perspective. They no longer have
to be unsparsed to interact with any tooling. It also eases a potential
source of bugs, as b/184225422 is not reproducible with sparsing off.
On Pixel, the difference between the sparsed partitions and unsparsed is
12M (out of roughly 4G).
Bug: 198001223
Test: make, treehugger, make target-files-package
dynamic partitions are no longer sparse images
Change-Id: I74459f8abe74a15a24ba5a40cf701e6af2db8179
odm, odm_dlkm, vendor_dlkm call generate-userimage-prop-dictionary. This
appears to be inadvertent as it pulls in props from all the other
partitions. Instead, call generate-image-prop-dictionary which is
specific to one partition.
Bug: 198001223
Test: builds, treehugger green
Change-Id: Ib177c740068f1c087d517b363649551092038760
Strip recovery kernel modules by default which make
recovery.img smaller.
Also, add BOARD_DO_NOT_STRIP_RECOVERY_MODULES to make
it configurable like vendor modules did.
Change-Id: Id4e8c88b91dad38afc1fec5eae83fcb29c825be3
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Zucchini is a new diffing algorithm we plan to add to Android OTA, add
it to otatools.zip first.
Bug: 194237829
Test: th
Change-Id: I9561101decc2d13afb0a8d4329c3ecc044c96c9d
boot-test-harness.img is used to allow adb root on user build
images. It also sets properties: ro.audio.silent=1 & ro.test_harness=1.
GKI 2.0 devices will use BOARD_PREBUILT_BOOTIMAGE so
boot-test-harness.img will not be generated.
Therefore, we have to introduce the vendor_boot-test-harness.img
as an alternative for boot-test-harness.img.
In the future, we'll simplify the flow as:
+ If a device has a /vendor_boot partition, builds
vendor_boot-(test-harness|debug).img.
+ Otherwise, builds boot-(test-harness|debug).img.
boot-(test-harness|debug).img needs to be kept for some clients
to gracefully transit to using vendor_boot-(test-harness|debug).img.
Bug: 194654549
Test: make then `unpack_bootimg --boot_img $OUT/vendor_boot-test-harness.img`
Test: Check the ramdisk content in ./out/vendor_ramdisk
Change-Id: If3a1393b4ff3e69bb9b62f3b843b7858437d47bf
When rule action contains something like
cp $(FOO) ...
and FOO is set with
FOO := a \
b \
the generated Ninja file constains extra spaces, making it
difficult to compare it to the same file generated by the
Starlark-based product configuration.
Bug: 181797530
Test: manual
Change-Id: I278bd8edf0f017a31c5b5115b2a38f4f663c55fc
When using the VSDK, dexopt is not applied during the vendor build.
To avoid a first-boot time regression, dexopt is applied during the
merge stage, by running dexopt on the vendor apps and rebuilding
the vendor image.
Bug: 188179859
Test: Tested in keystone with VSDK target
Change-Id: Ie8e2d0a82850a2901fa6f250433bcbb43f0a97f2
Change Id397ad097539 alone would break hikey build, which
is a non-A/B device with a boot image, but without recovery.
Do not build OTA in this case.
Test: lunch hikey && m dist
Fixes: 194018054
Bug: 193588301
Change-Id: I8d09ad5c62d44699eb910ff62d32044bd97e8e44
This reverts commit bf77787cc9.
Reason for revert: relanding change
Test: see next CL
Bug: 193925883
Bug: 193588301
Change-Id: Id397ad0975390617bd277573f2cdba9a2677842d
On devices with a prebuilt boot image, TARGET_NO_KERNEL
may be set to enable signing, etc. In this case we still
want to build the OTA package.
Test: m otapackage on a device with generic boot image
(where TARGET_NO_KERNEL is set)
Bug: 193588301
Change-Id: I4e5adc3f42a516ac0e2f66c313dbe34a469ebe05
On devices with prebuilt generic boot image:
TARGET_NO_KERNEL := true
BOARD_PREBUILT_BOOTIMAGE is set
In this case, the process for extracting the kernel
config and version must also try extracting from the
prebuilt boot image.
Test: build on device with prebuilt boot image
Fixes: 193588301
Change-Id: I43dd8e206bcd1c9f3f5f51869f126791c50af01a
Bug: 188179858
Test: compare dexpreopt_config.zip files from
1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
2. m dexpreopt_config_zip
(note that m clean should run between steps)
Change-Id: I92623b59e4fcac397c7fed3d7ab1070fe5281027
This reverts commit 2e43e34d53.
The kernel bootconfig feature has been updated to handle mixed subkeys
and values, so androidboot.hardware is ok to use now.
Test: build and boot cuttlefish with 'hardware=cutf_vm'
Test: build and boot cuttlefish with 'androidboot.hardware=cutf_vm'
Bug: 191502832
Change-Id: I7c3f330a73abe6cf1fb7d14aaaa6cbc3e874a4aa
* changes:
Add BUILD_USES_RECOVERY_AS_BOOT to soong config
Directly create ramdisk dirs in ramdisk image rule
Add BOARD_BUILD_SYSTEM_ROOT_IMAGE to config vars
The droidcore-unbundled target replaces the droidcore
target when TARGET_BUILD_UNBUNDLED_IMAGE=true. This
target is similar to droidcore in terms of dependencies,
but it has a smaller set of dist files. The intention is
to use TARGET_BUILD_UNBUNDLED_IMAGE=true with a
VSDK-using vendor build to supply Java dependencies from
prebuilts to avoid building (or needing) Java framework
sources.
Test: build with and without TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: m nothing dist (before patch)
Test: m nothing dist (after patch)
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true (after patch)
Test: examine ninja build graph for previous 3 tests
Bug: 188176942
Bug: 187064252
Merged-In: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
Change-Id: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
These directories have been created with post install cmds of
init_first_stage. To migrate init_first_stage to Soong, the directory
rules are now written directly in ramdisk image rule.
Bug: 187196593
Test: "m installclean; m" and see ramdisk output
Change-Id: Ic76c325ce102347f20b282572e3edbb5b4359aaf
INTERNAL_VENDOR_BOOTCONFIG_TARGET is a required dependency of
target-files-package so it can be built from a clean build.
Test: rm -rf out/target/product && m target-files-package
Bug: 190329824
Change-Id: I9873aee3c9fb303d2ad245b5433d13eb76ab55f9
Devices using GKI architecture will use a prebuilt boot.img.
However, we should still sign this prebuilt boot.img with
device-specific AVB keys.
Steps to test the CL.
1. In a device BoardConfig.mk:
# Uses a prebuilt boot.img
TARGET_NO_KERNEL := true
BOARD_PREBUILT_BOOTIMAGE := device/google/redbull/boot.img
# Enable chained vbmeta for the boot image.
# The following can be absent, where the hash descriptor of the
# 'boot' partition will be stored then signed in vbmeta.img instead.
BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA4096
BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
2. `make bootimage`, then `avbtool info_image --image $OUT/boot.img`,
checks the image is re-signed with a device-specific key
3. `make dist` to generate out/dist/TF.zip
4. `unzip out/dist/TF.zip IMAGES/boot.img`
5. `avbtool info_image --image out/dist/IMAGES/boot.img`,
checks the image is re-signed with a device-specific key
6. `sign_target_files_apks \
--avb_boot_key=external/avb/test/data/testkey_rsa8192.pem \
--avb_boot_algorithm=SHA256_RSA8192 \
--avb_boot_extra_args="--prop test:sign" \
./out/dist/*-target_files-eng.*.zip signed.zip`, resign the TF.zip
7. `unzip signed.zip IMAGES/boot.img`, then use `avbtool info_image` to
check the boot.img is re-signed with the --avb_boot_key in step 6.
Bug: 188485657
Test: above steps
Change-Id: I7ee8b3ffe6a86aaca34bbb7a8898a97b3f8bd801
Starting from Android 10, the system.img layout consists of
$TARGET_SYSTEM_OUT and $TARGET_ROOT_OUT, and is mounted by the
init as root. That is, system.img is always created as if
BOARD_BUILD_SYSTEM_ROOT_IMAGE was set.
https://source.android.com/devices/bootloader/partitions/system-as-root
The previous concern is that there might be compatibility issues between
the ramdisk contained in boot.img with a newer system.img. But this is
no longer an issue after we always mount the system.img as root.
Bug: 187157581
Test: Tree Hugger
Change-Id: I4537e6ce6fb39b4b86caac82a13716abf515ffd6
For VAB launched device, factory OTA will write system_other
partition to the super image. So we want to check that
sum(dynamic partitions) + system_other + overhead <= super at
build time.
Since we don't know the overhead at build time, we might instead
check sum(all partitions) < super.
Bug: 185809374
Test: m check-all-partition-sizes, unittests
Change-Id: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20
Currently the debug ramdisk resources might be under / or
/first_stage_ramdisk of the ramdisk, and is determined by
some BOARD variables, e.g., BOARD_USES_RECOVERY_AS_BOOT,
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT, etc.
To make a generic boot-debug.img that can work on both devices,
let's move the debug resources always under / of the ramdisk.
Bug: 186082603
Test: boot a device with boot-debug.img
Test: boot a device with vendor_boot-debug.img
Change-Id: I55dc8ff322f6b97e2d6dc1a4ee5935e863f2f835
To dexpreopt in post processing, store config files for dexpreopt
Bug: 158843648
Test: m dist and check dexpreopt_config.zip
Change-Id: I5c63a5ffc10023994b14e3a63f50defb9194739f
aosp/1664081 introduces a bug where if BOARD_VENDOR_RAMDISK_FRAGMENTS is
empty, then INTERNAL_VENDOR_RAMDISK_FRAGMENTS would become " " (single
whitespace).
Just unconditionally $(strip ...) the variable to remove any extra
whitespace.
Bug: 183395459
Test: m dist and check *-target_files-*.zip
Change-Id: Ic842756f3a64c073593592d22c980820664e11c1
If BOARD_BOOT_HEADER_VERSION >= 4,
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is true and
BOARD_INCLUDE_RECOVERY_RAMDISK_IN_VENDOR_BOOT is true, then build
recovery as a standalone ramdisk fragment in vendor_boot image.
The recovery ramdisk would be a vendor ramdisk fragment packaged in
vendor_boot, whose ramdisk_name is "recovery" and ramdisk_type is
"VENDOR_RAMDISK_TYPE_RECOVERY".
Bootloader can omit loading the recovery ramdisk during normal boot to
optimize the size of the initramfs.
Bug: 183395459
Test: Presubmit
Test: Modify BoardConfig of CF and m dist. Verify the vendor_boot.img
with unpack_bootimg.
Test: Strip the vendor_boot of the recovery ramdisk, and verify that CF
can boot to normal boot without the recovery ramdisk.
Change-Id: I6e9a2781ec87aece10d4844fa18bbe9a7b4674e6