u-boot 2011.09-psp: remove an older no longer used version
[glsdk/meta-ti-glsdk.git] / recipes-bsp / u-boot / u-boot.inc
1 DESCRIPTION = "U-Boot - the Universal Boot Loader"
2 HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
3 SECTION = "bootloaders"
4 LICENSE = "GPLv2+"
5 LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b"
7 PROVIDES = "virtual/bootloader"
9 DEPENDS = "mtd-utils"
11 PACKAGE_ARCH = "${MACHINE_ARCH}"
12 PARALLEL_MAKE=""
14 EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
16 UBOOT_MACHINE ?= "${MACHINE}_config"
17 UBOOT_BINARY ?= "u-boot.bin"
18 UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
19 UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
20 UBOOT_MAKE_TARGET ?= "all"
22 do_configure () {
23         oe_runmake ${UBOOT_MACHINE}
24 }
26 do_compile () {
27         unset LDFLAGS
28         unset CFLAGS
29         unset CPPFLAGS
30         oe_runmake ${UBOOT_MAKE_TARGET}
31 }
33 do_install () {
34         install -d ${D}/boot
35         install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
36         ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
38         if [ -e ${WORKDIR}/fw_env.config ] ; then
39                 install -d ${D}${sysconfdir}
40                 install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
41         fi
43 }
45 FILES_${PN} = "/boot ${sysconfdir}"
46 # no gnu_hash in uboot.bin, by design, so skip QA
47 INSANE_SKIP_${PN} = "1"
49 inherit deploy
51 addtask deploy before do_package after do_compile
53 do_deploy () {
54         install -d ${DEPLOY_DIR_IMAGE}
55         install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
57         cd ${DEPLOY_DIR_IMAGE}
58         rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
59         ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
60         ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
62         if [ -e ${S}/MLO ] ; then
63                 install ${S}/MLO ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}-${PV}
64                 rm -f ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE} ${DEPLOY_DIR_IMAGE}/MLO
65                 ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}
66                 ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO
67         fi
68 }