generate multiple boot.img files in aosp_arm64

Generate boot.img variants with different schemes for kernel compression
(gzip, lz4, none).

The boot image is removed from vbmeta for aosp_arm64 since it is
not possible currently to store the hashes of multiple variants of a
particular image. The GKI will be verified via VTS anyway.

Also remove some emulator-specific stuff from aosp_arm64.

Bug: 151094943
Change-Id: I465ea6c98d52e839284d51b246203f6b8dfb5566
Merged-In: I465ea6c98d52e839284d51b246203f6b8dfb5566
This commit is contained in:
Steve Muckle 2020-04-13 17:07:13 -07:00
parent 4bfa078008
commit 4b6b2003a9
4 changed files with 12 additions and 25 deletions

View File

@ -3471,8 +3471,12 @@ $(if $(BOARD_AVB_$(call to-upper,$(1))_KEY_PATH),\
endef endef
ifdef INSTALLED_BOOTIMAGE_TARGET ifdef INSTALLED_BOOTIMAGE_TARGET
# multiple hashes for an image are not yet supported, fortunately this
# only arises for GKI where the boot descriptor can be left out
ifeq ($(strip $(BOARD_KERNEL_BINARIES)),)
$(eval $(call check-and-set-avb-args,boot)) $(eval $(call check-and-set-avb-args,boot))
endif endif
endif
ifdef INSTALLED_VENDOR_BOOTIMAGE_TARGET ifdef INSTALLED_VENDOR_BOOTIMAGE_TARGET
$(eval $(call check-and-set-avb-args,vendor_boot)) $(eval $(call check-and-set-avb-args,vendor_boot))

View File

@ -53,20 +53,21 @@ TARGET_2ND_CPU_VARIANT := generic
endif endif
include build/make/target/board/BoardConfigGsiCommon.mk include build/make/target/board/BoardConfigGsiCommon.mk
include build/make/target/board/BoardConfigEmuCommon.mk
TARGET_NO_KERNEL := false TARGET_NO_KERNEL := false
TARGET_NO_VENDOR_BOOT := true TARGET_NO_VENDOR_BOOT := true
BOARD_USES_RECOVERY_AS_BOOT := true BOARD_USES_RECOVERY_AS_BOOT := true
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x02000000 BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
BOARD_BOOT_HEADER_VERSION := 3 BOARD_BOOT_HEADER_VERSION := 3
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
# Emulator system image is going to be used as GSI and some vendor still hasn't BOARD_KERNEL_BINARIES := kernel-5.4 kernel-5.4-gz kernel-5.4-lz4
# cleaned up all device specific directories under root!
# Some vendors still haven't cleaned up all device specific directories under
# root!
# TODO(b/111434759, b/111287060) SoC specific hacks # TODO(b/111434759, b/111287060) SoC specific hacks
BOARD_ROOT_EXTRA_SYMLINKS += /vendor/lib/dsp:/dsp BOARD_ROOT_EXTRA_SYMLINKS += /vendor/lib/dsp:/dsp
@ -76,14 +77,3 @@ BOARD_ROOT_EXTRA_SYMLINKS += /vendor/firmware_mnt:/firmware
# TODO(b/36764215): remove this setting when the generic system image # TODO(b/36764215): remove this setting when the generic system image
# no longer has QCOM-specific directories under /. # no longer has QCOM-specific directories under /.
BOARD_SEPOLICY_DIRS += build/make/target/board/generic_arm64/sepolicy BOARD_SEPOLICY_DIRS += build/make/target/board/generic_arm64/sepolicy
# Wifi.
BOARD_WLAN_DEVICE := emulator
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_simulated
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_simulated
WPA_SUPPLICANT_VERSION := VER_0_8_X
WIFI_DRIVER_FW_PATH_PARAM := "/dev/null"
WIFI_DRIVER_FW_PATH_STA := "/dev/null"
WIFI_DRIVER_FW_PATH_AP := "/dev/null"

View File

@ -14,15 +14,10 @@
# limitations under the License. # limitations under the License.
# #
# Cuttlefish has GKI kernel prebuilts, so use those for the GKI boot.img.
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/google/cuttlefish_kernel/5.4-arm64/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel device/google/cuttlefish_kernel/5.4-arm64/kernel-5.4:kernel-5.4 \
device/google/cuttlefish_kernel/5.4-arm64/kernel-5.4-gz:kernel-5.4-gz \
device/google/cuttlefish_kernel/5.4-arm64/kernel-5.4-lz4:kernel-5.4-lz4
# Adjust the Dalvik heap to be appropriate for a tablet. # Adjust the Dalvik heap to be appropriate for a tablet.
$(call inherit-product-if-exists, frameworks/base/build/tablet-dalvik-heap.mk) $(call inherit-product-if-exists, frameworks/base/build/tablet-dalvik-heap.mk)

View File

@ -14,8 +14,6 @@
# limitations under the License. # limitations under the License.
# #
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# The system image of aosp_arm64-userdebug is a GSI for the devices with: # The system image of aosp_arm64-userdebug is a GSI for the devices with:
# - ARM 64 bits user space # - ARM 64 bits user space
# - 64 bits binder interface # - 64 bits binder interface