diff options
Diffstat (limited to 'recipes-bsp/barebox/barebox.inc')
-rw-r--r-- | recipes-bsp/barebox/barebox.inc | 53 |
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 @@ | |||
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_configure_prepend() { | ||
24 | cp ${WORKDIR}/defconfig ${S}/.config | ||
25 | oe_runmake oldconfig | ||
26 | } | ||
27 | |||
28 | do_compile () { | ||
29 | unset LDFLAGS | ||
30 | unset CFLAGS | ||
31 | unset CPPFLAGS | ||
32 | oe_runmake all | ||
33 | } | ||
34 | |||
35 | do_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 | |||
52 | do_deploy[dirs] = "${S}" | ||
53 | addtask deploy before do_build after do_compile | ||