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