mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 12:59:03 +02:00
armstubs: Add support for compiling ARM stubs
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
This commit is contained in:
parent
2e45813a6b
commit
9d0348874a
33
recipes-bsp/armstubs/armstubs.bb
Normal file
33
recipes-bsp/armstubs/armstubs.bb
Normal file
|
@ -0,0 +1,33 @@
|
|||
DESCRIPTION = "Boot strap code that the GPU puts on memory to start running the boot loader"
|
||||
LICENSE = "Proprietary"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://armstub.S;beginline=1;endline=26;md5=9888f34ac06a676129416c952a6a521e"
|
||||
|
||||
inherit deploy nopackages
|
||||
|
||||
include recipes-bsp/common/raspberrypi-tools.inc
|
||||
|
||||
SRC_URI_append = " file://0001-armstubs-makefile-external-toolchain.patch"
|
||||
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
S = "${RPITOOLS_S}/armstubs"
|
||||
|
||||
export CC8="${CC}"
|
||||
export LD8="${LD}"
|
||||
export OBJCOPY8="${OBJCOPY}"
|
||||
export OBJDUMP8="${OBJDUMP} -maarch64"
|
||||
|
||||
do_compile() {
|
||||
oe_runmake ${ARMSTUB}
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}/${PN}
|
||||
cp ${S}/armstub*.bin ${DEPLOYDIR}/${PN}
|
||||
}
|
||||
|
||||
addtask deploy before do_build after do_install
|
||||
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
@ -0,0 +1,32 @@
|
|||
armstubs: Allow using external toolchain variables in Makefile
|
||||
|
||||
Upstream-status: Pending
|
||||
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
|
||||
|
||||
Index: armstubs/Makefile
|
||||
===================================================================
|
||||
--- armstubs.orig/Makefile
|
||||
+++ armstubs/Makefile
|
||||
@@ -1,14 +1,14 @@
|
||||
BINS=armstub.bin armstub7.bin armstub8-32.bin armstub8-32-gic.bin armstub8.bin armstub8-gic.bin
|
||||
|
||||
-CC8=aarch64-linux-gnu-gcc
|
||||
-LD8=aarch64-linux-gnu-ld
|
||||
-OBJCOPY8=aarch64-linux-gnu-objcopy
|
||||
-OBJDUMP8=aarch64-linux-gnu-objdump -maarch64
|
||||
+CC8?=aarch64-linux-gnu-gcc
|
||||
+LD8?=aarch64-linux-gnu-ld
|
||||
+OBJCOPY8?=aarch64-linux-gnu-objcopy
|
||||
+OBJDUMP8?=aarch64-linux-gnu-objdump -maarch64
|
||||
|
||||
-CC=arm-linux-gnueabihf-gcc -march=armv7-a
|
||||
-LD=arm-linux-gnueabihf-ld
|
||||
-OBJCOPY=arm-linux-gnueabihf-objcopy
|
||||
-OBJDUMP=arm-linux-gnueabihf-objdump -marm
|
||||
+CC?=arm-linux-gnueabihf-gcc -march=armv7-a
|
||||
+LD?=arm-linux-gnueabihf-ld
|
||||
+OBJCOPY?=arm-linux-gnueabihf-objcopy
|
||||
+OBJDUMP?=arm-linux-gnueabihf-objdump -marm
|
||||
|
||||
BIN2C=./bin2c
|
||||
|
9
recipes-bsp/common/raspberrypi-tools.inc
Normal file
9
recipes-bsp/common/raspberrypi-tools.inc
Normal file
|
@ -0,0 +1,9 @@
|
|||
SRCREV ?= "7f4a937e1bacbc111a22552169bc890b4bb26a94"
|
||||
RPITOOLS_SRC_URI ?= "https://github.com/raspberrypi/tools/archive/${SRCREV}.tar.gz"
|
||||
RPITOOLS_S ?= "${WORKDIR}/tools-${SRCREV}"
|
||||
|
||||
SRC_URI = "${RPITOOLS_SRC_URI}"
|
||||
SRC_URI[md5sum] = "f03672c57a4f285d0583ba7028f46a83"
|
||||
SRC_URI[sha256sum] = "85e884cd95207780bc03fc7dacea1f17d2462c1e8c7499b0ff30070ca1d4d48a"
|
||||
|
||||
PV = "0.0+git${SRCREV}"
|
Loading…
Reference in New Issue
Block a user