[OE-core] [OE-core v2 PATCH 3/5] bootimg: Skip iso image build on aarch64

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Mar 19 15:46:52 UTC 2015


On March 19, 2015 10:47:22 AM GMT+01:00, Naresh Bhat <naresh.bhat at linaro.org> wrote:
>Hi Bernhard Reutner-Fischer,
>
>On 18 March 2015 at 18:12, Naresh Bhat <naresh.bhat at linaro.org> wrote:
>
>>
>>
>> On 18 March 2015 at 18:05, Bernhard Reutner-Fischer
><rep.dot.nop at gmail.com
>> > wrote:
>>
>>> On 18 March 2015 at 12:27, Naresh Bhat <naresh.bhat at 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 at 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.

Unfortunately bitbake does not currently allow for inter-package interrogation.
Your distro should (IMHO) set NOISO appropriately (like in that func) and the IMG.bbclass should honour that decision.

HTH,





More information about the Openembedded-core mailing list