summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/u-boot/u-boot.inc
diff options
context:
space:
mode:
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2011-12-11 14:47:37 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-13 12:28:12 +0000
commit3994ad0c34b773b4887f1e6396ef86218a0e5c60 (patch)
tree9505047c889fe1cbcb8b1ea61e9bd0e9035e341f /meta/recipes-bsp/u-boot/u-boot.inc
parent23f1ede0a175bed2bf6c3bfee4237852c186359a (diff)
downloadpoky-3994ad0c34b773b4887f1e6396ef86218a0e5c60.tar.gz
u-boot: renamed dir from uboot to the more appropriate u-boot
recipe dirs normally have the name of the (main) package and the official name is u-boot (From OE-Core rev: e9899d52ade2181bd97dcf79bec64650e8b0f718) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/u-boot/u-boot.inc')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
new file mode 100644
index 0000000000..544acd23b2
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -0,0 +1,50 @@
1DESCRIPTION = "U-boot bootloader"
2HOMEPAGE = "http://u-boot.sf.net"
3SECTION = "bootloaders"
4PROVIDES = "virtual/bootloader"
5
6inherit deploy
7
8PARALLEL_MAKE=""
9
10# GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS
11EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS='-O2'"
12
13python () {
14 if not d.getVar("UBOOT_MACHINE", True):
15 PN = d.getVar("PN", True)
16 FILE = os.path.basename(d.getVar("FILE", True))
17 bb.debug(1, "To build %s, see %s for instructions on \
18 setting up your machine config" % (PN, FILE))
19 raise bb.parse.SkipPackage("because UBOOT_MACHINE is not set")
20}
21
22UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
23UBOOT_BINARY ?= "u-boot.bin"
24UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
25UBOOT_MAKE_TARGET ?= "all"
26
27do_compile () {
28 unset LDFLAGS
29 unset CFLAGS
30 unset CPPFLAGS
31 oe_runmake ${UBOOT_MACHINE}
32 oe_runmake ${UBOOT_MAKE_TARGET}
33}
34
35do_install () {
36 install -d ${D}/boot
37 install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
38 ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
39}
40
41FILES_${PN} = "/boot"
42
43do_deploy () {
44 install ${S}/u-boot.bin ${DEPLOYDIR}/${UBOOT_IMAGE}
45
46 cd ${DEPLOYDIR}
47 rm -f ${UBOOT_SYMLINK}
48 ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
49}
50addtask deploy before do_build after do_compile