mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
boot/uboot: add support for bundling ATF BL31 in ELF format into U-Boot
Rockchip's rk3328 encapsulates the BL31 part of ATP but it needs image in ELF format. This is extension to 2c4809e6088660dc71de9de8cee0bba312aafbe4 This commit introduces a BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF variable to achieve this. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
f6a6eca432
commit
cab8bd3b46
@ -97,6 +97,13 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += RESET_TO_BL31=1
|
|||||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-uboot-tools
|
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-uboot-tools
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y)
|
||||||
|
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF
|
||||||
|
$(INSTALL) -D -m 0644 $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31/bl31.elf \
|
||||||
|
$(BINARIES_DIR)/bl31.elf
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
|
define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
|
||||||
$(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL)
|
$(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL)
|
||||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
|
||||||
@ -107,6 +114,7 @@ endef
|
|||||||
define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS
|
define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS
|
||||||
cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/*.bin $(BINARIES_DIR)/
|
cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/*.bin $(BINARIES_DIR)/
|
||||||
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL)
|
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL)
|
||||||
|
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Configuration check
|
# Configuration check
|
||||||
|
@ -179,6 +179,19 @@ config BR2_TARGET_UBOOT_NEEDS_ATF_BL31
|
|||||||
variable pointing to ATF's BL31 binary, is passed during the
|
variable pointing to ATF's BL31 binary, is passed during the
|
||||||
Buildroot build.
|
Buildroot build.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "U-Boot ATF BL31 format"
|
||||||
|
depends on BR2_TARGET_UBOOT_NEEDS_ATF_BL31
|
||||||
|
default BR2_TARGET_UBOOT_NEEDS_ATF_BL31_BIN
|
||||||
|
|
||||||
|
config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_BIN
|
||||||
|
bool "bl31.bin"
|
||||||
|
|
||||||
|
config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF
|
||||||
|
bool "bl31.elf"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
menu "U-Boot binary format"
|
menu "U-Boot binary format"
|
||||||
|
|
||||||
config BR2_TARGET_UBOOT_FORMAT_AIS
|
config BR2_TARGET_UBOOT_FORMAT_AIS
|
||||||
|
@ -137,8 +137,12 @@ UBOOT_MAKE_OPTS += \
|
|||||||
|
|
||||||
ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y)
|
ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y)
|
||||||
UBOOT_DEPENDENCIES += arm-trusted-firmware
|
UBOOT_DEPENDENCIES += arm-trusted-firmware
|
||||||
|
ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y)
|
||||||
|
UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.elf
|
||||||
|
else
|
||||||
UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin
|
UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
|
ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
|
||||||
UBOOT_DEPENDENCIES += host-dtc
|
UBOOT_DEPENDENCIES += host-dtc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user