summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/armstubs
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2019-07-02 15:17:02 +0100
committerAndrei Gherzan <andrei@gherzan.ro>2019-07-04 15:47:13 +0100
commit9d0348874ad4458efa89805f04f6e203163806c1 (patch)
tree6955ededd1e7f489683a4099addc22313b31fe35 /recipes-bsp/armstubs
parent2e45813a6be42d3a13ae3155c3a9586fefa034df (diff)
downloadmeta-raspberrypi-9d0348874ad4458efa89805f04f6e203163806c1.tar.gz
armstubs: Add support for compiling ARM stubs
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'recipes-bsp/armstubs')
-rw-r--r--recipes-bsp/armstubs/armstubs.bb33
-rw-r--r--recipes-bsp/armstubs/armstubs/0001-armstubs-makefile-external-toolchain.patch32
2 files changed, 65 insertions, 0 deletions
diff --git a/recipes-bsp/armstubs/armstubs.bb b/recipes-bsp/armstubs/armstubs.bb
new file mode 100644
index 0000000..06f3f33
--- /dev/null
+++ b/recipes-bsp/armstubs/armstubs.bb
@@ -0,0 +1,33 @@
1DESCRIPTION = "Boot strap code that the GPU puts on memory to start running the boot loader"
2LICENSE = "Proprietary"
3
4LIC_FILES_CHKSUM = "file://armstub.S;beginline=1;endline=26;md5=9888f34ac06a676129416c952a6a521e"
5
6inherit deploy nopackages
7
8include recipes-bsp/common/raspberrypi-tools.inc
9
10SRC_URI_append = " file://0001-armstubs-makefile-external-toolchain.patch"
11
12COMPATIBLE_MACHINE = "^rpi$"
13
14S = "${RPITOOLS_S}/armstubs"
15
16export CC8="${CC}"
17export LD8="${LD}"
18export OBJCOPY8="${OBJCOPY}"
19export OBJDUMP8="${OBJDUMP} -maarch64"
20
21do_compile() {
22 oe_runmake ${ARMSTUB}
23}
24
25do_deploy() {
26 install -d ${DEPLOYDIR}/${PN}
27 cp ${S}/armstub*.bin ${DEPLOYDIR}/${PN}
28}
29
30addtask deploy before do_build after do_install
31do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
32
33PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-bsp/armstubs/armstubs/0001-armstubs-makefile-external-toolchain.patch b/recipes-bsp/armstubs/armstubs/0001-armstubs-makefile-external-toolchain.patch
new file mode 100644
index 0000000..4e226ec
--- /dev/null
+++ b/recipes-bsp/armstubs/armstubs/0001-armstubs-makefile-external-toolchain.patch
@@ -0,0 +1,32 @@
1armstubs: Allow using external toolchain variables in Makefile
2
3Upstream-status: Pending
4Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
5
6Index: armstubs/Makefile
7===================================================================
8--- armstubs.orig/Makefile
9+++ armstubs/Makefile
10@@ -1,14 +1,14 @@
11 BINS=armstub.bin armstub7.bin armstub8-32.bin armstub8-32-gic.bin armstub8.bin armstub8-gic.bin
12
13-CC8=aarch64-linux-gnu-gcc
14-LD8=aarch64-linux-gnu-ld
15-OBJCOPY8=aarch64-linux-gnu-objcopy
16-OBJDUMP8=aarch64-linux-gnu-objdump -maarch64
17+CC8?=aarch64-linux-gnu-gcc
18+LD8?=aarch64-linux-gnu-ld
19+OBJCOPY8?=aarch64-linux-gnu-objcopy
20+OBJDUMP8?=aarch64-linux-gnu-objdump -maarch64
21
22-CC=arm-linux-gnueabihf-gcc -march=armv7-a
23-LD=arm-linux-gnueabihf-ld
24-OBJCOPY=arm-linux-gnueabihf-objcopy
25-OBJDUMP=arm-linux-gnueabihf-objdump -marm
26+CC?=arm-linux-gnueabihf-gcc -march=armv7-a
27+LD?=arm-linux-gnueabihf-ld
28+OBJCOPY?=arm-linux-gnueabihf-objcopy
29+OBJDUMP?=arm-linux-gnueabihf-objdump -marm
30
31 BIN2C=./bin2c
32