diff mbox

[v2,3/5] bootimg: Skip iso image build on aarch64

Message ID 1426678029-19516-4-git-send-email-naresh.bhat@linaro.org
State New
Headers show

Commit Message

naresh.bhat@linaro.org March 18, 2015, 11:27 a.m. UTC
To generate bootable ISO image the x86 architecture uses syslinux package (syslinux/isolinux.bin).
We have already skip the syslinux package on aarch64.  Hence skip the iso image build on aarch64.

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 meta/classes/bootimg.bbclass |    1 +
 1 file changed, 1 insertion(+)

Comments

naresh.bhat@linaro.org March 18, 2015, 12:42 p.m. UTC | #1
On 18 March 2015 at 18:05, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
wrote:

> On 18 March 2015 at 12:27, Naresh Bhat <naresh.bhat@linaro.org> wrote:
> > To generate bootable ISO image the x86 architecture uses syslinux
> package (syslinux/isolinux.bin).
> > We have already skip the syslinux package on aarch64.  Hence skip the
> iso image build on aarch64.
> >
> > Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
> > ---
> >  meta/classes/bootimg.bbclass |    1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
> > index ed7b32f..5a8e70c 100644
> > --- a/meta/classes/bootimg.bbclass
> > +++ b/meta/classes/bootimg.bbclass
> > @@ -33,6 +33,7 @@ do_bootimg[depends] +=
> "dosfstools-native:do_populate_sysroot \
> >
> >  PACKAGES = " "
> >  EXCLUDE_FROM_WORLD = "1"
> > +NOISO_aarch64 = "1"
>
> how does that help !COMPATIBLE_HOST (of syslinux) except aarch64?
>
> I meant you to
> def mycheck(d):
>   h = d.getVar('COMPATIBLE_HOST', True)
>   if h:
>     t = d.getVar('TARGET_ARCH', True)
>     if re.match(h, t):
>       return 0
>   return 1
>
> and use that to set NOISO ?= "${@mycheck(d)}"
> (modulo typos and testing)
>
> I think something like that should work and i think this would be
> preferable to adding all those upcoming NOISO_baz
> See what i mean?
>
Thank you very much.  I will do it right now, test with luvos distribution,
re-post this patch.

>
> thanks,
>
naresh.bhat@linaro.org March 19, 2015, 9:47 a.m. UTC | #2
Hi Bernhard Reutner-Fischer,

On 18 March 2015 at 18:12, Naresh Bhat <naresh.bhat@linaro.org> wrote:

>
>
> On 18 March 2015 at 18:05, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com
> > wrote:
>
>> On 18 March 2015 at 12:27, Naresh Bhat <naresh.bhat@linaro.org> wrote:
>> > To generate bootable ISO image the x86 architecture uses syslinux
>> package (syslinux/isolinux.bin).
>> > We have already skip the syslinux package on aarch64.  Hence skip the
>> iso image build on aarch64.
>> >
>> > Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
>> > ---
>> >  meta/classes/bootimg.bbclass |    1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
>> > index ed7b32f..5a8e70c 100644
>> > --- a/meta/classes/bootimg.bbclass
>> > +++ b/meta/classes/bootimg.bbclass
>> > @@ -33,6 +33,7 @@ do_bootimg[depends] +=
>> "dosfstools-native:do_populate_sysroot \
>> >
>> >  PACKAGES = " "
>> >  EXCLUDE_FROM_WORLD = "1"
>> > +NOISO_aarch64 = "1"
>>
>> how does that help !COMPATIBLE_HOST (of syslinux) except aarch64?
>>
>> I meant you to
>> def mycheck(d):
>>   h = d.getVar('COMPATIBLE_HOST', True)
>>   if h:
>>     t = d.getVar('TARGET_ARCH', True)
>>     if re.match(h, t):
>>       return 0
>>   return 1
>>
>> and use that to set NOISO ?= "${@mycheck(d)}"
>> (modulo typos and testing)
>>
>> I think something like that should work and i think this would be
>> preferable to adding all those upcoming NOISO_baz
>> See what i mean?
>>
> Thank you very much.  I will do it right now, test with luvos
> distribution, re-post this patch.
>

I have implemented and tried it with luvOS distribution.

def check_iso_build(d):
       host = d.getVar('COMPATIBLE_HOST', True)
       if host:
            import re
            target = d.getVar('TARGET_ARCH', True)
            if re.match(host, target):
                return 0
       return 1

NOISO ?= "${@check_iso_build(d)}"


For the following reason

The COMPATIBLE_HOST value is NULL.  Now the question is why it contains
value NULL.  That's simply because syslinux recipe does not inherit
bootimg.bbclass.

I did following experiment - The luv-live-image.bb inherit the
bootimg.bbclass hence I have defined the COMPATIBLE_HOST as "x86" or
"aarch64" depending on the build I am doing. This will work for x86
architecture but definitely going to break for aarch64  because of the
below condition

if re.match(host, target):
                return 0

Let me know If I need to experiment/change the logic of the implementation.

>
>> thanks,
>>
>
>
diff mbox

Patch

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index ed7b32f..5a8e70c 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -33,6 +33,7 @@  do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
 
 PACKAGES = " "
 EXCLUDE_FROM_WORLD = "1"
+NOISO_aarch64 = "1"
 
 HDDDIR = "${S}/hddimg"
 ISODIR = "${S}/iso"