summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2017-05-15 21:27:31 +1000
committerNathan Rossi <nathan@nathanrossi.com>2017-05-15 21:27:31 +1000
commit184e435ac0f59269237d08f1fc1d86ddfa1d49fb (patch)
treec9933e8eea4e20d0b32a98ef1ef2a7d4e081cb41
parent44c06075685fb2d71c767a4249159599c247c049 (diff)
downloadmeta-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.inc55
-rw-r--r--recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb55
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 @@
1DESCRIPTION = "ARM Trusted Firmware"
2
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371"
5
6PROVIDES = "virtual/arm-trusted-firmware"
7
8inherit deploy
9
10DEPENDS += "u-boot-mkimage-native"
11
12S = "${WORKDIR}/git"
13B = "${WORKDIR}/build"
14
15BRANCH = "master"
16SRC_URI = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}"
17
18COMPATIBLE_MACHINE = "zynqmp"
19PLATFORM_zynqmp = "zynqmp"
20
21# requires CROSS_COMPILE set by hand as there is no configure script
22export CROSS_COMPILE="${TARGET_PREFIX}"
23
24# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application
25CFLAGS[unexport] = "1"
26LDFLAGS[unexport] = "1"
27AS[unexport] = "1"
28LD[unexport] = "1"
29
30do_configure() {
31 :
32}
33
34do_compile() {
35 oe_runmake -C ${S} BUILD_BASE=${B} PLAT=${PLATFORM} RESET_TO_BL31=1 bl31
36}
37
38do_install() {
39 :
40}
41
42OUTPUT_DIR = "${B}/${PLATFORM}/release"
43
44do_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}
55addtask 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 @@
1DESCRIPTION = "ARM Trusted Firmware" 1include arm-trusted-firmware.inc
2
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371"
5
6PROVIDES = "virtual/arm-trusted-firmware"
7
8inherit deploy
9
10DEPENDS += "u-boot-mkimage-native"
11
12S = "${WORKDIR}/git"
13B = "${WORKDIR}/build"
14
15BRANCH = "master"
16SRC_URI = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}"
17 2
18XILINX_RELEASE_VERSION = "v2016.3" 3XILINX_RELEASE_VERSION = "v2016.3"
19SRCREV ?= "a9e3716615a23c78e3cdea5b5b2f840f89817cb1" 4SRCREV ?= "a9e3716615a23c78e3cdea5b5b2f840f89817cb1"
20 5
21PV = "1.2-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}" 6PV = "1.2-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}"
22 7
23COMPATIBLE_MACHINE = "zynqmp"
24PLATFORM_zynqmp = "zynqmp"
25
26# requires CROSS_COMPILE set by hand as there is no configure script
27export CROSS_COMPILE="${TARGET_PREFIX}"
28
29# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application
30CFLAGS[unexport] = "1"
31LDFLAGS[unexport] = "1"
32AS[unexport] = "1"
33LD[unexport] = "1"
34
35do_configure() {
36 :
37}
38
39do_compile() {
40 oe_runmake -C ${S} BUILD_BASE=${B} PLAT=${PLATFORM} RESET_TO_BL31=1 bl31
41}
42
43do_install() {
44 :
45}
46
47OUTPUT_DIR = "${B}/${PLATFORM}/release"
48
49do_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}
60addtask deploy before do_build after do_compile