TI BSP: add support the OMAP35x EVM board
[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 PROVIDES = "virtual/bootloader"
8 DEPENDS = "mtd-utils"
10 PACKAGE_ARCH = "${MACHINE_ARCH}"
11 PARALLEL_MAKE=""
13 EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
15 UBOOT_MACHINE ?= "${MACHINE}_config"
16 UBOOT_BINARY ?= "u-boot.bin"
17 UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
18 UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
20 do_configure () {
21         oe_runmake ${UBOOT_MACHINE}
22 }
24 do_compile () {
25         unset LDFLAGS
26         unset CFLAGS
27         unset CPPFLAGS
28         oe_runmake all
29         oe_runmake tools env
30 }
32 do_install () {
33         install -d ${D}/boot
34         install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
35         ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
37         if [ -e ${WORKDIR}/fw_env.config ] ; then
38             install -d ${D}${base_sbindir}
39                 install -d ${D}${sysconfdir}
40                 install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
41                 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
42                 install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
43         fi
45 }
47 FILES_${PN} = "/boot"
48 # no gnu_hash in uboot.bin, by design, so skip QA
49 INSANE_SKIP_${PN} = True
51 PACKAGES += "${PN}-fw-utils"
52 FILES_${PN}-fw-utils = "${sysconfdir} ${base_sbindir}"
53 # u-boot doesn't use LDFLAGS for fw files, needs to get fixed, but until then:
54 INSANE_SKIP_${PN}-fw-utils = True
56 do_deploy () {
57         install -d ${DEPLOY_DIR_IMAGE}
58         install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
59         package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
61         cd ${DEPLOY_DIR_IMAGE}
62         rm -f ${UBOOT_SYMLINK}
63         ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
64         package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}
65 }
66 do_deploy[dirs] = "${S}"
67 addtask deploy before do_package_stage after do_compile