diff options
| author | Nathan Rossi <nathan@nathanrossi.com> | 2017-05-15 21:27:31 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan@nathanrossi.com> | 2017-05-15 21:27:31 +1000 |
| commit | 184e435ac0f59269237d08f1fc1d86ddfa1d49fb (patch) | |
| tree | c9933e8eea4e20d0b32a98ef1ef2a7d4e081cb41 | |
| parent | 44c06075685fb2d71c767a4249159599c247c049 (diff) | |
| download | meta-xilinx-184e435ac0f59269237d08f1fc1d86ddfa1d49fb.tar.gz | |
arm-trusted-firmware: Split common build/config into include
Split the common build/config/description/etc. of the recipe into an
include file so that multiple versions can use the include instead of
copying the recipe content.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
| -rw-r--r-- | recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc | 55 | ||||
| -rw-r--r-- | recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb | 55 |
2 files changed, 56 insertions, 54 deletions
diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc new file mode 100644 index 00000000..b841fa16 --- /dev/null +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | DESCRIPTION = "ARM Trusted Firmware" | ||
| 2 | |||
| 3 | LICENSE = "BSD" | ||
| 4 | LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371" | ||
| 5 | |||
| 6 | PROVIDES = "virtual/arm-trusted-firmware" | ||
| 7 | |||
| 8 | inherit deploy | ||
| 9 | |||
| 10 | DEPENDS += "u-boot-mkimage-native" | ||
| 11 | |||
| 12 | S = "${WORKDIR}/git" | ||
| 13 | B = "${WORKDIR}/build" | ||
| 14 | |||
| 15 | BRANCH = "master" | ||
| 16 | SRC_URI = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}" | ||
| 17 | |||
| 18 | COMPATIBLE_MACHINE = "zynqmp" | ||
| 19 | PLATFORM_zynqmp = "zynqmp" | ||
| 20 | |||
| 21 | # requires CROSS_COMPILE set by hand as there is no configure script | ||
| 22 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
| 23 | |||
| 24 | # Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application | ||
| 25 | CFLAGS[unexport] = "1" | ||
| 26 | LDFLAGS[unexport] = "1" | ||
| 27 | AS[unexport] = "1" | ||
| 28 | LD[unexport] = "1" | ||
| 29 | |||
| 30 | do_configure() { | ||
| 31 | : | ||
| 32 | } | ||
| 33 | |||
| 34 | do_compile() { | ||
| 35 | oe_runmake -C ${S} BUILD_BASE=${B} PLAT=${PLATFORM} RESET_TO_BL31=1 bl31 | ||
| 36 | } | ||
| 37 | |||
| 38 | do_install() { | ||
| 39 | : | ||
| 40 | } | ||
| 41 | |||
| 42 | OUTPUT_DIR = "${B}/${PLATFORM}/release" | ||
| 43 | |||
| 44 | do_deploy() { | ||
| 45 | install -d ${DEPLOYDIR} | ||
| 46 | install -m 0644 ${OUTPUT_DIR}/bl31/bl31.elf ${DEPLOYDIR}/arm-trusted-firmware-${MACHINE}.elf | ||
| 47 | install -m 0644 ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware-${MACHINE}.bin | ||
| 48 | |||
| 49 | # Get the entry point address from the elf. | ||
| 50 | BL31_BASE_ADDR=$(${READELF} -h ${OUTPUT_DIR}/bl31/bl31.elf | egrep -m 1 -i "entry point.*?0x" | sed -r 's/.*?(0x.*?)/\1/g') | ||
| 51 | mkimage -A arm64 -O linux -T kernel -C none \ | ||
| 52 | -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \ | ||
| 53 | -d ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware.ub | ||
| 54 | } | ||
| 55 | addtask deploy before do_build after do_compile | ||
diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb index bead4672..dc5e3fa1 100644 --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb | |||
| @@ -1,60 +1,7 @@ | |||
| 1 | DESCRIPTION = "ARM Trusted Firmware" | 1 | include arm-trusted-firmware.inc |
| 2 | |||
| 3 | LICENSE = "BSD" | ||
| 4 | LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371" | ||
| 5 | |||
| 6 | PROVIDES = "virtual/arm-trusted-firmware" | ||
| 7 | |||
| 8 | inherit deploy | ||
| 9 | |||
| 10 | DEPENDS += "u-boot-mkimage-native" | ||
| 11 | |||
| 12 | S = "${WORKDIR}/git" | ||
| 13 | B = "${WORKDIR}/build" | ||
| 14 | |||
| 15 | BRANCH = "master" | ||
| 16 | SRC_URI = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}" | ||
| 17 | 2 | ||
| 18 | XILINX_RELEASE_VERSION = "v2016.3" | 3 | XILINX_RELEASE_VERSION = "v2016.3" |
| 19 | SRCREV ?= "a9e3716615a23c78e3cdea5b5b2f840f89817cb1" | 4 | SRCREV ?= "a9e3716615a23c78e3cdea5b5b2f840f89817cb1" |
| 20 | 5 | ||
| 21 | PV = "1.2-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}" | 6 | PV = "1.2-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}" |
| 22 | 7 | ||
| 23 | COMPATIBLE_MACHINE = "zynqmp" | ||
| 24 | PLATFORM_zynqmp = "zynqmp" | ||
| 25 | |||
| 26 | # requires CROSS_COMPILE set by hand as there is no configure script | ||
| 27 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
| 28 | |||
| 29 | # Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application | ||
| 30 | CFLAGS[unexport] = "1" | ||
| 31 | LDFLAGS[unexport] = "1" | ||
| 32 | AS[unexport] = "1" | ||
| 33 | LD[unexport] = "1" | ||
| 34 | |||
| 35 | do_configure() { | ||
| 36 | : | ||
| 37 | } | ||
| 38 | |||
| 39 | do_compile() { | ||
| 40 | oe_runmake -C ${S} BUILD_BASE=${B} PLAT=${PLATFORM} RESET_TO_BL31=1 bl31 | ||
| 41 | } | ||
| 42 | |||
| 43 | do_install() { | ||
| 44 | : | ||
| 45 | } | ||
| 46 | |||
| 47 | OUTPUT_DIR = "${B}/${PLATFORM}/release" | ||
| 48 | |||
| 49 | do_deploy() { | ||
| 50 | install -d ${DEPLOYDIR} | ||
| 51 | install -m 0644 ${OUTPUT_DIR}/bl31/bl31.elf ${DEPLOYDIR}/arm-trusted-firmware-${MACHINE}.elf | ||
| 52 | install -m 0644 ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware-${MACHINE}.bin | ||
| 53 | |||
| 54 | # Get the entry point address from the elf. | ||
| 55 | BL31_BASE_ADDR=$(${READELF} -h ${OUTPUT_DIR}/bl31/bl31.elf | egrep -m 1 -i "entry point.*?0x" | sed -r 's/.*?(0x.*?)/\1/g') | ||
| 56 | mkimage -A arm64 -O linux -T kernel -C none \ | ||
| 57 | -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \ | ||
| 58 | -d ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware.ub | ||
| 59 | } | ||
| 60 | addtask deploy before do_build after do_compile | ||
