Patchwork [meta-fsl-arm-extra,1/4] barebox: add a recipe to support mainline 2013.08.0

login
register
mail settings
Submitter Alexandre Belloni
Date Aug. 22, 2013, 2:51 p.m.
Message ID <1377183077-5270-2-git-send-email-alexandre.belloni@free-electrons.com>
Download mbox | patch
Permalink /patch/56269/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Alexandre Belloni - Aug. 22, 2013, 2:51 p.m.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 recipes-bsp/barebox/barebox_2013.08.0.bb | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 recipes-bsp/barebox/barebox_2013.08.0.bb
Otavio Salvador - Aug. 22, 2013, 5:04 p.m.
On Thu, Aug 22, 2013 at 11:51 AM, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Update the fsl-arm recipes; let the board machine specific fields to a
bbappend in the extra layer.
Eric BENARD - Aug. 22, 2013, 5:14 p.m.
Hi Alexandre,

Le Thu, 22 Aug 2013 16:51:14 +0200,
Alexandre Belloni <alexandre.belloni@free-electrons.com> a écrit :

> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  recipes-bsp/barebox/barebox_2013.08.0.bb | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644 recipes-bsp/barebox/barebox_2013.08.0.bb
> 
> diff --git a/recipes-bsp/barebox/barebox_2013.08.0.bb b/recipes-bsp/barebox/barebox_2013.08.0.bb
> new file mode 100644
> index 0000000..2f6118b
> --- /dev/null
> +++ b/recipes-bsp/barebox/barebox_2013.08.0.bb
> @@ -0,0 +1,26 @@
> +require recipes-bsp/barebox/barebox.inc
> +
> +PR = "r1"
> +
> +SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2"
> +
> +SRC_URI[md5sum] = "a61b97a2fedebc808d4b182c2ca18a0c"
> +SRC_URI[sha256sum] = "d9e46dd3c68b04ab4cbc37135dc34907dbebef393da4b3e54abb203c295c1620"
> +
> +python () {
> +	if not d.getVar("BAREBOX_MACHINE", True):
> +		PN = d.getVar("PN", True)
> +		FILE = os.path.basename(d.getVar("FILE", True))
> +		bb.debug(1, "To build %s, see %s for instructions on \
> +			     setting up your machine config" % (PN, FILE))
> +		raise bb.parse.SkipPackage("BAREBOX_MACHINE is not set in the %s machine configuration." % d.getVar("MACHINE", True))
> +}
> +

if you plan to create a generic barebox recipe and as barebox is using
Kconfig like Linux does, I would recommend to include the defconfig for
your board here as done on the kernel side instead of using the
defconfig which may exist into barebox's mainline sources (that makes
customization easier especially when using SOM).

If you don't plan do create the generic barebox recipe, that's still on
my todo list but with a very low priority :-)

Best regards,
Eric
Otavio Salvador - Aug. 22, 2013, 6 p.m.
On Thu, Aug 22, 2013 at 2:14 PM, Eric Bénard <eric@eukrea.com> wrote:
> Hi Alexandre,
>
> Le Thu, 22 Aug 2013 16:51:14 +0200,
> Alexandre Belloni <alexandre.belloni@free-electrons.com> a écrit :
>
>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>> ---
>>  recipes-bsp/barebox/barebox_2013.08.0.bb | 26 ++++++++++++++++++++++++++
>>  1 file changed, 26 insertions(+)
>>  create mode 100644 recipes-bsp/barebox/barebox_2013.08.0.bb
>>
>> diff --git a/recipes-bsp/barebox/barebox_2013.08.0.bb b/recipes-bsp/barebox/barebox_2013.08.0.bb
>> new file mode 100644
>> index 0000000..2f6118b
>> --- /dev/null
>> +++ b/recipes-bsp/barebox/barebox_2013.08.0.bb
>> @@ -0,0 +1,26 @@
>> +require recipes-bsp/barebox/barebox.inc
>> +
>> +PR = "r1"
>> +
>> +SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2"
>> +
>> +SRC_URI[md5sum] = "a61b97a2fedebc808d4b182c2ca18a0c"
>> +SRC_URI[sha256sum] = "d9e46dd3c68b04ab4cbc37135dc34907dbebef393da4b3e54abb203c295c1620"
>> +
>> +python () {
>> +     if not d.getVar("BAREBOX_MACHINE", True):
>> +             PN = d.getVar("PN", True)
>> +             FILE = os.path.basename(d.getVar("FILE", True))
>> +             bb.debug(1, "To build %s, see %s for instructions on \
>> +                          setting up your machine config" % (PN, FILE))
>> +             raise bb.parse.SkipPackage("BAREBOX_MACHINE is not set in the %s machine configuration." % d.getVar("MACHINE", True))
>> +}
>> +
>
> if you plan to create a generic barebox recipe and as barebox is using
> Kconfig like Linux does, I would recommend to include the defconfig for
> your board here as done on the kernel side instead of using the
> defconfig which may exist into barebox's mainline sources (that makes
> customization easier especially when using SOM).
>
> If you don't plan do create the generic barebox recipe, that's still on
> my todo list but with a very low priority :-)

Agreed.
Alexandre Belloni - Aug. 22, 2013, 11:06 p.m.
On 22/08/2013 20:00, Otavio Salvador wrote:
> On Thu, Aug 22, 2013 at 2:14 PM, Eric Bénard <eric@eukrea.com> wrote:
>> Hi Alexandre,
>>
>> Le Thu, 22 Aug 2013 16:51:14 +0200,
>> Alexandre Belloni <alexandre.belloni@free-electrons.com> a écrit :
>>
>>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>>> ---
>>>  recipes-bsp/barebox/barebox_2013.08.0.bb | 26 ++++++++++++++++++++++++++
>>>  1 file changed, 26 insertions(+)
>>>  create mode 100644 recipes-bsp/barebox/barebox_2013.08.0.bb
>>>
>>> diff --git a/recipes-bsp/barebox/barebox_2013.08.0.bb b/recipes-bsp/barebox/barebox_2013.08.0.bb
>>> new file mode 100644
>>> index 0000000..2f6118b
>>> --- /dev/null
>>> +++ b/recipes-bsp/barebox/barebox_2013.08.0.bb
>>> @@ -0,0 +1,26 @@
>>> +require recipes-bsp/barebox/barebox.inc
>>> +
>>> +PR = "r1"
>>> +
>>> +SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2"
>>> +
>>> +SRC_URI[md5sum] = "a61b97a2fedebc808d4b182c2ca18a0c"
>>> +SRC_URI[sha256sum] = "d9e46dd3c68b04ab4cbc37135dc34907dbebef393da4b3e54abb203c295c1620"
>>> +
>>> +python () {
>>> +     if not d.getVar("BAREBOX_MACHINE", True):
>>> +             PN = d.getVar("PN", True)
>>> +             FILE = os.path.basename(d.getVar("FILE", True))
>>> +             bb.debug(1, "To build %s, see %s for instructions on \
>>> +                          setting up your machine config" % (PN, FILE))
>>> +             raise bb.parse.SkipPackage("BAREBOX_MACHINE is not set in the %s machine configuration." % d.getVar("MACHINE", True))
>>> +}
>>> +
>> if you plan to create a generic barebox recipe and as barebox is using
>> Kconfig like Linux does, I would recommend to include the defconfig for
>> your board here as done on the kernel side instead of using the
>> defconfig which may exist into barebox's mainline sources (that makes
>> customization easier especially when using SOM).
>>
>> If you don't plan do create the generic barebox recipe, that's still on
>> my todo list but with a very low priority :-)
> Agreed.
>
I'm actually wondering about that. The defconfig included in the barebox
mainline is perfectly fine. And people wanting to change it will have to
write a bbappend anyway or am I missing something ?
Anyway, I don't have a strong opinion on that one.
Otavio Salvador - Aug. 23, 2013, 12:22 a.m.
On Thu, Aug 22, 2013 at 8:06 PM, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> On 22/08/2013 20:00, Otavio Salvador wrote:
>> On Thu, Aug 22, 2013 at 2:14 PM, Eric Bénard <eric@eukrea.com> wrote:
>>> Hi Alexandre,
>>>
>>> Le Thu, 22 Aug 2013 16:51:14 +0200,
>>> Alexandre Belloni <alexandre.belloni@free-electrons.com> a écrit :
>>>
>>>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>>>> ---
>>>>  recipes-bsp/barebox/barebox_2013.08.0.bb | 26 ++++++++++++++++++++++++++
>>>>  1 file changed, 26 insertions(+)
>>>>  create mode 100644 recipes-bsp/barebox/barebox_2013.08.0.bb
>>>>
>>>> diff --git a/recipes-bsp/barebox/barebox_2013.08.0.bb b/recipes-bsp/barebox/barebox_2013.08.0.bb
>>>> new file mode 100644
>>>> index 0000000..2f6118b
>>>> --- /dev/null
>>>> +++ b/recipes-bsp/barebox/barebox_2013.08.0.bb
>>>> @@ -0,0 +1,26 @@
>>>> +require recipes-bsp/barebox/barebox.inc
>>>> +
>>>> +PR = "r1"
>>>> +
>>>> +SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2"
>>>> +
>>>> +SRC_URI[md5sum] = "a61b97a2fedebc808d4b182c2ca18a0c"
>>>> +SRC_URI[sha256sum] = "d9e46dd3c68b04ab4cbc37135dc34907dbebef393da4b3e54abb203c295c1620"
>>>> +
>>>> +python () {
>>>> +     if not d.getVar("BAREBOX_MACHINE", True):
>>>> +             PN = d.getVar("PN", True)
>>>> +             FILE = os.path.basename(d.getVar("FILE", True))
>>>> +             bb.debug(1, "To build %s, see %s for instructions on \
>>>> +                          setting up your machine config" % (PN, FILE))
>>>> +             raise bb.parse.SkipPackage("BAREBOX_MACHINE is not set in the %s machine configuration." % d.getVar("MACHINE", True))
>>>> +}
>>>> +
>>> if you plan to create a generic barebox recipe and as barebox is using
>>> Kconfig like Linux does, I would recommend to include the defconfig for
>>> your board here as done on the kernel side instead of using the
>>> defconfig which may exist into barebox's mainline sources (that makes
>>> customization easier especially when using SOM).
>>>
>>> If you don't plan do create the generic barebox recipe, that's still on
>>> my todo list but with a very low priority :-)
>> Agreed.
>>
> I'm actually wondering about that. The defconfig included in the barebox
> mainline is perfectly fine. And people wanting to change it will have to
> write a bbappend anyway or am I missing something ?
> Anyway, I don't have a strong opinion on that one.

This is the way to go in longterm as it allow for easy customization
and user can easy change it in GIT for testing something.
Eric BENARD - Aug. 23, 2013, 7:05 a.m.
Hi Alexandre,

Le Fri, 23 Aug 2013 01:06:14 +0200,
Alexandre Belloni <alexandre.belloni@free-electrons.com> a écrit :

> On 22/08/2013 20:00, Otavio Salvador wrote:
> > On Thu, Aug 22, 2013 at 2:14 PM, Eric Bénard <eric@eukrea.com> wrote:
> >> Hi Alexandre,
> >>
> >> Le Thu, 22 Aug 2013 16:51:14 +0200,
> >> Alexandre Belloni <alexandre.belloni@free-electrons.com> a écrit :
> >>
> >>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> >>> ---
> >>>  recipes-bsp/barebox/barebox_2013.08.0.bb | 26 ++++++++++++++++++++++++++
> >>>  1 file changed, 26 insertions(+)
> >>>  create mode 100644 recipes-bsp/barebox/barebox_2013.08.0.bb
> >>>
> >>> diff --git a/recipes-bsp/barebox/barebox_2013.08.0.bb b/recipes-bsp/barebox/barebox_2013.08.0.bb
> >>> new file mode 100644
> >>> index 0000000..2f6118b
> >>> --- /dev/null
> >>> +++ b/recipes-bsp/barebox/barebox_2013.08.0.bb
> >>> @@ -0,0 +1,26 @@
> >>> +require recipes-bsp/barebox/barebox.inc
> >>> +
> >>> +PR = "r1"
> >>> +
> >>> +SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2"
> >>> +
> >>> +SRC_URI[md5sum] = "a61b97a2fedebc808d4b182c2ca18a0c"
> >>> +SRC_URI[sha256sum] = "d9e46dd3c68b04ab4cbc37135dc34907dbebef393da4b3e54abb203c295c1620"
> >>> +
> >>> +python () {
> >>> +     if not d.getVar("BAREBOX_MACHINE", True):
> >>> +             PN = d.getVar("PN", True)
> >>> +             FILE = os.path.basename(d.getVar("FILE", True))
> >>> +             bb.debug(1, "To build %s, see %s for instructions on \
> >>> +                          setting up your machine config" % (PN, FILE))
> >>> +             raise bb.parse.SkipPackage("BAREBOX_MACHINE is not set in the %s machine configuration." % d.getVar("MACHINE", True))
> >>> +}
> >>> +
> >> if you plan to create a generic barebox recipe and as barebox is using
> >> Kconfig like Linux does, I would recommend to include the defconfig for
> >> your board here as done on the kernel side instead of using the
> >> defconfig which may exist into barebox's mainline sources (that makes
> >> customization easier especially when using SOM).
> >>
> >> If you don't plan do create the generic barebox recipe, that's still on
> >> my todo list but with a very low priority :-)
> > Agreed.
> >
> I'm actually wondering about that. The defconfig included in the barebox
> mainline is perfectly fine. And people wanting to change it will have to
> write a bbappend anyway or am I missing something ?

a bbappend will be needed but in that case the python () which skips the
package if BAREBOX_MACHINE is not set shouldn't go in the default
barebox recipe else every machine using barebox will have to set
BAREBOX_MACHINE and then to hack the defconfig after pre_configure.

Eric

Patch

diff --git a/recipes-bsp/barebox/barebox_2013.08.0.bb b/recipes-bsp/barebox/barebox_2013.08.0.bb
new file mode 100644
index 0000000..2f6118b
--- /dev/null
+++ b/recipes-bsp/barebox/barebox_2013.08.0.bb
@@ -0,0 +1,26 @@ 
+require recipes-bsp/barebox/barebox.inc
+
+PR = "r1"
+
+SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "a61b97a2fedebc808d4b182c2ca18a0c"
+SRC_URI[sha256sum] = "d9e46dd3c68b04ab4cbc37135dc34907dbebef393da4b3e54abb203c295c1620"
+
+python () {
+	if not d.getVar("BAREBOX_MACHINE", True):
+		PN = d.getVar("PN", True)
+		FILE = os.path.basename(d.getVar("FILE", True))
+		bb.debug(1, "To build %s, see %s for instructions on \
+			     setting up your machine config" % (PN, FILE))
+		raise bb.parse.SkipPackage("BAREBOX_MACHINE is not set in the %s machine configuration." % d.getVar("MACHINE", True))
+}
+
+do_pre_configure() {
+	oe_runmake ${BAREBOX_MACHINE}
+}
+
+do_env_deploy() {
+}
+
+COMPATIBLE_MACHINE = "cfa10036"