diff options
author | Darren Hart <dvhart@linux.intel.com> | 2011-05-17 14:44:45 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-27 16:38:53 +0100 |
commit | 7f75045371f24acee863da378d94bf4e724b8731 (patch) | |
tree | 31bbd0224efe14eca3535a7fd8715e4092d9f6bb /meta/recipes-bsp/uboot | |
parent | 3faabbf1e87e47094cc8a8e5943242223e33d94c (diff) | |
download | poky-7f75045371f24acee863da378d94bf4e724b8731.tar.gz |
u-boot: remove UBOOT_MACHINE and COMPATIBLE_MACHINES
oe-core does not define any machines, so it does not make sense to
add machine specific information in the oe-core u-boot recipe and
infrastructure. Also note that COMPATIBLE_MACHINES is not easily extended due to
its regex syntax: "(machine_a|machine_b)", making it difficult to extend the
u-boot recipe in bbappend files without resorting to machine specific overrides.
Remove COMPATIBLE_MACHINES and the default UBOOT_MACHINE from the recipe and
insert some anonymous python into u-boot.inc to raise SkipPackage if
UBOOT_MACHINE is not set (this ensures 'world' still works for machines that
can't build u-boot).
UBOOT_MACHINE must now be specified in each machine config that requires u-boot.
This is an improvement over requiring machine specific overrides in every BSP
layer's u-boot_git.bbappend file. For example, a beagleboard machine config
currently contains:
UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"
With this change, it must now contain:
UBOOT_MACHINE = "omap3_beagle_config"
UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"
So long as the SRC_URI in the base recipe can build a working u-boot for a given
machine, there is no need to create a u-boot_git.bbappend file. If additional
patches are deemed necessary, a BSP layer creates a u-boot_git.bbappend file and
extends the SRC_URI to include general or machine specific backports.
Note: I used bb.note() instead of bb.debug() to ensure the message at least
makes it to the console. From what I could gather, bb.debug() doesn't
go anywhere during recipe parsing.
(From OE-Core rev: c7a198d7472b4767047dbbfeecb4d941055262b3)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Cc: Jason Kridner <jkridner@beagleboard.org>
Cc: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/uboot')
-rw-r--r-- | meta/recipes-bsp/uboot/u-boot.inc | 10 | ||||
-rw-r--r-- | meta/recipes-bsp/uboot/u-boot_git.bb | 11 |
2 files changed, 15 insertions, 6 deletions
diff --git a/meta/recipes-bsp/uboot/u-boot.inc b/meta/recipes-bsp/uboot/u-boot.inc index 058e3bad1c..83dfb6fa86 100644 --- a/meta/recipes-bsp/uboot/u-boot.inc +++ b/meta/recipes-bsp/uboot/u-boot.inc | |||
@@ -11,7 +11,15 @@ PARALLEL_MAKE="" | |||
11 | # GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS | 11 | # GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS |
12 | EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS='-O2'" | 12 | EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS='-O2'" |
13 | 13 | ||
14 | UBOOT_MACHINE ?= "${MACHINE}_config" | 14 | python () { |
15 | if not d.getVar("UBOOT_MACHINE", True): | ||
16 | PN = d.getVar("PN", True) | ||
17 | FILE = os.path.basename(d.getVar("FILE", True)) | ||
18 | bb.debug(1, "To build %s, see %s for instructions on \ | ||
19 | setting up your machine config" % (PN, FILE)) | ||
20 | raise bb.parse.SkipPackage("because UBOOT_MACHINE is not set") | ||
21 | } | ||
22 | |||
15 | UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin" | 23 | UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin" |
16 | UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin" | 24 | UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin" |
17 | UBOOT_MAKE_TARGET ?= "all" | 25 | UBOOT_MAKE_TARGET ?= "all" |
diff --git a/meta/recipes-bsp/uboot/u-boot_git.bb b/meta/recipes-bsp/uboot/u-boot_git.bb index 4c8f5df597..0fbb9ba188 100644 --- a/meta/recipes-bsp/uboot/u-boot_git.bb +++ b/meta/recipes-bsp/uboot/u-boot_git.bb | |||
@@ -1,5 +1,11 @@ | |||
1 | require u-boot.inc | 1 | require u-boot.inc |
2 | 2 | ||
3 | # To build u-boot for your machine, provide the following lines in your machine | ||
4 | # config, replacing the assignments as appropriate for your machine. | ||
5 | # UBOOT_MACHINE = "omap3_beagle_config" | ||
6 | # UBOOT_ENTRYPOINT = "0x80008000" | ||
7 | # UBOOT_LOADADDRESS = "0x80008000" | ||
8 | |||
3 | LICENSE = "GPLv2+" | 9 | LICENSE = "GPLv2+" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \ | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \ |
5 | file://README;beginline=1;endline=22;md5=3a00ef51d3fc96e9d6c1bc4708ccd3b5" | 11 | file://README;beginline=1;endline=22;md5=3a00ef51d3fc96e9d6c1bc4708ccd3b5" |
@@ -12,11 +18,6 @@ PR="r3" | |||
12 | 18 | ||
13 | SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git" | 19 | SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git" |
14 | 20 | ||
15 | UBOOT_MACHINE_beagleboard = "omap3_beagle_config" | ||
16 | UBOOT_MACHINE_overo = "omap3_overo_config" | ||
17 | |||
18 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
19 | 22 | ||
20 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 23 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
21 | |||
22 | COMPATIBLE_MACHINE = "(beagleboard|overo)" | ||