summaryrefslogtreecommitdiffstats
path: root/meta-linaro/recipes-kernel/linux/bootwrapper.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-linaro/recipes-kernel/linux/bootwrapper.inc')
-rw-r--r--meta-linaro/recipes-kernel/linux/bootwrapper.inc67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-linaro/recipes-kernel/linux/bootwrapper.inc b/meta-linaro/recipes-kernel/linux/bootwrapper.inc
new file mode 100644
index 0000000..c3a5634
--- /dev/null
+++ b/meta-linaro/recipes-kernel/linux/bootwrapper.inc
@@ -0,0 +1,67 @@
1SRC_URI_append= " git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git;protocol=http;branch=master;name=bootwrapper;destsuffix=bootwrapper \
2"
3
4SRCREV_bootwrapper = "2ff0b45423226d3de898a52a81b8e90b20fecd60"
5BW = "${WORKDIR}/bootwrapper"
6DTBDIR="${S}/arch/arm64/boot/dts/"
7
8# Bootwrapper needs libgcc_s.so
9DEPENDS =+ "libgcc"
10
11export WRAPCFLAGS = "${CFLAGS}"
12export WRAPCPPFLAGS = "${CPPFLAGS}"
13export WRAPCXXFLAGS = "${CXXFLAGS}"
14export WRAPLDFLAGS = "${LDFLAGS}"
15
16do_compile_append() {
17 cd ${S}
18 oe_runmake dtbs
19 cd ${BW}
20
21 # Ensure the compile can find libgcc.a and other userspace friends
22 export CFLAGS="${WRAPCFLAGS}"
23 export CPPFLAGS="${WRAPCPPFLAGS}"
24 export CXXFLAGS="${WRAPCXXFLAGS}"
25 export LDFLAGS="${WRAPLDFLAGS}"
26
27 autoreconf -vfi
28 ./configure --host=aarch64-linux-gnu \
29 --with-kernel-dir="${S}" \
30 --with-cmdline="${BOOTARGS_COMMON} root=/dev/vda"
31 make IMAGE=linux-system-foundation.axf clean
32 make DTC=${S}/scripts/dtc/dtc \
33 KERNEL_DTB="${DTBDIR}/foundation-v8.dtb" \
34 IMAGE=linux-system-foundation.axf
35 make IMAGE=img-foundation.axf clean
36 ./configure --host=aarch64-linux-gnu \
37 --with-kernel-dir="${S}" \
38 --with-cmdline="${BOOTARGS_COMMON} root=/dev/vda2"
39 make DTC=${S}/scripts/dtc/dtc \
40 KERNEL_DTB="${DTBDIR}/foundation-v8.dtb" \
41 IMAGE=img-foundation.axf
42 make IMAGE=img.axf clean
43 ./configure --host=aarch64-linux-gnu \
44 --with-kernel-dir="${S}" \
45 --with-cmdline="${BOOTARGS_COMMON} root=/dev/mmcblk0p2"
46 make DTC=${S}/scripts/dtc/dtc \
47 KERNEL_DTB="${DTBDIR}/rtsm_ve-aemv8a.dtb" \
48 IMAGE=img.axf
49}
50
51do_install_append() {
52 install -m 0644 ${BW}/img-foundation.axf ${D}/boot/img-foundation.axf
53}
54
55do_deploy_append() {
56 install -d ${DEPLOYDIR}
57 install -m 0644 ${BW}/img.axf ${DEPLOYDIR}/img-${PV}.axf
58 install -m 0644 ${BW}/linux-system-foundation.axf ${DEPLOYDIR}/linux-system-foundation-${PV}.axf
59 install -m 0644 ${BW}/img-foundation.axf ${DEPLOYDIR}/img-foundation-${PV}.axf
60 cd ${DEPLOYDIR}
61 ln -sf img-${PV}.axf img.axf
62 ln -sf linux-system-foundation-${PV}.axf linux-system-foundation.axf
63 ln -sf img-foundation-${PV}.axf img-foundation.axf
64}
65
66PACKAGES =+ "kernel-bootwrapper"
67FILES_kernel-bootwrapper = "/boot/img-foundation.axf"