Merge "Make build support vendor_kernel_boot image" am: 8842016b30
Original change: https://android-review.googlesource.com/c/platform/build/+/2018599 Change-Id: I7789e6570061b8808e661a1748dc7c8385820289
This commit is contained in:
commit
2dc9c52861
6 changed files with 160 additions and 1 deletions
108
core/Makefile
108
core/Makefile
|
@ -518,6 +518,12 @@ else
|
||||||
VENDOR_RAMDISK_STRIPPED_MODULE_STAGING_DIR :=
|
VENDOR_RAMDISK_STRIPPED_MODULE_STAGING_DIR :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(BOARD_DO_NOT_STRIP_VENDOR_KERNEL_RAMDISK_MODULES),true)
|
||||||
|
VENDOR_KERNEL_RAMDISK_STRIPPED_MODULE_STAGING_DIR := $(call intermediates-dir-for,PACKAGING,depmod_vendor_kernel_ramdisk_stripped)
|
||||||
|
else
|
||||||
|
VENDOR_KERNEL_RAMDISK_STRIPPED_MODULE_STAGING_DIR :=
|
||||||
|
endif
|
||||||
|
|
||||||
BOARD_KERNEL_MODULE_DIRS += top
|
BOARD_KERNEL_MODULE_DIRS += top
|
||||||
$(foreach kmd,$(BOARD_KERNEL_MODULE_DIRS), \
|
$(foreach kmd,$(BOARD_KERNEL_MODULE_DIRS), \
|
||||||
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-image-kernel-modules-dir,RECOVERY,$(TARGET_RECOVERY_ROOT_OUT),,modules.load.recovery,$(RECOVERY_STRIPPED_MODULE_STAGING_DIR),$(kmd))) \
|
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-image-kernel-modules-dir,RECOVERY,$(TARGET_RECOVERY_ROOT_OUT),,modules.load.recovery,$(RECOVERY_STRIPPED_MODULE_STAGING_DIR),$(kmd))) \
|
||||||
|
@ -529,6 +535,7 @@ $(foreach kmd,$(BOARD_KERNEL_MODULE_DIRS), \
|
||||||
$(eval output_dir := $(TARGET_VENDOR_RAMDISK_OUT)) \
|
$(eval output_dir := $(TARGET_VENDOR_RAMDISK_OUT)) \
|
||||||
$(eval result_var := ALL_DEFAULT_INSTALLED_MODULES)) \
|
$(eval result_var := ALL_DEFAULT_INSTALLED_MODULES)) \
|
||||||
$(eval $(result_var) += $(call build-image-kernel-modules-dir,VENDOR_RAMDISK,$(output_dir),,modules.load,$(VENDOR_RAMDISK_STRIPPED_MODULE_STAGING_DIR),$(kmd))) \
|
$(eval $(result_var) += $(call build-image-kernel-modules-dir,VENDOR_RAMDISK,$(output_dir),,modules.load,$(VENDOR_RAMDISK_STRIPPED_MODULE_STAGING_DIR),$(kmd))) \
|
||||||
|
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-image-kernel-modules-dir,VENDOR_KERNEL_RAMDISK,$(TARGET_VENDOR_KERNEL_RAMDISK_OUT),,modules.load,$(VENDOR_KERNEL_RAMDISK_STRIPPED_MODULE_STAGING_DIR),$(kmd))) \
|
||||||
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-vendor-ramdisk-recovery-load,$(kmd))) \
|
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-vendor-ramdisk-recovery-load,$(kmd))) \
|
||||||
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-image-kernel-modules-dir,VENDOR,$(if $(filter true,$(BOARD_USES_VENDOR_DLKMIMAGE)),$(TARGET_OUT_VENDOR_DLKM),$(TARGET_OUT_VENDOR)),vendor,modules.load,$(VENDOR_STRIPPED_MODULE_STAGING_DIR),$(kmd))) \
|
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-image-kernel-modules-dir,VENDOR,$(if $(filter true,$(BOARD_USES_VENDOR_DLKMIMAGE)),$(TARGET_OUT_VENDOR_DLKM),$(TARGET_OUT_VENDOR)),vendor,modules.load,$(VENDOR_STRIPPED_MODULE_STAGING_DIR),$(kmd))) \
|
||||||
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-vendor-charger-load,$(kmd))) \
|
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(call build-vendor-charger-load,$(kmd))) \
|
||||||
|
@ -1288,7 +1295,11 @@ $(INSTALLED_FILES_FILE_VENDOR_RAMDISK): $(INTERNAL_VENDOR_RAMDISK_FILES) $(FILES
|
||||||
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_RAMDISK)))
|
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_RAMDISK)))
|
||||||
|
|
||||||
ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG
|
ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG
|
||||||
INTERNAL_VENDOR_BOOTIMAGE_ARGS += --dtb $(INSTALLED_DTBIMAGE_TARGET)
|
ifneq ($(BUILDING_VENDOR_KERNEL_BOOT_IMAGE),true)
|
||||||
|
# If we have vendor_kernel_boot partition, we migrate dtb image to that image
|
||||||
|
# and allow dtb in vendor_boot to be empty.
|
||||||
|
INTERNAL_VENDOR_BOOTIMAGE_ARGS += --dtb $(INSTALLED_DTBIMAGE_TARGET)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef BOARD_KERNEL_BASE
|
ifdef BOARD_KERNEL_BASE
|
||||||
INTERNAL_VENDOR_BOOTIMAGE_ARGS += --base $(BOARD_KERNEL_BASE)
|
INTERNAL_VENDOR_BOOTIMAGE_ARGS += --base $(BOARD_KERNEL_BASE)
|
||||||
|
@ -1374,6 +1385,66 @@ $(call declare-container-license-deps,$(INSTALLED_VENDOR_BOOTIMAGE_TARGET),$(INT
|
||||||
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDOR_BOOTIMAGE_TARGET)
|
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDOR_BOOTIMAGE_TARGET)
|
||||||
endif # BUILDING_VENDOR_BOOT_IMAGE
|
endif # BUILDING_VENDOR_BOOT_IMAGE
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# vendor kernel boot image
|
||||||
|
ifeq ($(BUILDING_VENDOR_KERNEL_BOOT_IMAGE),true)
|
||||||
|
|
||||||
|
INTERNAL_VENDOR_KERNEL_RAMDISK_FILES := $(filter $(TARGET_VENDOR_KERNEL_RAMDISK_OUT)/%, \
|
||||||
|
$(ALL_GENERATED_SOURCES) \
|
||||||
|
$(ALL_DEFAULT_INSTALLED_MODULES))
|
||||||
|
|
||||||
|
INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET := $(call intermediates-dir-for,PACKAGING,vendor_kernel_boot)/vendor_kernel_ramdisk.cpio$(RAMDISK_EXT)
|
||||||
|
|
||||||
|
$(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_VENDOR_KERNEL_RAMDISK_FILES) | $(COMPRESSION_COMMAND_DEPS)
|
||||||
|
$(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_VENDOR_KERNEL_RAMDISK_OUT) | $(COMPRESSION_COMMAND) > $@
|
||||||
|
|
||||||
|
INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET := $(PRODUCT_OUT)/vendor_kernel_ramdisk.img
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET): $(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET)
|
||||||
|
@echo "Target vendor kernel ramdisk: $@"
|
||||||
|
$(copy-file-to-target)
|
||||||
|
|
||||||
|
INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK := $(PRODUCT_OUT)/installed-files-vendor-kernel-ramdisk.txt
|
||||||
|
INSTALLED_FILES_JSON_VENDOR_KERNEL_RAMDISK := $(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK:.txt=.json)
|
||||||
|
$(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_VENDOR_KERNEL_RAMDISK)
|
||||||
|
$(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK): $(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET)
|
||||||
|
$(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK): $(INTERNAL_VENDOR_KERNEL_RAMDISK_FILES) $(FILESLIST) $(FILESLIST_UTIL)
|
||||||
|
@echo Installed file list: $@
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
rm -f $@
|
||||||
|
$(FILESLIST) $(TARGET_VENDOR_KERNEL_RAMDISK_OUT) > $(@:.txt=.json)
|
||||||
|
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
|
||||||
|
|
||||||
|
INTERNAL_VENDOR_KERNEL_BOOTIMAGE_ARGS := --vendor_ramdisk $(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET)
|
||||||
|
INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/vendor_kernel_boot.img
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET)
|
||||||
|
|
||||||
|
ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG
|
||||||
|
INTERNAL_VENDOR_KERNEL_BOOTIMAGE_ARGS += --dtb $(INSTALLED_DTBIMAGE_TARGET)
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET): $(INSTALLED_DTBIMAGE_TARGET)
|
||||||
|
endif
|
||||||
|
ifdef BOARD_KERNEL_PAGESIZE
|
||||||
|
INTERNAL_VENDOR_KERNEL_BOOTIMAGE_ARGS += --pagesize $(BOARD_KERNEL_PAGESIZE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(BOARD_AVB_ENABLE),true)
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET): $(AVBTOOL) $(BOARD_AVB_VENDOR_KERNEL_BOOTIMAGE_KEY_PATH)
|
||||||
|
$(call pretty,"Target vendor_kernel_boot image: $@")
|
||||||
|
$(MKBOOTIMG) $(INTERNAL_VENDOR_KERNEL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --vendor_boot $@
|
||||||
|
$(call assert-max-image-size,$@,$(BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE))
|
||||||
|
$(AVBTOOL) add_hash_footer \
|
||||||
|
--image $@ \
|
||||||
|
$(call get-partition-size-argument,$(BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE)) \
|
||||||
|
--partition_name vendor_kernel_boot $(INTERNAL_AVB_VENDOR_KERNEL_BOOT_SIGNING_ARGS) \
|
||||||
|
$(BOARD_AVB_VENDOR_KERNEL_BOOT_ADD_HASH_FOOTER_ARGS)
|
||||||
|
else
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET):
|
||||||
|
$(call pretty,"Target vendor_kernel_boot image: $@")
|
||||||
|
$(MKBOOTIMG) $(INTERNAL_VENDOR_KERNEL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --vendor_boot $@
|
||||||
|
$(call assert-max-image-size,$@,$(BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE))
|
||||||
|
endif
|
||||||
|
endif # BUILDING_VENDOR_KERNEL_BOOT_IMAGE
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# NOTICE files
|
# NOTICE files
|
||||||
#
|
#
|
||||||
|
@ -3969,6 +4040,9 @@ BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS += \
|
||||||
BOARD_AVB_VENDOR_BOOT_ADD_HASH_FOOTER_ARGS += \
|
BOARD_AVB_VENDOR_BOOT_ADD_HASH_FOOTER_ARGS += \
|
||||||
--prop com.android.build.vendor_boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \
|
--prop com.android.build.vendor_boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \
|
||||||
|
|
||||||
|
BOARD_AVB_VENDOR_KERNEL_BOOT_ADD_HASH_FOOTER_ARGS += \
|
||||||
|
--prop com.android.build.vendor_kernel_boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \
|
||||||
|
|
||||||
BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS += \
|
BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS += \
|
||||||
--prop com.android.build.recovery.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
|
--prop com.android.build.recovery.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
|
||||||
|
|
||||||
|
@ -4055,6 +4129,7 @@ endif
|
||||||
BOOT_FOOTER_ARGS := BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS
|
BOOT_FOOTER_ARGS := BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS
|
||||||
INIT_BOOT_FOOTER_ARGS := BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS
|
INIT_BOOT_FOOTER_ARGS := BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS
|
||||||
VENDOR_BOOT_FOOTER_ARGS := BOARD_AVB_VENDOR_BOOT_ADD_HASH_FOOTER_ARGS
|
VENDOR_BOOT_FOOTER_ARGS := BOARD_AVB_VENDOR_BOOT_ADD_HASH_FOOTER_ARGS
|
||||||
|
VENDOR_KERNEL_BOOT_FOOTER_ARGS := BOARD_AVB_VENDOR_KERNEL_BOOT_ADD_HASH_FOOTER_ARGS
|
||||||
DTBO_FOOTER_ARGS := BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS
|
DTBO_FOOTER_ARGS := BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS
|
||||||
PVMFW_FOOTER_ARGS := BOARD_AVB_PVMFW_ADD_HASH_FOOTER_ARGS
|
PVMFW_FOOTER_ARGS := BOARD_AVB_PVMFW_ADD_HASH_FOOTER_ARGS
|
||||||
SYSTEM_FOOTER_ARGS := BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS
|
SYSTEM_FOOTER_ARGS := BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS
|
||||||
|
@ -4146,6 +4221,10 @@ ifdef INSTALLED_VENDOR_BOOTIMAGE_TARGET
|
||||||
$(eval $(call check-and-set-avb-args,vendor_boot))
|
$(eval $(call check-and-set-avb-args,vendor_boot))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET
|
||||||
|
$(eval $(call check-and-set-avb-args,vendor_kernel_boot))
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef INSTALLED_SYSTEMIMAGE_TARGET
|
ifdef INSTALLED_SYSTEMIMAGE_TARGET
|
||||||
$(eval $(call check-and-set-avb-args,system))
|
$(eval $(call check-and-set-avb-args,system))
|
||||||
endif
|
endif
|
||||||
|
@ -4250,6 +4329,9 @@ define extract-avb-chain-public-keys
|
||||||
$(if $(BOARD_AVB_VENDOR_BOOT_KEY_PATH),\
|
$(if $(BOARD_AVB_VENDOR_BOOT_KEY_PATH),\
|
||||||
$(AVBTOOL) extract_public_key --key $(BOARD_AVB_VENDOR_BOOT_KEY_PATH) \
|
$(AVBTOOL) extract_public_key --key $(BOARD_AVB_VENDOR_BOOT_KEY_PATH) \
|
||||||
--output $(1)/vendor_boot.avbpubkey)
|
--output $(1)/vendor_boot.avbpubkey)
|
||||||
|
$(if $(BOARD_AVB_VENDOR_KERNEL_BOOT_KEY_PATH),\
|
||||||
|
$(AVBTOOL) extract_public_key --key $(BOARD_AVB_VENDOR_KERNEL_BOOT_KEY_PATH) \
|
||||||
|
--output $(1)/vendor_kernel_boot.avbpubkey)
|
||||||
$(if $(BOARD_AVB_SYSTEM_KEY_PATH),\
|
$(if $(BOARD_AVB_SYSTEM_KEY_PATH),\
|
||||||
$(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_SYSTEM_KEY_PATH) \
|
$(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_SYSTEM_KEY_PATH) \
|
||||||
--output $(1)/system.avbpubkey)
|
--output $(1)/system.avbpubkey)
|
||||||
|
@ -4363,6 +4445,7 @@ $(INSTALLED_VBMETAIMAGE_TARGET): \
|
||||||
$(INSTALLED_BOOTIMAGE_TARGET) \
|
$(INSTALLED_BOOTIMAGE_TARGET) \
|
||||||
$(INSTALLED_INIT_BOOT_IMAGE_TARGET) \
|
$(INSTALLED_INIT_BOOT_IMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDOR_BOOTIMAGE_TARGET) \
|
$(INSTALLED_VENDOR_BOOTIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET) \
|
||||||
$(INSTALLED_SYSTEMIMAGE_TARGET) \
|
$(INSTALLED_SYSTEMIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDORIMAGE_TARGET) \
|
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||||
$(INSTALLED_PRODUCTIMAGE_TARGET) \
|
$(INSTALLED_PRODUCTIMAGE_TARGET) \
|
||||||
|
@ -4951,6 +5034,10 @@ ifneq ($(INSTALLED_VENDOR_BOOTIMAGE_TARGET),)
|
||||||
echo "vendor_boot=true" >> $@
|
echo "vendor_boot=true" >> $@
|
||||||
echo "vendor_boot_size=$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE)" >> $@
|
echo "vendor_boot_size=$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE)" >> $@
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET),)
|
||||||
|
echo "vendor_kernel_boot=true" >> $@
|
||||||
|
echo "vendor_kernel_boot_size=$(BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE)" >> $@
|
||||||
|
endif
|
||||||
ifeq ($(INSTALLED_RECOVERYIMAGE_TARGET),)
|
ifeq ($(INSTALLED_RECOVERYIMAGE_TARGET),)
|
||||||
$(hide) echo "no_recovery=true" >> $@
|
$(hide) echo "no_recovery=true" >> $@
|
||||||
endif
|
endif
|
||||||
|
@ -5031,6 +5118,12 @@ ifdef BOARD_AVB_VENDOR_BOOT_KEY_PATH
|
||||||
echo "avb_vendor_boot_algorithm=$(BOARD_AVB_VENDOR_BOOT_ALGORITHM)" >> $@
|
echo "avb_vendor_boot_algorithm=$(BOARD_AVB_VENDOR_BOOT_ALGORITHM)" >> $@
|
||||||
echo "avb_vendor_boot_rollback_index_location=$(BOARD_AVB_VENDOR_BOOT_ROLLBACK_INDEX_LOCATION)" >> $@
|
echo "avb_vendor_boot_rollback_index_location=$(BOARD_AVB_VENDOR_BOOT_ROLLBACK_INDEX_LOCATION)" >> $@
|
||||||
endif # BOARD_AVB_VENDOR_BOOT_KEY_PATH
|
endif # BOARD_AVB_VENDOR_BOOT_KEY_PATH
|
||||||
|
echo "avb_vendor_kernel_boot_add_hash_footer_args=$(BOARD_AVB_VENDOR_KERNEL_BOOT_ADD_HASH_FOOTER_ARGS)" >> $@
|
||||||
|
ifdef BOARD_AVB_VENDOR_KERNEL_BOOT_KEY_PATH
|
||||||
|
echo "avb_vendor_kernel_boot_key_path=$(BOARD_AVB_VENDOR_KERNEL_BOOT_KEY_PATH)" >> $@
|
||||||
|
echo "avb_vendor_kernel_boot_algorithm=$(BOARD_AVB_VENDOR_KERNEL_BOOT_ALGORITHM)" >> $@
|
||||||
|
echo "avb_vendor_kernel_boot_rollback_index_location=$(BOARD_AVB_VENDOR_KERNEL_BOOT_ROLLBACK_INDEX_LOCATION)" >> $@
|
||||||
|
endif # BOARD_AVB_VENDOR_KERNEL_BOOT_KEY_PATH
|
||||||
$(hide) echo "avb_recovery_add_hash_footer_args=$(BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS)" >> $@
|
$(hide) echo "avb_recovery_add_hash_footer_args=$(BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS)" >> $@
|
||||||
ifdef BOARD_AVB_RECOVERY_KEY_PATH
|
ifdef BOARD_AVB_RECOVERY_KEY_PATH
|
||||||
$(hide) echo "avb_recovery_key_path=$(BOARD_AVB_RECOVERY_KEY_PATH)" >> $@
|
$(hide) echo "avb_recovery_key_path=$(BOARD_AVB_RECOVERY_KEY_PATH)" >> $@
|
||||||
|
@ -5548,8 +5641,10 @@ ifdef INSTALLED_VENDOR_BOOTIMAGE_TARGET
|
||||||
$(call package_files-copy-root, \
|
$(call package_files-copy-root, \
|
||||||
$(TARGET_VENDOR_RAMDISK_OUT),$(zip_root)/VENDOR_BOOT/RAMDISK)
|
$(TARGET_VENDOR_RAMDISK_OUT),$(zip_root)/VENDOR_BOOT/RAMDISK)
|
||||||
ifdef INSTALLED_DTBIMAGE_TARGET
|
ifdef INSTALLED_DTBIMAGE_TARGET
|
||||||
|
ifneq ($(BUILDING_VENDOR_KERNEL_BOOT_IMAGE),true)
|
||||||
cp $(INSTALLED_DTBIMAGE_TARGET) $(zip_root)/VENDOR_BOOT/dtb
|
cp $(INSTALLED_DTBIMAGE_TARGET) $(zip_root)/VENDOR_BOOT/dtb
|
||||||
endif
|
endif
|
||||||
|
endif # end of INSTALLED_DTBIMAGE_TARGET
|
||||||
ifdef INTERNAL_VENDOR_BOOTCONFIG_TARGET
|
ifdef INTERNAL_VENDOR_BOOTCONFIG_TARGET
|
||||||
cp $(INTERNAL_VENDOR_BOOTCONFIG_TARGET) $(zip_root)/VENDOR_BOOT/vendor_bootconfig
|
cp $(INTERNAL_VENDOR_BOOTCONFIG_TARGET) $(zip_root)/VENDOR_BOOT/vendor_bootconfig
|
||||||
endif
|
endif
|
||||||
|
@ -5574,6 +5669,17 @@ ifdef INTERNAL_VENDOR_RAMDISK_FRAGMENTS
|
||||||
))
|
))
|
||||||
endif # INTERNAL_VENDOR_RAMDISK_FRAGMENTS != ""
|
endif # INTERNAL_VENDOR_RAMDISK_FRAGMENTS != ""
|
||||||
endif # INSTALLED_VENDOR_BOOTIMAGE_TARGET
|
endif # INSTALLED_VENDOR_BOOTIMAGE_TARGET
|
||||||
|
ifdef INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET
|
||||||
|
mkdir -p $(zip_root)/VENDOR_KERNEL_BOOT
|
||||||
|
$(call package_files-copy-root, \
|
||||||
|
$(TARGET_VENDOR_KERNEL_RAMDISK_OUT),$(zip_root)/VENDOR_KERNEL_BOOT/RAMDISK)
|
||||||
|
ifdef INSTALLED_DTBIMAGE_TARGET
|
||||||
|
cp $(INSTALLED_DTBIMAGE_TARGET) $(zip_root)/VENDOR_KERNEL_BOOT/dtb
|
||||||
|
endif
|
||||||
|
ifdef BOARD_KERNEL_PAGESIZE
|
||||||
|
echo "$(BOARD_KERNEL_PAGESIZE)" > $(zip_root)/VENDOR_KERNEL_BOOT/pagesize
|
||||||
|
endif
|
||||||
|
endif # INSTALLED_VENDOR_BOOTIMAGE_TARGET
|
||||||
ifdef BUILDING_SYSTEM_IMAGE
|
ifdef BUILDING_SYSTEM_IMAGE
|
||||||
@# Contents of the system image
|
@# Contents of the system image
|
||||||
$(hide) $(call package_files-copy-root, \
|
$(hide) $(call package_files-copy-root, \
|
||||||
|
|
|
@ -161,11 +161,15 @@ _board_strip_list += BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION
|
||||||
_board_strip_list += BOARD_AVB_VENDOR_BOOT_KEY_PATH
|
_board_strip_list += BOARD_AVB_VENDOR_BOOT_KEY_PATH
|
||||||
_board_strip_list += BOARD_AVB_VENDOR_BOOT_ALGORITHM
|
_board_strip_list += BOARD_AVB_VENDOR_BOOT_ALGORITHM
|
||||||
_board_strip_list += BOARD_AVB_VENDOR_BOOT_ROLLBACK_INDEX_LOCATION
|
_board_strip_list += BOARD_AVB_VENDOR_BOOT_ROLLBACK_INDEX_LOCATION
|
||||||
|
_board_strip_list += BOARD_AVB_VENDOR_KERNEL_BOOT_KEY_PATH
|
||||||
|
_board_strip_list += BOARD_AVB_VENDOR_KERNEL_BOOT_ALGORITHM
|
||||||
|
_board_strip_list += BOARD_AVB_VENDOR_KERNEL_BOOT_ROLLBACK_INDEX_LOCATION
|
||||||
_board_strip_list += BOARD_GKI_SIGNING_SIGNATURE_ARGS
|
_board_strip_list += BOARD_GKI_SIGNING_SIGNATURE_ARGS
|
||||||
_board_strip_list += BOARD_GKI_SIGNING_ALGORITHM
|
_board_strip_list += BOARD_GKI_SIGNING_ALGORITHM
|
||||||
_board_strip_list += BOARD_GKI_SIGNING_KEY_PATH
|
_board_strip_list += BOARD_GKI_SIGNING_KEY_PATH
|
||||||
_board_strip_list += BOARD_MKBOOTIMG_ARGS
|
_board_strip_list += BOARD_MKBOOTIMG_ARGS
|
||||||
_board_strip_list += BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE
|
_board_strip_list += BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE
|
||||||
|
_board_strip_list += BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE
|
||||||
_board_strip_list += ODM_MANIFEST_SKUS
|
_board_strip_list += ODM_MANIFEST_SKUS
|
||||||
|
|
||||||
|
|
||||||
|
@ -520,6 +524,25 @@ ifdef BOARD_BOOT_HEADER_VERSION
|
||||||
endif
|
endif
|
||||||
.KATI_READONLY := BUILDING_VENDOR_BOOT_IMAGE
|
.KATI_READONLY := BUILDING_VENDOR_BOOT_IMAGE
|
||||||
|
|
||||||
|
# Are we building a vendor kernel boot image
|
||||||
|
BUILDING_VENDOR_KERNEL_BOOT_IMAGE :=
|
||||||
|
ifeq ($(PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE),true)
|
||||||
|
ifneq ($(BUILDING_VENDOR_BOOT_IMAGE),true)
|
||||||
|
$(error BUILDING_VENDOR_BOOT_IMAGE is required, but BUILDING_VENDOR_BOOT_IMAGE is not true)
|
||||||
|
endif
|
||||||
|
ifndef BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE
|
||||||
|
$(error BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE is required when PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE is true)
|
||||||
|
endif
|
||||||
|
BUILDING_VENDOR_KERNEL_BOOT_IMAGE := true
|
||||||
|
else ifeq ($(PRODUCT_BUILD_VENDOR_KERNEL),)
|
||||||
|
ifdef BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE
|
||||||
|
ifeq ($(BUILDING_VENDOR_BOOT_IMAGE),true)
|
||||||
|
BUILDING_VENDOR_KERNEL_BOOT_IMAGE := true
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif # end of PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE
|
||||||
|
.KATI_READONLY := BUILDING_VENDOR_KERNEL_BOOT_IMAGE
|
||||||
|
|
||||||
# Are we building a ramdisk image
|
# Are we building a ramdisk image
|
||||||
BUILDING_RAMDISK_IMAGE := true
|
BUILDING_RAMDISK_IMAGE := true
|
||||||
ifeq ($(PRODUCT_BUILD_RAMDISK_IMAGE),)
|
ifeq ($(PRODUCT_BUILD_RAMDISK_IMAGE),)
|
||||||
|
|
|
@ -282,6 +282,7 @@ _odm_dlkm_path_placeholder := ||ODM_DLKM-PATH-PH||
|
||||||
_system_dlkm_path_placeholder := ||SYSTEM_DLKM-PATH-PH||
|
_system_dlkm_path_placeholder := ||SYSTEM_DLKM-PATH-PH||
|
||||||
TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder)
|
TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder)
|
||||||
TARGET_COPY_OUT_VENDOR_RAMDISK := vendor_ramdisk
|
TARGET_COPY_OUT_VENDOR_RAMDISK := vendor_ramdisk
|
||||||
|
TARGET_COPY_OUT_VENDOR_KERNEL_RAMDISK := vendor_kernel_ramdisk
|
||||||
TARGET_COPY_OUT_PRODUCT := $(_product_path_placeholder)
|
TARGET_COPY_OUT_PRODUCT := $(_product_path_placeholder)
|
||||||
# TODO(b/135957588) TARGET_COPY_OUT_PRODUCT_SERVICES will copy the target to
|
# TODO(b/135957588) TARGET_COPY_OUT_PRODUCT_SERVICES will copy the target to
|
||||||
# product
|
# product
|
||||||
|
@ -988,6 +989,7 @@ TARGET_SYSTEM_DLKM_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_DLKM)
|
||||||
.KATI_READONLY := TARGET_SYSTEM_DLKM_OUT
|
.KATI_READONLY := TARGET_SYSTEM_DLKM_OUT
|
||||||
|
|
||||||
TARGET_VENDOR_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR_RAMDISK)
|
TARGET_VENDOR_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR_RAMDISK)
|
||||||
|
TARGET_VENDOR_KERNEL_RAMDISK_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR_KERNEL_RAMDISK)
|
||||||
|
|
||||||
TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT)
|
TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT)
|
||||||
TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin
|
TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin
|
||||||
|
|
13
core/main.mk
13
core/main.mk
|
@ -1560,6 +1560,9 @@ vendorimage: $(INSTALLED_VENDORIMAGE_TARGET)
|
||||||
.PHONY: vendorbootimage
|
.PHONY: vendorbootimage
|
||||||
vendorbootimage: $(INSTALLED_VENDOR_BOOTIMAGE_TARGET)
|
vendorbootimage: $(INSTALLED_VENDOR_BOOTIMAGE_TARGET)
|
||||||
|
|
||||||
|
.PHONY: vendorkernelbootimage
|
||||||
|
vendorkernelbootimage: $(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET)
|
||||||
|
|
||||||
.PHONY: vendorbootimage_debug
|
.PHONY: vendorbootimage_debug
|
||||||
vendorbootimage_debug: $(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET)
|
vendorbootimage_debug: $(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET)
|
||||||
|
|
||||||
|
@ -1569,6 +1572,9 @@ vendorbootimage_test_harness: $(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET)
|
||||||
.PHONY: vendorramdisk
|
.PHONY: vendorramdisk
|
||||||
vendorramdisk: $(INSTALLED_VENDOR_RAMDISK_TARGET)
|
vendorramdisk: $(INSTALLED_VENDOR_RAMDISK_TARGET)
|
||||||
|
|
||||||
|
.PHONY: vendorkernelramdisk
|
||||||
|
vendorkernelramdisk: $(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET)
|
||||||
|
|
||||||
.PHONY: vendorramdisk_debug
|
.PHONY: vendorramdisk_debug
|
||||||
vendorramdisk_debug: $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET)
|
vendorramdisk_debug: $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET)
|
||||||
|
|
||||||
|
@ -1644,10 +1650,12 @@ droidcore-unbundled: $(filter $(HOST_OUT_ROOT)/%,$(modules_to_install)) \
|
||||||
$(INSTALLED_BPTIMAGE_TARGET) \
|
$(INSTALLED_BPTIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDORIMAGE_TARGET) \
|
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDOR_BOOTIMAGE_TARGET) \
|
$(INSTALLED_VENDOR_BOOTIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET) \
|
$(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDOR_TEST_HARNESS_RAMDISK_TARGET) \
|
$(INSTALLED_VENDOR_TEST_HARNESS_RAMDISK_TARGET) \
|
||||||
$(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET) \
|
$(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDOR_RAMDISK_TARGET) \
|
$(INSTALLED_VENDOR_RAMDISK_TARGET) \
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \
|
||||||
$(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \
|
$(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \
|
||||||
$(INSTALLED_ODMIMAGE_TARGET) \
|
$(INSTALLED_ODMIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDOR_DLKMIMAGE_TARGET) \
|
$(INSTALLED_VENDOR_DLKMIMAGE_TARGET) \
|
||||||
|
@ -1684,6 +1692,8 @@ droidcore-unbundled: $(filter $(HOST_OUT_ROOT)/%,$(modules_to_install)) \
|
||||||
$(INSTALLED_FILES_JSON_VENDOR_RAMDISK) \
|
$(INSTALLED_FILES_JSON_VENDOR_RAMDISK) \
|
||||||
$(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK) \
|
$(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK) \
|
||||||
$(INSTALLED_FILES_JSON_VENDOR_DEBUG_RAMDISK) \
|
$(INSTALLED_FILES_JSON_VENDOR_DEBUG_RAMDISK) \
|
||||||
|
$(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK) \
|
||||||
|
$(INSTALLED_FILES_JSON_VENDOR_KERNEL_RAMDISK) \
|
||||||
$(INSTALLED_FILES_FILE_ROOT) \
|
$(INSTALLED_FILES_FILE_ROOT) \
|
||||||
$(INSTALLED_FILES_JSON_ROOT) \
|
$(INSTALLED_FILES_JSON_ROOT) \
|
||||||
$(INSTALLED_FILES_FILE_RECOVERY) \
|
$(INSTALLED_FILES_FILE_RECOVERY) \
|
||||||
|
@ -1867,6 +1877,8 @@ else ifeq ($(TARGET_BUILD_UNBUNDLED),$(TARGET_BUILD_UNBUNDLED_IMAGE))
|
||||||
$(INSTALLED_FILES_JSON_DEBUG_RAMDISK) \
|
$(INSTALLED_FILES_JSON_DEBUG_RAMDISK) \
|
||||||
$(INSTALLED_FILES_FILE_VENDOR_RAMDISK) \
|
$(INSTALLED_FILES_FILE_VENDOR_RAMDISK) \
|
||||||
$(INSTALLED_FILES_JSON_VENDOR_RAMDISK) \
|
$(INSTALLED_FILES_JSON_VENDOR_RAMDISK) \
|
||||||
|
$(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK) \
|
||||||
|
$(INSTALLED_FILES_JSON_VENDOR_KERNEL_RAMDISK) \
|
||||||
$(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK) \
|
$(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK) \
|
||||||
$(INSTALLED_FILES_JSON_VENDOR_DEBUG_RAMDISK) \
|
$(INSTALLED_FILES_JSON_VENDOR_DEBUG_RAMDISK) \
|
||||||
$(INSTALLED_DEBUG_RAMDISK_TARGET) \
|
$(INSTALLED_DEBUG_RAMDISK_TARGET) \
|
||||||
|
@ -1878,6 +1890,7 @@ else ifeq ($(TARGET_BUILD_UNBUNDLED),$(TARGET_BUILD_UNBUNDLED_IMAGE))
|
||||||
$(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET) \
|
$(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDOR_RAMDISK_TARGET) \
|
$(INSTALLED_VENDOR_RAMDISK_TARGET) \
|
||||||
$(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \
|
$(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \
|
||||||
|
$(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -310,6 +310,7 @@ _product_single_value_vars += PRODUCT_BUILD_BOOT_IMAGE
|
||||||
_product_single_value_vars += PRODUCT_BUILD_INIT_BOOT_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_INIT_BOOT_IMAGE
|
||||||
_product_single_value_vars += PRODUCT_BUILD_DEBUG_BOOT_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_DEBUG_BOOT_IMAGE
|
||||||
_product_single_value_vars += PRODUCT_BUILD_VENDOR_BOOT_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_VENDOR_BOOT_IMAGE
|
||||||
|
_product_single_value_vars += PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE
|
||||||
_product_single_value_vars += PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE
|
||||||
_product_single_value_vars += PRODUCT_BUILD_VBMETA_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_VBMETA_IMAGE
|
||||||
_product_single_value_vars += PRODUCT_BUILD_SUPER_EMPTY_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_SUPER_EMPTY_IMAGE
|
||||||
|
|
|
@ -783,6 +783,7 @@ def AddImagesToTargetFiles(filename):
|
||||||
has_boot = OPTIONS.info_dict.get("no_boot") != "true"
|
has_boot = OPTIONS.info_dict.get("no_boot") != "true"
|
||||||
has_init_boot = OPTIONS.info_dict.get("init_boot") == "true"
|
has_init_boot = OPTIONS.info_dict.get("init_boot") == "true"
|
||||||
has_vendor_boot = OPTIONS.info_dict.get("vendor_boot") == "true"
|
has_vendor_boot = OPTIONS.info_dict.get("vendor_boot") == "true"
|
||||||
|
has_vendor_kernel_boot = OPTIONS.info_dict.get("vendor_kernel_boot") == "true"
|
||||||
|
|
||||||
# {vendor,odm,product,system_ext,vendor_dlkm,odm_dlkm, system_dlkm, system, system_other}.img
|
# {vendor,odm,product,system_ext,vendor_dlkm,odm_dlkm, system_dlkm, system, system_other}.img
|
||||||
# can be built from source, or dropped into target_files.zip as a prebuilt blob.
|
# can be built from source, or dropped into target_files.zip as a prebuilt blob.
|
||||||
|
@ -868,6 +869,19 @@ def AddImagesToTargetFiles(filename):
|
||||||
if output_zip:
|
if output_zip:
|
||||||
vendor_boot_image.AddToZip(output_zip)
|
vendor_boot_image.AddToZip(output_zip)
|
||||||
|
|
||||||
|
if has_vendor_kernel_boot:
|
||||||
|
banner("vendor_kernel_boot")
|
||||||
|
vendor_kernel_boot_image = common.GetVendorBootImage(
|
||||||
|
"IMAGES/vendor_kernel_boot.img", "vendor_kernel_boot.img", OPTIONS.input_tmp,
|
||||||
|
"VENDOR_KERNEL_BOOT")
|
||||||
|
if vendor_kernel_boot_image:
|
||||||
|
partitions['vendor_kernel_boot'] = os.path.join(OPTIONS.input_tmp, "IMAGES",
|
||||||
|
"vendor_kernel_boot.img")
|
||||||
|
if not os.path.exists(partitions['vendor_kernel_boot']):
|
||||||
|
vendor_kernel_boot_image.WriteToDir(OPTIONS.input_tmp)
|
||||||
|
if output_zip:
|
||||||
|
vendor_kernel_boot_image.AddToZip(output_zip)
|
||||||
|
|
||||||
recovery_image = None
|
recovery_image = None
|
||||||
if has_recovery:
|
if has_recovery:
|
||||||
banner("recovery")
|
banner("recovery")
|
||||||
|
|
Loading…
Reference in a new issue