mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 13:16:35 +00:00
arm-trusted-firmware: generate atf-uboot.ub image of bl31.bin
U-Boot SPL for the Xilinx ZynqMP SoCs needs ATF in this format to load it. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
895f04ebff
commit
61447331bd
@ -71,6 +71,14 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31
|
|||||||
typically used on platforms where another bootloader (e.g
|
typically used on platforms where another bootloader (e.g
|
||||||
U-Boot) encapsulates ATF BL31.
|
U-Boot) encapsulates ATF BL31.
|
||||||
|
|
||||||
|
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT
|
||||||
|
bool "Build BL31 U-Boot image"
|
||||||
|
select BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31
|
||||||
|
help
|
||||||
|
Generates a U-Boot image named atf-uboot.ub containing
|
||||||
|
bl31.bin. This is used for example by the Xilinx version of
|
||||||
|
U-Boot SPL to load ATF on the ZynqMP SoC.
|
||||||
|
|
||||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
|
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
|
||||||
bool "Use U-Boot as BL33"
|
bool "Use U-Boot as BL33"
|
||||||
depends on BR2_TARGET_UBOOT
|
depends on BR2_TARGET_UBOOT
|
||||||
|
@ -75,15 +75,36 @@ ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31),y)
|
|||||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += bl31
|
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += bl31
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT),y)
|
||||||
|
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD
|
||||||
|
# Get the entry point address from the elf.
|
||||||
|
BASE_ADDR=$$($(TARGET_READELF) -h $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31/bl31.elf | \
|
||||||
|
sed -r '/^ Entry point address:\s*(.*)/!d; s//\1/') && \
|
||||||
|
$(HOST_DIR)/bin/mkimage \
|
||||||
|
-A arm64 -O arm-trusted-firmware -C none \
|
||||||
|
-a $${BASE_ADDR} -e $${BASE_ADDR} \
|
||||||
|
-d $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31.bin \
|
||||||
|
$(ARM_TRUSTED_FIRMWARE_IMG_DIR)/atf-uboot.ub
|
||||||
|
endef
|
||||||
|
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL
|
||||||
|
$(INSTALL) -m 0644 $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/atf-uboot.ub \
|
||||||
|
$(BINARIES_DIR)/atf-uboot.ub
|
||||||
|
endef
|
||||||
|
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += RESET_TO_BL31=1
|
||||||
|
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-uboot-tools
|
||||||
|
endif
|
||||||
|
|
||||||
define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
|
define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
|
||||||
$(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL)
|
$(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL)
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
$(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
|
$(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
|
||||||
$(ARM_TRUSTED_FIRMWARE_MAKE_TARGETS)
|
$(ARM_TRUSTED_FIRMWARE_MAKE_TARGETS)
|
||||||
|
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD)
|
||||||
endef
|
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)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Configuration check
|
# Configuration check
|
||||||
|
Loading…
x
Reference in New Issue
Block a user