[build] Config PATH for 2ndbootloader and 3ndbootloader to pack images correctly

To pack dtb to boot.img and recovery.img correctly

Signed-off-by: Firefly <service@t-firefly.com>
This commit is contained in:
Firefly
2015-11-20 15:39:12 +08:00
committed by cjp
parent 440d3c0a15
commit e93ebb2cb1
2 changed files with 35 additions and 0 deletions

View File

@ -480,6 +480,13 @@ INTERNAL_BOOTIMAGE_ARGS += \
$(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET))
endif
ifeq ($(TARGET_BOARD_PLATFORM),sofia3gr)
ifeq ($(strip $(TARGET_BOOTLOADER_IS_3ND)),true)
INTERNAL_BOOTIMAGE_ARGS += \
$(addprefix --third ,$(INSTALLED_3NDBOOTLOADER_TARGET))
endif
endif
INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS))
BOARD_KERNEL_CMDLINE := $(strip $(BOARD_KERNEL_CMDLINE))
@ -906,8 +913,12 @@ $(RECOVERY_INSTALL_OTA_KEYS): $(OTA_PUBLIC_KEYS) $(DUMPKEY_JAR) $(extra_keys) $(
java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) $(extra_keys) $(RADICAL_UPDATE_CERT) > $@
ifeq ($(strip $(TARGET_BOOTLOADER_IS_2ND)),true)
ifeq ($(TARGET_BOARD_PLATFORM),sofia3gr)
$(INSTALLED_RECOVERYIMAGE_TARGET): $(INSTALLED_2NDBOOTLOADER_RECOVERY_TARGET)
else
$(INSTALLED_RECOVERYIMAGE_TARGET): $(INSTALLED_2NDBOOTLOADER_TARGET)
endif
endif
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \
$(INSTALLED_RAMDISK_TARGET) \
$(INSTALLED_BOOTIMAGE_TARGET) \
@ -1445,9 +1456,14 @@ ifdef INSTALLED_KERNEL_TARGET
$(hide) $(ACP) $(INSTALLED_KERNEL_TARGET) $(zip_root)/RECOVERY/kernel
endif
ifdef INSTALLED_2NDBOOTLOADER_TARGET
ifeq ($(TARGET_BOARD_PLATFORM),sofia3gr)
$(hide) $(ACP) \
$(INSTALLED_2NDBOOTLOADER_RECOVERY_TARGET) $(zip_root)/RECOVERY/second
else
$(hide) $(ACP) \
$(INSTALLED_2NDBOOTLOADER_TARGET) $(zip_root)/RECOVERY/second
endif
endif
ifdef BOARD_KERNEL_CMDLINE
$(hide) echo "$(BOARD_KERNEL_CMDLINE)" > $(zip_root)/RECOVERY/cmdline
endif
@ -1468,6 +1484,14 @@ ifdef INSTALLED_2NDBOOTLOADER_TARGET
$(hide) $(ACP) \
$(INSTALLED_2NDBOOTLOADER_TARGET) $(zip_root)/BOOT/second
endif
ifdef INSTALLED_3NDBOOTLOADER_TARGET
ifeq ($(TARGET_BOARD_PLATFORM),sofia3gr)
$(hide) $(ACP) \
$(INSTALLED_3NDBOOTLOADER_TARGET) $(zip_root)/BOOT/third
endif
endif
ifdef BOARD_KERNEL_CMDLINE
$(hide) echo "$(BOARD_KERNEL_CMDLINE)" > $(zip_root)/BOOT/cmdline
endif

View File

@ -348,6 +348,17 @@ def BuildBootableImage(sourcedir, fs_config_file, info_dict=None):
if os.access(fn, os.F_OK):
cmd.append("--pagesize")
cmd.append(open(fn).read().rstrip("\n"))
fn = os.path.join(sourcedir, "second")
if os.access(fn, os.F_OK):
cmd.append("--second")
cmd.append(fn)
fn = os.path.join(sourcedir, "third")
if os.access(fn, os.F_OK):
cmd.append("--third")
cmd.append(fn)
args = info_dict.get("mkbootimg_args", None)
if args and args.strip():