u-boot: add license checksum
[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 PRIORITY = "optional"
5 LICENSE = "GPLv2+"
6 LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b"
8 PROVIDES = "virtual/bootloader"
10 DEPENDS = "mtd-utils"
12 PACKAGE_ARCH = "${MACHINE_ARCH}"
13 PARALLEL_MAKE=""
15 EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
17 UBOOT_MACHINE ?= "${MACHINE}_config"
18 UBOOT_BINARY ?= "u-boot.bin"
19 UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
20 UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
22 do_configure () {
23         oe_runmake ${UBOOT_MACHINE}
24 }
26 do_compile () {
27         unset LDFLAGS
28         unset CFLAGS
29         unset CPPFLAGS
30         oe_runmake all
31         oe_runmake tools env
32 }
34 do_install () {
35         install -d ${D}/boot
36         install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
37         ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
39         if [ -e ${WORKDIR}/fw_env.config ] ; then
40             install -d ${D}${base_sbindir}
41                 install -d ${D}${sysconfdir}
42                 install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
43                 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
44                 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
45         fi
47 }
49 FILES_${PN} = "/boot"
50 # no gnu_hash in uboot.bin, by design, so skip QA
51 INSANE_SKIP_${PN} = True
53 PACKAGES += "${PN}-fw-utils"
54 FILES_${PN}-fw-utils = "${sysconfdir} ${base_sbindir}"
55 # u-boot doesn't use LDFLAGS for fw files, needs to get fixed, but until then:
56 INSANE_SKIP_${PN}-fw-utils = True
58 do_deploy () {
59         install -d ${DEPLOY_DIR_IMAGE}
60         install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
61         package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
63         cd ${DEPLOY_DIR_IMAGE}
64         rm -f ${UBOOT_SYMLINK}
65         ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
66         package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}
67 }
68 do_deploy[dirs] = "${S}"
69 addtask deploy before do_package_stage after do_compile