Commit 4168eb85 authored by Grant Likely's avatar Grant Likely
Browse files

Generalize using U-Boot SPL for BL2

Generalize the config for using U-Boot SPL instead of TF-A BL2. This
simplifies the Rockchip rk3399 support as well as makes it easier to
bring up other boards using CONFIG_SPL

Signed-off-by: Grant Likely's avatarGrant Likely <>
parent 415d7dd8
......@@ -11,12 +11,6 @@ OPTEE_PLATFORM := rockchip
FLASH_IMAGE := $(UBOOT_OUTPUT)/flash_image.bin
# On the rk3399, U-Boot instead of TF-A builds the final firmware package, and
# only BL31 is taken from the TFA build. Swap around the dependencies so that
# U-Boot depends on tfa/bl31, and the BL31 image is passed to the U-Boot build
u-boot/all: tfa/bl31
ifeq ($(CONFIG_OPTEE),y)
UBOOT_EXTRA += TEE=$(OPTEE_OUTPUT)/arm-plat-rockchip/core/tee.elf
u-boot/all: optee_os/all
......@@ -238,7 +238,7 @@ TFA_EXTRA += BL32_EXTRA2=$(OPTEE_OUTPUT)/arm-plat-vexpress/core/tee-pageable_v2.
TFA_EXTRA += SPD=opteed
tfa/all tfa/fip: optee_os/all
FIP_DEPS += optee_os/all
endif # ifeq($(CONFIG_OPTEE),y)
......@@ -248,11 +248,22 @@ TFA_EXTRA += LOG_LEVEL=20
TFA_EXTRA += BL33=$(UBOOT_OUTPUT)/u-boot.bin
FLASH_IMAGE ?= $(TFA_OUTPUT)/$(TFA_PLAT)/release/flash-image.bin
FLASH_IMAGE_DEPS ?= tfa/all tfa/fip
SD_IMAGE := $(subst ",,$(CONFIG_SYS_CONFIG_NAME))-sdcard.img
ESP_SIZE ?= $$((64*1024*1024))
ESP_OFFSET ?= $$((4*1024*1024))
# Choose who provides BL2. If CONFIG_SPL is enabled, then U-Boot is acting as
# BL2. Otherwise TF-A BL2 will be used. Set up the dependencies for the
# selected approach
# FIP_DEPS are the targets requried to create the FIP or FIT
ifeq ($(CONFIG_SPL),y)
u-boot/all: $(FIP_DEPS) tfa/bl31 # U-Boot SPL BL2
FLASH_IMAGE_DEPS := u-boot/all
tfa/fip: $(FIP_DEPS) u-boot/all tfa/all # TF-A BL2
endif # ifeq($(CONFIG_SPL),y)
endif # ifeq ($(dot-config),1)
ifneq ($(DTB_TARGET),)
......@@ -299,8 +310,6 @@ optee_os/%:
tfa/all tfa/fip: u-boot/all
endif #ifeq,else ($(config-targets),1)
# ================================================
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment