Merge "Revert "Revert "Add prebuilt bootloader var and add bootloader t..."" am: 2ad69ab090
Original change: https://android-review.googlesource.com/c/platform/build/+/1412074 Change-Id: I5187d7afec3b7b08f6b62b6822a48a9d1713e654
This commit is contained in:
commit
fe24aafffe
|
@ -584,6 +584,10 @@ ALL_DEFAULT_INSTALLED_MODULES += $(event_log_tags_file)
|
|||
# #################################################################
|
||||
ifneq ($(strip $(TARGET_NO_BOOTLOADER)),true)
|
||||
INSTALLED_BOOTLOADER_MODULE := $(PRODUCT_OUT)/bootloader
|
||||
ifdef BOARD_PREBUILT_BOOTLOADER
|
||||
$(eval $(call copy-one-file,$(BOARD_PREBUILT_BOOTLOADER),$(INSTALLED_BOOTLOADER_MODULE)))
|
||||
$(call dist-for-goals,dist_files,$(INSTALLED_BOOTLOADER_MODULE))
|
||||
endif # BOARD_PREBUILT_BOOTLOADER
|
||||
ifeq ($(strip $(TARGET_BOOTLOADER_IS_2ND)),true)
|
||||
INSTALLED_2NDBOOTLOADER_TARGET := $(PRODUCT_OUT)/2ndbootloader
|
||||
else
|
||||
|
@ -4156,6 +4160,9 @@ endif
|
|||
ifdef DEVICE_MANIFEST_FILE
|
||||
$(hide) echo "vintf_include_empty_vendor_sku=true" >> $@
|
||||
endif
|
||||
ifeq ($(BOARD_BOOTLOADER_IN_UPDATE_PACKAGE),true)
|
||||
$(hide) echo "bootloader_in_update_package=true" >> $@
|
||||
endif
|
||||
|
||||
.PHONY: misc_info
|
||||
misc_info: $(INSTALLED_MISC_INFO_TARGET)
|
||||
|
@ -4312,6 +4319,10 @@ MK_VBMETA_BOOT_KERNEL_CMDLINE_SH := device/generic/goldfish/tools/mk_vbmeta_boot
|
|||
$(BUILT_TARGET_FILES_PACKAGE): $(MK_VBMETA_BOOT_KERNEL_CMDLINE_SH)
|
||||
endif
|
||||
|
||||
ifdef BOARD_PREBUILT_BOOTLOADER
|
||||
$(BUILT_TARGET_FILES_PACKAGE): $(INSTALLED_BOOTLOADER_MODULE)
|
||||
endif
|
||||
|
||||
# Depending on the various images guarantees that the underlying
|
||||
# directories are up-to-date.
|
||||
$(BUILT_TARGET_FILES_PACKAGE): \
|
||||
|
@ -4605,6 +4616,10 @@ ifdef BOARD_PREBUILT_DTBOIMAGE
|
|||
$(hide) mkdir -p $(zip_root)/PREBUILT_IMAGES
|
||||
$(hide) cp $(INSTALLED_DTBOIMAGE_TARGET) $(zip_root)/PREBUILT_IMAGES/
|
||||
endif # BOARD_PREBUILT_DTBOIMAGE
|
||||
ifdef BOARD_PREBUILT_BOOTLOADER
|
||||
$(hide) mkdir -p $(zip_root)/IMAGES
|
||||
$(hide) cp $(INSTALLED_BOOTLOADER_MODULE) $(zip_root)/IMAGES/
|
||||
endif
|
||||
ifneq ($(strip $(BOARD_CUSTOMIMAGES_PARTITION_LIST)),)
|
||||
$(hide) mkdir -p $(zip_root)/PREBUILT_IMAGES
|
||||
$(hide) $(foreach partition,$(BOARD_CUSTOMIMAGES_PARTITION_LIST), \
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
# ###############################################################
|
||||
|
||||
_board_strip_readonly_list := \
|
||||
BOARD_BOOTLOADER_IN_UPDATE_PACKAGE \
|
||||
BOARD_EGL_CFG \
|
||||
BOARD_HAVE_BLUETOOTH \
|
||||
BOARD_INSTALLER_CMDLINE \
|
||||
|
|
|
@ -58,6 +58,7 @@ OPTIONS = common.OPTIONS
|
|||
OPTIONS.additional_entries = []
|
||||
OPTIONS.bootable_only = False
|
||||
OPTIONS.put_super = None
|
||||
OPTIONS.put_bootloader = None
|
||||
OPTIONS.dynamic_partition_list = None
|
||||
OPTIONS.super_device_list = None
|
||||
OPTIONS.retrofit_dap = None
|
||||
|
@ -75,6 +76,7 @@ def LoadOptions(input_file):
|
|||
info = OPTIONS.info_dict = common.LoadInfoDict(input_zip)
|
||||
|
||||
OPTIONS.put_super = info.get('super_image_in_update_package') == 'true'
|
||||
OPTIONS.put_bootloader = info.get('bootloader_in_update_package') == 'true'
|
||||
OPTIONS.dynamic_partition_list = info.get('dynamic_partition_list',
|
||||
'').strip().split()
|
||||
OPTIONS.super_device_list = info.get('super_block_devices',
|
||||
|
@ -122,9 +124,11 @@ def EntriesForUserImages(input_file):
|
|||
|
||||
for image_path in [name for name in namelist if name.startswith('IMAGES/')]:
|
||||
image = os.path.basename(image_path)
|
||||
if OPTIONS.bootable_only and image not in ('boot.img', 'recovery.img'):
|
||||
if OPTIONS.bootable_only and image not in('boot.img', 'recovery.img', 'bootloader'):
|
||||
continue
|
||||
if not image.endswith('.img'):
|
||||
if not image.endswith('.img') and image != 'bootloader':
|
||||
continue
|
||||
if image == 'bootloader' and not OPTIONS.put_bootloader:
|
||||
continue
|
||||
# Filter out super_empty and the images that are already in super partition.
|
||||
if OPTIONS.put_super:
|
||||
|
|
Loading…
Reference in New Issue