From: Darren Hart <dvhart@linux.intel.com>
To: Jason Kridner <jkridner@beagleboard.org>
Cc: Koen Kooi <koen@dominion.thruhere.net>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [pull-oe-uboot 1/2] u-boot: remove UBOOT_MACHINE and COMPATIBLE_MACHINES
Date: Thu, 26 May 2011 06:50:07 -0700 [thread overview]
Message-ID: <4DDE5A8F.5050101@linux.intel.com> (raw)
In-Reply-To: <732E0947-423B-4DD0-BA56-4C11313BD5DA@beagleboard.org>
On 05/26/2011 12:47 AM, Jason Kridner wrote:
> I think this is a good change. One comment below...
>
> On May 26, 2011, at 12:02 AM, Darren Hart <dvhart@linux.intel.com> wrote:
>
>> 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.
>>
>> 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>
>> ---
>> meta/recipes-bsp/uboot/u-boot.inc | 8 +++++++-
>> meta/recipes-bsp/uboot/u-boot_git.bb | 11 ++++++-----
>> 2 files changed, 13 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/recipes-bsp/uboot/u-boot.inc b/meta/recipes-bsp/uboot/u-boot.inc
>> index 058e3ba..a54cf24 100644
>> --- a/meta/recipes-bsp/uboot/u-boot.inc
>> +++ b/meta/recipes-bsp/uboot/u-boot.inc
>> @@ -11,7 +11,13 @@ PARALLEL_MAKE=""
>> # GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS
>> EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS='-O2'"
>>
>> -UBOOT_MACHINE ?= "${MACHINE}_config"
>> +python () {
>> + if not bb.data.getVar('UBOOT_MACHINE', d, 1):
>> + bb.debug("To build %s, see u-boot_git.bb for instructions on \
>
> If this file was renamed, don't you also want to update this printout?
Oh, tricky. This should be addressed in the 2/2 patch.... but what to
name it too. Do I have access to the filename of the recipe that
included this one, causing this code to run? Perhaps I should move the
instructions into this .inc file since the u-boot_*.bb recipe name will
change over time if my 2/2 patch is accepted?
Thoughts?
--
Darren
>
>> + setting up your machine config" % pn)
>> + raise bb.parse.SkipPackage("because UBOOT_MACHINE is not set")
>> +}
>> +
>> UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
>> UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
>> 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 4c8f5df..0fbb9ba 100644
>> --- a/meta/recipes-bsp/uboot/u-boot_git.bb
>> +++ b/meta/recipes-bsp/uboot/u-boot_git.bb
>> @@ -1,5 +1,11 @@
>> require u-boot.inc
>>
>> +# To build u-boot for your machine, provide the following lines in your machine
>> +# config, replacing the assignments as appropriate for your machine.
>> +# UBOOT_MACHINE = "omap3_beagle_config"
>> +# UBOOT_ENTRYPOINT = "0x80008000"
>> +# UBOOT_LOADADDRESS = "0x80008000"
>> +
>> LICENSE = "GPLv2+"
>> LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
>> file://README;beginline=1;endline=22;md5=3a00ef51d3fc96e9d6c1bc4708ccd3b5"
>> @@ -12,11 +18,6 @@ PR="r3"
>>
>> SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
>>
>> -UBOOT_MACHINE_beagleboard = "omap3_beagle_config"
>> -UBOOT_MACHINE_overo = "omap3_overo_config"
>> -
>> S = "${WORKDIR}/git"
>>
>> PACKAGE_ARCH = "${MACHINE_ARCH}"
>> -
>> -COMPATIBLE_MACHINE = "(beagleboard|overo)"
>> --
>> 1.7.1
>>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2011-05-26 13:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 5:01 [PATCH 0/2] u-boot updates to make it more bbappend friendly Darren Hart
2011-05-26 5:02 ` [pull-oe-uboot 1/2] u-boot: remove UBOOT_MACHINE and COMPATIBLE_MACHINES Darren Hart
2011-05-26 7:47 ` Jason Kridner
2011-05-26 13:50 ` Darren Hart [this message]
2011-05-26 14:08 ` Chris Larson
2011-05-26 10:50 ` Phil Blundell
2011-05-26 14:37 ` Richard Purdie
2011-05-26 16:18 ` Phil Blundell
2011-05-26 17:46 ` Darren Hart
2011-05-27 14:04 ` Phil Blundell
2011-05-27 15:06 ` Darren Hart
2011-05-27 15:11 ` Phil Blundell
2011-05-26 5:02 ` [pull-oe-uboot 2/2] u-boot: rename u-boot_git.bb to u-boot_${PV}.bb Darren Hart
2011-05-26 7:58 ` Jason Kridner
2011-05-26 13:52 ` Darren Hart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DDE5A8F.5050101@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=jkridner@beagleboard.org \
--cc=koen@dominion.thruhere.net \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox