Skip to content

Commit

Permalink
layerscape: update tfa to LSDK-20.04
Browse files Browse the repository at this point in the history
Update tfa package to latest LSDK-20.04 dropping one patch
which had already been integrated.

Add fixes,
- Fix DEPENDS/PKG_BUILD_DEPENDS.
- Remove HIDDEN:=1.
- Move intermediate files installing into Build/InstallDev.

Signed-off-by: Yangbo Lu <[email protected]>
  • Loading branch information
yangbolu1991 authored and ynezz committed May 7, 2020
1 parent f9155a9 commit 12bc408
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 70 deletions.
76 changes: 36 additions & 40 deletions package/boot/tfa-layerscape/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,18 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=tfa-layerscape
PKG_VERSION:=lsdk-1903
PKG_VERSION:=LSDK-20.04
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/atf
PKG_SOURCE_VERSION:=7e34aebe658c7c3439d2d68b0ce6b9776e8e6996
PKG_MIRROR_HASH:=9cf0bc32fa589a0ee7c48c87898679e645341f29da1253d0ba5d2e82c6ea074d
PKG_BUILD_DEPENDS:=uboot-layerscape tfa-layerscape/host
PKG_SOURCE_VERSION:=4a82c939a0211196e2b80a495f966383803753bb
PKG_MIRROR_HASH:=31c264551ce800b646d7dcc5baa62cfbb4c8fa3299a93931c7ef71dc3e88380d
PKG_BUILD_DEPENDS:=tfa-layerscape/host

include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk

define Package/tfa-layerscape/Config
define Package/tfa-$(1)
SECTION:=boot
CATEGORY:=Boot Loaders
TITLE:=$(2)
DEPENDS:=@TARGET_layerscape_armv8_64b +layerscape-rcw
HIDDEN:=1
VARIANT:=$(1)
BIN_BL2:=$(3)
BIN_FIP:=$(4)
endef
endef

define Package/tfa-layerscape/Install
define Package/tfa-$(1)/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/$(BIN_BL2) $(STAGING_DIR_IMAGE)/$(1)-bl2.pbl
$(CP) $(PKG_BUILD_DIR)/$(BIN_FIP) $(STAGING_DIR_IMAGE)/$(1)-fip.bin
endef
endef

define Build/Compile
$(eval $(Package/tfa-layerscape/$(BUILD_VARIANT))) \
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS) \
fip pbl PLAT=$(PLAT) BOOT_MODE=$(BOOT_MODE) \
RCW=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-rcw.bin \
BL33=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin \
FIPTOOL=$(STAGING_DIR_HOST)/bin/tfa-fiptool \
CREATE_PBL=$(STAGING_DIR_HOST)/bin/tfa-create-pbl \
BYTE_SWAP=$(STAGING_DIR_HOST)/bin/tfa-byte-swap
endef

HOST_CFLAGS += -Wall -Werror -pedantic -std=c99
define Host/Compile
$(MAKE) -C \
Expand Down Expand Up @@ -149,6 +117,35 @@ define Package/tfa-layerscape/ls2088ardb
BIN_FIP:=build/ls2088ardb/release/fip.bin
endef

define Package/tfa-layerscape/Config
define Package/tfa-$(1)
SECTION:=boot
CATEGORY:=Boot Loaders
TITLE:=$(2)
DEPENDS:=@TARGET_layerscape_armv8_64b +layerscape-rcw +u-boot-$(1)
VARIANT:=$(1)
BIN_BL2:=$(3)
BIN_FIP:=$(4)
endef
endef

define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/$(BIN_BL2) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl2.pbl
$(CP) $(PKG_BUILD_DIR)/$(BIN_FIP) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-fip.bin
endef

define Build/Compile
$(eval $(Package/tfa-layerscape/$(BUILD_VARIANT))) \
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS) \
fip pbl PLAT=$(PLAT) BOOT_MODE=$(BOOT_MODE) \
RCW=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-rcw.bin \
BL33=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin \
FIPTOOL=$(STAGING_DIR_HOST)/bin/tfa-fiptool \
CREATE_PBL=$(STAGING_DIR_HOST)/bin/tfa-create-pbl \
BYTE_SWAP=$(STAGING_DIR_HOST)/bin/tfa-byte-swap
endef

TFAS := \
ls1012afrdm \
ls1012ardb \
Expand All @@ -163,8 +160,7 @@ TFAS := \

$(eval $(call HostBuild))
$(foreach tfa,$(TFAS), \
$(eval $(Package/tfa-layerscape/$(tfa))) \
$(eval $(call Package/tfa-layerscape/Config,$(tfa),$(TITLE),$(BIN_BL2),$(BIN_FIP))) \
$(eval $(call Package/tfa-layerscape/Install,$(tfa))) \
$(eval $(call BuildPackage,tfa-$(tfa))) \
$(eval $(Package/tfa-layerscape/$(tfa))) \
$(eval $(call Package/tfa-layerscape/Config,$(tfa),$(TITLE),$(BIN_BL2),$(BIN_FIP))) \
$(eval $(call BuildPackage,tfa-$(tfa))) \
)

This file was deleted.

0 comments on commit 12bc408

Please sign in to comment.