diff options
Diffstat (limited to 'recipes-bsp/barebox')
-rw-r--r-- | recipes-bsp/barebox/barebox.inc | 63 | ||||
-rw-r--r-- | recipes-bsp/barebox/barebox_2013.08.0.bb | 9 |
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 @@ | |||
1 | DESCRIPTION = "Barebox - a bootloader that inherits the best of U-Boot and the Linux kernel" | ||
2 | HOMEPAGE = "http://www.barebox.org/" | ||
3 | SECTION = "bootloader" | ||
4 | PROVIDES = "virtual/bootloader" | ||
5 | PRIORITY = "optional" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=057bf9e50e1ca857d0eb97bfe4ba8e5d" | ||
8 | |||
9 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
10 | |||
11 | inherit kernel-arch | ||
12 | |||
13 | EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" | ||
14 | |||
15 | BAREBOX_BINARY ?= "barebox.bin" | ||
16 | BAREBOX_IMAGE ?= "barebox-${MACHINE}-${PV}-${PR}.bin" | ||
17 | BAREBOXENV_BIN ?= "bareboxenv-${MACHINE}-${PV}-${PR}.bin" | ||
18 | BAREBOX_SYMLINK ?= "barebox-${MACHINE}.bin" | ||
19 | BAREBOXENV_SYMLINK ?= "bareboxenv-${MACHINE}.bin" | ||
20 | |||
21 | INSANE_SKIP_${PN} = "True" | ||
22 | |||
23 | do_pre_configure() { | ||
24 | cp ${WORKDIR}/defconfig ${S}/.config | ||
25 | oe_runmake oldconfig | ||
26 | } | ||
27 | addtask pre_configure before do_configure after do_patch | ||
28 | |||
29 | do_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 | |||
39 | do_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 | |||
53 | do_deploy[dirs] = "${S}" | ||
54 | addtask deploy before do_build after do_compile | ||
55 | |||
56 | do_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 | } | ||
63 | addtask 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 @@ | |||
1 | require recipes-bsp/barebox/barebox.inc | ||
2 | |||
3 | SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2 \ | ||
4 | file://defconfig" | ||
5 | |||
6 | SRC_URI[md5sum] = "a61b97a2fedebc808d4b182c2ca18a0c" | ||
7 | SRC_URI[sha256sum] = "d9e46dd3c68b04ab4cbc37135dc34907dbebef393da4b3e54abb203c295c1620" | ||
8 | |||
9 | COMPATIBLE_MACHINE = "Invalid!" | ||