diff options
author | Denys Dmytriyenko <denys@ti.com> | 2013-03-18 17:40:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2013-03-18 19:27:28 -0400 |
commit | 32bb599a61429b07c4aeec89c0d764f85a62fe48 (patch) | |
tree | 6db9b7278cd4a4987c152bc8bacda71236546dd6 | |
parent | d51042bb73fb429cf3a8ce15c0e80cf0aebd68c5 (diff) | |
download | meta-ti-32bb599a61429b07c4aeec89c0d764f85a62fe48.tar.gz |
u-boot.inc: refactor local include file to base off core with TI customizations
* Introduce own namespace to allow multiple instances of the same base version,
possibly pulled from different trees or patched/customized for specific SoC.
* Suffix-less variant u-boot_YYYY.MM.bb is reserved for mainline versions of the
recipe with no or minimal patches, with broader machine selection.
* Recipes for machine- or SoC-specific trees should use corresponding suffix -
either machine, SoC or the name of the tree.
* The .inc file lets the suffixed recipes to provide virtual/bootloader, u-boot,
as well as generate conventional u-boot binary packages for direct run-time
dependencies.
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r-- | recipes-bsp/u-boot/u-boot-ti.inc | 17 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot.inc | 68 |
2 files changed, 17 insertions, 68 deletions
diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc new file mode 100644 index 00000000..968f3e41 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-ti.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc | ||
2 | |||
3 | FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:" | ||
4 | |||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" | ||
7 | |||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | |||
10 | PROVIDES += "u-boot" | ||
11 | PKG_${PN} = "u-boot" | ||
12 | PKG_${PN}-dev = "u-boot-dev" | ||
13 | PKG_${PN}-dbg = "u-boot-dbg" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | UBOOT_SUFFIX = "img" | ||
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc deleted file mode 100644 index 720f9955..00000000 --- a/recipes-bsp/u-boot/u-boot.inc +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
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" | ||
6 | |||
7 | PROVIDES = "virtual/bootloader" | ||
8 | |||
9 | DEPENDS = "mtd-utils" | ||
10 | |||
11 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
12 | PARALLEL_MAKE="" | ||
13 | |||
14 | EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" | ||
15 | |||
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" | ||
21 | |||
22 | do_configure () { | ||
23 | oe_runmake ${UBOOT_MACHINE} | ||
24 | } | ||
25 | |||
26 | do_compile () { | ||
27 | unset LDFLAGS | ||
28 | unset CFLAGS | ||
29 | unset CPPFLAGS | ||
30 | oe_runmake ${UBOOT_MAKE_TARGET} | ||
31 | } | ||
32 | |||
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} | ||
37 | |||
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 | ||
42 | |||
43 | } | ||
44 | |||
45 | FILES_${PN} = "/boot ${sysconfdir}" | ||
46 | # no gnu_hash in uboot.bin, by design, so skip QA | ||
47 | INSANE_SKIP_${PN} = "1" | ||
48 | |||
49 | inherit deploy | ||
50 | |||
51 | addtask deploy before do_package after do_compile | ||
52 | |||
53 | do_deploy () { | ||
54 | install -d ${DEPLOY_DIR_IMAGE} | ||
55 | install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE} | ||
56 | |||
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} | ||
61 | |||
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 | } | ||