diff options
author | Bowgo Tsai <bowgotsai@google.com> | 2022-02-22 23:25:58 +0800 |
---|---|---|
committer | Bowgo Tsai <bowgotsai@google.com> | 2022-02-22 23:36:33 +0800 |
commit | e7eb3657a68d4e979debfb6682f2d5c3095dc3a5 (patch) | |
tree | 4cf0dc93e08d38aed81d92dbc5f86de55ab4a280 | |
parent | 6bf3a0aec429f9d4368e6dff1f1111373459af74 (diff) | |
download | common-e7eb3657a68d4e979debfb6682f2d5c3095dc3a5.tar.gz |
Excluding the ramdisk from GKI boot images
By default, the build system assumes the ramdisk is either
in the boot.img or in the init_boot.img. In gki_arm64, we've
removed init_boot.img so the ramdisk will be included in the
boot.img.
However, GKI boot images should not include a ramdisk.
Sets BOARD_BUILD_SYSTEM_ROOT_IMAGE to true to exclude
the ramdisk.
Bug: 220834917
Test: lunch gki_arm64-user; make -j dist; then unpack_bootimg boot-*.img
Change-Id: I441592c141d6cfdb19a13c98cfca9a976af12604
-rw-r--r-- | BoardConfigGkiCommon.mk | 5 | ||||
-rw-r--r-- | gki_common.mk | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/BoardConfigGkiCommon.mk b/BoardConfigGkiCommon.mk index 09b77d6..059eeec 100644 --- a/BoardConfigGkiCommon.mk +++ b/BoardConfigGkiCommon.mk @@ -34,13 +34,16 @@ BOARD_AVB_INIT_BOOT_ROLLBACK_INDEX_LOCATION := 3 # Sets boot SPL. BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH) -# Boot image with ramdisk and kernel +# Boot image with kernel only (no ramdisk) BOARD_BOOT_HEADER_VERSION := 4 BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) BOARD_USES_RECOVERY_AS_BOOT := TARGET_NO_KERNEL := false BOARD_USES_GENERIC_KERNEL_IMAGE := true +# Pretend as a no-ramdisk device to exclude the ramdisk from the GKI boot image +BOARD_BUILD_SYSTEM_ROOT_IMAGE := true + # No system image BOARD_SYSTEMIMAGE_PARTITION_SIZE := diff --git a/gki_common.mk b/gki_common.mk index 33a9701..4e21af1 100644 --- a/gki_common.mk +++ b/gki_common.mk @@ -84,7 +84,7 @@ $(call _output_kernel_files,$(_output-kernel-info-files),$(1),$(2)) endef # -# Output boot.img and init-boot.img +# Output boot.img # $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) PRODUCT_BUILD_BOOT_IMAGE := true |