summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/barebox/barebox.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/barebox/barebox.inc')
-rw-r--r--recipes-bsp/barebox/barebox.inc53
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-bsp/barebox/barebox.inc b/recipes-bsp/barebox/barebox.inc
new file mode 100644
index 0000000..1272259
--- /dev/null
+++ b/recipes-bsp/barebox/barebox.inc
@@ -0,0 +1,53 @@
1DESCRIPTION = "Barebox - a bootloader that inherits the best of U-Boot and the Linux kernel"
2HOMEPAGE = "http://www.barebox.org/"
3SECTION = "bootloader"
4PROVIDES = "virtual/bootloader"
5PRIORITY = "optional"
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=057bf9e50e1ca857d0eb97bfe4ba8e5d"
8
9PACKAGE_ARCH = "${MACHINE_ARCH}"
10
11inherit kernel-arch
12
13EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
14
15BAREBOX_BINARY ?= "barebox.bin"
16BAREBOX_IMAGE ?= "barebox-${MACHINE}-${PV}-${PR}.bin"
17BAREBOXENV_BIN ?= "bareboxenv-${MACHINE}-${PV}-${PR}.bin"
18BAREBOX_SYMLINK ?= "barebox-${MACHINE}.bin"
19BAREBOXENV_SYMLINK ?= "bareboxenv-${MACHINE}.bin"
20
21INSANE_SKIP_${PN} = "True"
22
23do_configure_prepend() {
24 cp ${WORKDIR}/defconfig ${S}/.config
25 oe_runmake oldconfig
26}
27
28do_compile () {
29 unset LDFLAGS
30 unset CFLAGS
31 unset CPPFLAGS
32 oe_runmake all
33}
34
35do_deploy () {
36 install -d ${DEPLOY_DIR_IMAGE}
37 install ${S}/${BAREBOX_BINARY} ${DEPLOY_DIR_IMAGE}/${BAREBOX_IMAGE}
38 install ${S}/barebox_default_env ${DEPLOY_DIR_IMAGE}/${BAREBOXENV_BIN}
39
40 cd ${DEPLOY_DIR_IMAGE}
41 rm -f ${BAREBOX_SYMLINK}
42 rm -f ${BAREBOXENV_SYMLINK}
43 ln -sf ${BAREBOX_IMAGE} ${BAREBOX_SYMLINK}
44 ln -sf ${BAREBOXENV_BIN} ${BAREBOXENV_SYMLINK}
45
46 install -d ${STAGING_BINDIR_NATIVE}
47 cd ${S}
48 install -m 755 scripts/mkimage ${STAGING_BINDIR_NATIVE}/
49 install -m 755 scripts/bareboxenv ${STAGING_BINDIR_NATIVE}/
50}
51
52do_deploy[dirs] = "${S}"
53addtask deploy before do_build after do_compile