diff options
author | Andrei Gherzan <andrei@gherzan.ro> | 2019-07-02 15:17:02 +0100 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2019-07-04 15:47:13 +0100 |
commit | 9d0348874ad4458efa89805f04f6e203163806c1 (patch) | |
tree | 6955ededd1e7f489683a4099addc22313b31fe35 /recipes-bsp/armstubs | |
parent | 2e45813a6be42d3a13ae3155c3a9586fefa034df (diff) | |
download | meta-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.bb | 33 | ||||
-rw-r--r-- | recipes-bsp/armstubs/armstubs/0001-armstubs-makefile-external-toolchain.patch | 32 |
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 @@ | |||
1 | DESCRIPTION = "Boot strap code that the GPU puts on memory to start running the boot loader" | ||
2 | LICENSE = "Proprietary" | ||
3 | |||
4 | LIC_FILES_CHKSUM = "file://armstub.S;beginline=1;endline=26;md5=9888f34ac06a676129416c952a6a521e" | ||
5 | |||
6 | inherit deploy nopackages | ||
7 | |||
8 | include recipes-bsp/common/raspberrypi-tools.inc | ||
9 | |||
10 | SRC_URI_append = " file://0001-armstubs-makefile-external-toolchain.patch" | ||
11 | |||
12 | COMPATIBLE_MACHINE = "^rpi$" | ||
13 | |||
14 | S = "${RPITOOLS_S}/armstubs" | ||
15 | |||
16 | export CC8="${CC}" | ||
17 | export LD8="${LD}" | ||
18 | export OBJCOPY8="${OBJCOPY}" | ||
19 | export OBJDUMP8="${OBJDUMP} -maarch64" | ||
20 | |||
21 | do_compile() { | ||
22 | oe_runmake ${ARMSTUB} | ||
23 | } | ||
24 | |||
25 | do_deploy() { | ||
26 | install -d ${DEPLOYDIR}/${PN} | ||
27 | cp ${S}/armstub*.bin ${DEPLOYDIR}/${PN} | ||
28 | } | ||
29 | |||
30 | addtask deploy before do_build after do_install | ||
31 | do_deploy[dirs] += "${DEPLOYDIR}/${PN}" | ||
32 | |||
33 | PACKAGE_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 @@ | |||
1 | armstubs: Allow using external toolchain variables in Makefile | ||
2 | |||
3 | Upstream-status: Pending | ||
4 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> | ||
5 | |||
6 | Index: 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 | |||