summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/barebox
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/barebox')
-rw-r--r--recipes-bsp/barebox/barebox.inc63
-rw-r--r--recipes-bsp/barebox/barebox_2013.08.0.bb9
2 files changed, 72 insertions, 0 deletions
diff --git a/recipes-bsp/barebox/barebox.inc b/recipes-bsp/barebox/barebox.inc
new file mode 100644
index 00000000..0d5c127b
--- /dev/null
+++ b/recipes-bsp/barebox/barebox.inc
@@ -0,0 +1,63 @@
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_pre_configure() {
24 cp ${WORKDIR}/defconfig ${S}/.config
25 oe_runmake oldconfig
26}
27addtask pre_configure before do_configure after do_patch
28
29do_compile () {
30 if [ "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
31 sed -i 's/$(CROSS_COMPILE)ld/$(CROSS_COMPILE)ld.bfd/g' Makefile
32 fi
33 unset LDFLAGS
34 unset CFLAGS
35 unset CPPFLAGS
36 oe_runmake all
37}
38
39do_deploy () {
40 install -d ${DEPLOY_DIR_IMAGE}
41 install ${S}/${BAREBOX_BINARY} ${DEPLOY_DIR_IMAGE}/${BAREBOX_IMAGE}
42
43 cd ${DEPLOY_DIR_IMAGE}
44 rm -f ${BAREBOX_SYMLINK}
45 ln -sf ${BAREBOX_IMAGE} ${BAREBOX_SYMLINK}
46
47 install -d ${STAGING_BINDIR_NATIVE}
48 cd ${S}
49 install -m 755 scripts/mkimage ${STAGING_BINDIR_NATIVE}/
50 install -m 755 scripts/bareboxenv ${STAGING_BINDIR_NATIVE}/
51}
52
53do_deploy[dirs] = "${S}"
54addtask deploy before do_build after do_compile
55
56do_env_deploy() {
57 install ${S}/common/barebox_default_env ${DEPLOY_DIR_IMAGE}/${BAREBOXENV_BIN}
58
59 cd ${DEPLOY_DIR_IMAGE}
60 rm -f ${BAREBOXENV_SYMLINK}
61 ln -sf ${BAREBOXENV_BIN} ${BAREBOXENV_SYMLINK}
62}
63addtask env_deploy before do_build after do_deploy
diff --git a/recipes-bsp/barebox/barebox_2013.08.0.bb b/recipes-bsp/barebox/barebox_2013.08.0.bb
new file mode 100644
index 00000000..e4e37179
--- /dev/null
+++ b/recipes-bsp/barebox/barebox_2013.08.0.bb
@@ -0,0 +1,9 @@
1require recipes-bsp/barebox/barebox.inc
2
3SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2 \
4 file://defconfig"
5
6SRC_URI[md5sum] = "a61b97a2fedebc808d4b182c2ca18a0c"
7SRC_URI[sha256sum] = "d9e46dd3c68b04ab4cbc37135dc34907dbebef393da4b3e54abb203c295c1620"
8
9COMPATIBLE_MACHINE = "Invalid!"