2019-04-15 09:45:53 +00:00
|
|
|
#
|
|
|
|
# Copyright 2019 NXP
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=tfa-layerscape
|
2020-03-11 08:28:35 +00:00
|
|
|
PKG_VERSION:=LSDK-20.04
|
2019-04-15 09:45:53 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
|
|
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/atf
|
2020-03-11 08:28:35 +00:00
|
|
|
PKG_SOURCE_VERSION:=4a82c939a0211196e2b80a495f966383803753bb
|
|
|
|
PKG_MIRROR_HASH:=31c264551ce800b646d7dcc5baa62cfbb4c8fa3299a93931c7ef71dc3e88380d
|
|
|
|
PKG_BUILD_DEPENDS:=tfa-layerscape/host
|
2019-04-15 09:45:53 +00:00
|
|
|
|
2019-07-24 14:00:39 +00:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
2019-04-15 09:45:53 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2019-07-24 14:00:39 +00:00
|
|
|
HOST_CFLAGS += -Wall -Werror -pedantic -std=c99
|
|
|
|
define Host/Compile
|
|
|
|
$(MAKE) -C \
|
|
|
|
$(HOST_BUILD_DIR)/tools/fiptool \
|
|
|
|
CFLAGS="$(HOST_CFLAGS)" \
|
|
|
|
LDFLAGS="$(HOST_LDFLAGS)"
|
2019-07-26 08:23:53 +00:00
|
|
|
$(MAKE) -C \
|
|
|
|
$(HOST_BUILD_DIR)/plat/nxp/tools \
|
|
|
|
CFLAGS="$(HOST_CFLAGS)"
|
2019-07-24 14:00:39 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
2019-07-26 08:23:53 +00:00
|
|
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/tfa-fiptool
|
|
|
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/plat/nxp/tools/create_pbl $(STAGING_DIR_HOST)/bin/tfa-create-pbl
|
|
|
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/plat/nxp/tools/byte_swap $(STAGING_DIR_HOST)/bin/tfa-byte-swap
|
2019-04-15 09:45:53 +00:00
|
|
|
endef
|
|
|
|
|
layerscape: resurrect support for FRDM-LS1012A
Re-add support for NXP FRDM-LS1012A, which mimics the flash layout of the
rest boards supported by LSDK.
0x000000000000-0x000000100000 : "bl2"
0x000000100000-0x000000500000 : "fip"
0x000000500000-0x000000600000 : "u-boot-env"
0x000000600000-0x000000a00000 : "reserved-1"
0x000000a00000-0x000000d00000 : "pfe"
0x000000d00000-0x000000f00000 : "reserved-2"
0x000000f00000-0x000001000000 : "dtb"
0x000001000000-0x000002000000 : "kernel"
0x000002000000-0x000004000000 : "ubifs"
Specification
SoC: LS1012A single core 800MHz
RAM: 512 MB DDR3
Flash: 64 MB QSPI NOR
Ethernet: 2x 10/100/1000 Mbps
Connectors: µUSB 3.0 OTG
µUSB 2.0 (debugging & power input)
2x 3.5mm jack for microphone & headphone (SGTL5000)
Arduino Shield expansion with I2C, SPI, UART, and GPIO
JTAG
LEDS: 3x (non-configurable)
Buttons: 1x (reset, non-configurable)
Be advised that erasing or writing 64MB flash takes some time to finish.
Do not reset the board until all operations end with success, otherwise
You'll need external tools to re-program the flash chip.
Installation
Follow the QSPI programing procedure for LS1012AFRWY board in
target/linux/layerscape/README, point 3.3.
Don't forget about updating U-Boot environment with MAC addresses of
ethernet interfaces, variable 'ethaddr' for eth0 and 'eth1addr' for eth1.
As the LSDK images do not support sysupgrade, nor do changes in this
commit, it's planed in upcoming submissions.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2020-02-25 19:07:36 +00:00
|
|
|
define Package/tfa-layerscape/ls1012afrdm
|
|
|
|
TITLE:=NXP LS1012AFRDM Trusted Firmware
|
|
|
|
PLAT:=ls1012afrdm
|
|
|
|
BOOT_MODE:=qspi
|
|
|
|
BIN_BL2:=build/ls1012afrdm/release/bl2_qspi.pbl
|
|
|
|
BIN_FIP:=build/ls1012afrdm/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
2019-04-15 09:45:53 +00:00
|
|
|
define Package/tfa-layerscape/ls1012ardb
|
|
|
|
TITLE:=NXP LS1012ARDB Trusted Firmware
|
|
|
|
PLAT:=ls1012ardb
|
|
|
|
BOOT_MODE:=qspi
|
|
|
|
BIN_BL2:=build/ls1012ardb/release/bl2_qspi.pbl
|
|
|
|
BIN_FIP:=build/ls1012ardb/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tfa-layerscape/ls1012afrwy
|
|
|
|
TITLE:=NXP LS1012AFRWY Trusted Firmware
|
|
|
|
PLAT:=ls1012afrwy
|
|
|
|
BOOT_MODE:=qspi
|
|
|
|
BIN_BL2:=build/ls1012afrwy/release/bl2_qspi.pbl
|
|
|
|
BIN_FIP:=build/ls1012afrwy/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tfa-layerscape/ls1043ardb
|
|
|
|
TITLE:=NXP LS1043ARDB Trusted Firmware
|
|
|
|
PLAT:=ls1043ardb
|
|
|
|
BOOT_MODE:=nor
|
|
|
|
BIN_BL2:=build/ls1043ardb/release/bl2_nor.pbl
|
|
|
|
BIN_FIP:=build/ls1043ardb/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tfa-layerscape/ls1043ardb-sdboot
|
|
|
|
TITLE:=NXP LS1043ARDB SD Boot Trusted Firmware
|
|
|
|
PLAT:=ls1043ardb
|
|
|
|
BOOT_MODE:=sd
|
|
|
|
BIN_BL2:=build/ls1043ardb/release/bl2_sd.pbl
|
|
|
|
BIN_FIP:=build/ls1043ardb/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tfa-layerscape/ls1046ardb
|
|
|
|
TITLE:=NXP LS1046ARDB Trusted Firmware
|
|
|
|
PLAT:=ls1046ardb
|
|
|
|
BOOT_MODE:=qspi
|
|
|
|
BIN_BL2:=build/ls1046ardb/release/bl2_qspi.pbl
|
|
|
|
BIN_FIP:=build/ls1046ardb/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tfa-layerscape/ls1046ardb-sdboot
|
|
|
|
TITLE:=NXP LS1046ARDB SD Boot Trusted Firmware
|
|
|
|
PLAT:=ls1046ardb
|
|
|
|
BOOT_MODE:=sd
|
|
|
|
BIN_BL2:=build/ls1046ardb/release/bl2_sd.pbl
|
|
|
|
BIN_FIP:=build/ls1046ardb/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tfa-layerscape/ls1088ardb
|
|
|
|
TITLE:=NXP LS1088ARDB Trusted Firmware
|
|
|
|
PLAT:=ls1088ardb
|
|
|
|
BOOT_MODE:=qspi
|
|
|
|
BIN_BL2:=build/ls1088ardb/release/bl2_qspi.pbl
|
|
|
|
BIN_FIP:=build/ls1088ardb/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tfa-layerscape/ls1088ardb-sdboot
|
|
|
|
TITLE:=NXP LS1088ARDB SD Boot Trusted Firmware
|
|
|
|
PLAT:=ls1088ardb
|
|
|
|
BOOT_MODE:=sd
|
|
|
|
BIN_BL2:=build/ls1088ardb/release/bl2_sd.pbl
|
|
|
|
BIN_FIP:=build/ls1088ardb/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tfa-layerscape/ls2088ardb
|
|
|
|
TITLE:=NXP LS2088ARDB Trusted Firmware
|
|
|
|
PLAT:=ls2088ardb
|
|
|
|
BOOT_MODE:=nor
|
|
|
|
BIN_BL2:=build/ls2088ardb/release/bl2_nor.pbl
|
|
|
|
BIN_FIP:=build/ls2088ardb/release/fip.bin
|
|
|
|
endef
|
|
|
|
|
2020-03-11 08:28:35 +00:00
|
|
|
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
|
|
|
|
|
2019-04-15 09:45:53 +00:00
|
|
|
TFAS := \
|
layerscape: resurrect support for FRDM-LS1012A
Re-add support for NXP FRDM-LS1012A, which mimics the flash layout of the
rest boards supported by LSDK.
0x000000000000-0x000000100000 : "bl2"
0x000000100000-0x000000500000 : "fip"
0x000000500000-0x000000600000 : "u-boot-env"
0x000000600000-0x000000a00000 : "reserved-1"
0x000000a00000-0x000000d00000 : "pfe"
0x000000d00000-0x000000f00000 : "reserved-2"
0x000000f00000-0x000001000000 : "dtb"
0x000001000000-0x000002000000 : "kernel"
0x000002000000-0x000004000000 : "ubifs"
Specification
SoC: LS1012A single core 800MHz
RAM: 512 MB DDR3
Flash: 64 MB QSPI NOR
Ethernet: 2x 10/100/1000 Mbps
Connectors: µUSB 3.0 OTG
µUSB 2.0 (debugging & power input)
2x 3.5mm jack for microphone & headphone (SGTL5000)
Arduino Shield expansion with I2C, SPI, UART, and GPIO
JTAG
LEDS: 3x (non-configurable)
Buttons: 1x (reset, non-configurable)
Be advised that erasing or writing 64MB flash takes some time to finish.
Do not reset the board until all operations end with success, otherwise
You'll need external tools to re-program the flash chip.
Installation
Follow the QSPI programing procedure for LS1012AFRWY board in
target/linux/layerscape/README, point 3.3.
Don't forget about updating U-Boot environment with MAC addresses of
ethernet interfaces, variable 'ethaddr' for eth0 and 'eth1addr' for eth1.
As the LSDK images do not support sysupgrade, nor do changes in this
commit, it's planed in upcoming submissions.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2020-02-25 19:07:36 +00:00
|
|
|
ls1012afrdm \
|
2019-04-15 09:45:53 +00:00
|
|
|
ls1012ardb \
|
|
|
|
ls1012afrwy \
|
|
|
|
ls1043ardb \
|
|
|
|
ls1043ardb-sdboot \
|
|
|
|
ls1046ardb \
|
|
|
|
ls1046ardb-sdboot \
|
|
|
|
ls1088ardb \
|
|
|
|
ls1088ardb-sdboot \
|
|
|
|
ls2088ardb
|
|
|
|
|
2019-07-24 14:00:39 +00:00
|
|
|
$(eval $(call HostBuild))
|
2019-04-15 09:45:53 +00:00
|
|
|
$(foreach tfa,$(TFAS), \
|
2020-03-11 08:28:35 +00:00
|
|
|
$(eval $(Package/tfa-layerscape/$(tfa))) \
|
|
|
|
$(eval $(call Package/tfa-layerscape/Config,$(tfa),$(TITLE),$(BIN_BL2),$(BIN_FIP))) \
|
|
|
|
$(eval $(call BuildPackage,tfa-$(tfa))) \
|
2019-04-15 09:45:53 +00:00
|
|
|
)
|