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 <[email protected]> --- .../arm-trusted-firmware/arm-trusted-firmware.inc | 55 ++++++++++++++++++++++ .../arm-trusted-firmware_git.bb | 55 +--------------------- 2 files changed, 56 insertions(+), 54 deletions(-) create mode 100644 recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc 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 0000000000..b841fa16cb --- /dev/null +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc @@ -0,0 +1,55 @@ +DESCRIPTION = "ARM Trusted Firmware" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371" + +PROVIDES = "virtual/arm-trusted-firmware" + +inherit deploy + +DEPENDS += "u-boot-mkimage-native" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" + +BRANCH = "master" +SRC_URI = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}" + +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}/arm-trusted-firmware-${MACHINE}.elf + install -m 0644 ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware-${MACHINE}.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 linux -T kernel -C none \ + -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \ + -d ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware.ub +} +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 bead46727a..dc5e3fa1cd 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 @@ -DESCRIPTION = "ARM Trusted Firmware" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371" - -PROVIDES = "virtual/arm-trusted-firmware" - -inherit deploy - -DEPENDS += "u-boot-mkimage-native" - -S = "${WORKDIR}/git" -B = "${WORKDIR}/build" - -BRANCH = "master" -SRC_URI = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}" +include arm-trusted-firmware.inc XILINX_RELEASE_VERSION = "v2016.3" SRCREV ?= "a9e3716615a23c78e3cdea5b5b2f840f89817cb1" PV = "1.2-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}" -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}/arm-trusted-firmware-${MACHINE}.elf - install -m 0644 ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware-${MACHINE}.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 linux -T kernel -C none \ - -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \ - -d ${OUTPUT_DIR}/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware.ub -} -addtask deploy before do_build after do_compile -- 2.11.0 -- _______________________________________________ meta-xilinx mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-xilinx
