diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-10-02 22:21:57 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-10-02 22:25:59 +0300 |
commit | 286d45cc649a5b852a27b48e61b51bf75e9d1cee (patch) | |
tree | 90095cb0d2c571fd8de164caf2ca2f2e4d3f7247 /meta-xilinx/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware | |
parent | d4b38429f6dec208547bf3d250a0c06f5d0fbcb2 (diff) | |
download | openbmc-286d45cc649a5b852a27b48e61b51bf75e9d1cee.tar.xz |
Add meta-xilinx subtree
Import git://git.yoctoproject.org/meta-xilinx from 5fccc46503 as
meta-xilinx subtree.
Change-Id: I3d59bcf3a57cee588aab7f5cdd0287af66450c8a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware')
2 files changed, 76 insertions, 0 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc new file mode 100644 index 000000000..02bbc7326 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc @@ -0,0 +1,69 @@ +DESCRIPTION = "ARM Trusted Firmware" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://license.rst;md5=33065335ea03d977d0569f270b39603e" + +PROVIDES = "virtual/arm-trusted-firmware" + +inherit deploy + +DEPENDS += "u-boot-mkimage-native" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" + +XILINX_RELEASE_VERSION ?= "" +ATF_VERSION ?= "1.4" +ATF_VERSION_EXTENSION ?= "-xilinx-${XILINX_RELEASE_VERSION}" +PV = "${ATF_VERSION}${ATF_VERSION_EXTENSION}+git${SRCPV}" + +BRANCH ?= "" +REPO ?= "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https" +BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" +SRC_URI = "${REPO};${BRANCHARG}" + +ATF_BASE_NAME ?= "${PN}-${PKGE}-${PKGV}-${PKGR}-${DATETIME}" +ATF_BASE_NAME[vardepsexclude] = "DATETIME" + +COMPATIBLE_MACHINE = "zynqmp" +PLATFORM_zynqmp = "zynqmp" + +# requires CROSS_COMPILE set by hand as there is no configure script +export CROSS_COMPILE="${TARGET_PREFIX}" + +# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application +CFLAGS[unexport] = "1" +LDFLAGS[unexport] = "1" +AS[unexport] = "1" +LD[unexport] = "1" + +do_configure() { + : +} + +do_compile() { + oe_runmake -C ${S} BUILD_BASE=${B} PLAT=${PLATFORM} RESET_TO_BL31=1 bl31 +} + +do_install() { + : +} + +OUTPUT_DIR = "${B}/${PLATFORM}/release" + +do_deploy() { + install -d ${DEPLOYDIR} + install -m 0644 ${OUTPUT_DIR}/bl31/bl31.elf ${DEPLOYDIR}/${ATF_BASE_NAME}.elf + ln -sf ${ATF_BASE_NAME}.elf ${DEPLOYDIR}/${PN}.elf + install -m 0644 ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/${ATF_BASE_NAME}.bin + ln -sf ${ATF_BASE_NAME}.bin ${DEPLOYDIR}/${PN}.bin + + # Get the entry point address from the elf. + BL31_BASE_ADDR=$(${READELF} -h ${OUTPUT_DIR}/bl31/bl31.elf | egrep -m 1 -i "entry point.*?0x" | sed -r 's/.*?(0x.*?)/\1/g') + mkimage -A arm64 -O arm-trusted-firmware -T kernel -C none \ + -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \ + -d ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/${ATF_BASE_NAME}.ub + ln -sf ${ATF_BASE_NAME}.ub ${DEPLOYDIR}/${PN}.ub + ln -sf ${ATF_BASE_NAME}.ub ${DEPLOYDIR}/atf-uboot.ub +} +addtask deploy before do_build after do_compile diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2018.1.bb b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2018.1.bb new file mode 100644 index 000000000..6a9eea683 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2018.1.bb @@ -0,0 +1,7 @@ +ATF_VERSION = "1.4" +XILINX_RELEASE_VERSION = "v2018.1" +BRANCH ?= "master" +SRCREV ?= "df4a7e97d57494c7d79de51b1e0e450d982cea98" + +include arm-trusted-firmware.inc + |