[v1,2/5] syslinux: Remove bootimg dependency on aarch64

Message ID 1426258527-2329-3-git-send-email-naresh.bhat@linaro.org
State New
Headers show

Commit Message

naresh.bhat@linaro.org March 13, 2015, 2:55 p.m.
Remove the bootimg dependency as syslinux for aarch64. The reason to skip the syslinux package
- syslinux package contains x86 assembly code. Hence it cannot be compiled on aarch64.
- There is no BIOS on aarch64 to answer syscalls.

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 meta/classes/syslinux.bbclass |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

naresh.bhat@linaro.org March 13, 2015, 5:03 p.m. | #1
On 13 March 2015 at 21:29, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:
> > Remove the bootimg dependency as syslinux for aarch64. The reason to
> skip the syslinux package
> > - syslinux package contains x86 assembly code. Hence it cannot be
> compiled on aarch64.
> > - There is no BIOS on aarch64 to answer syscalls.
> >
> > Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
> > ---
> >  meta/classes/syslinux.bbclass |   10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/syslinux.bbclass
> b/meta/classes/syslinux.bbclass
> > index d6498d9..7bd8fed 100644
> > --- a/meta/classes/syslinux.bbclass
> > +++ b/meta/classes/syslinux.bbclass
> > @@ -17,7 +17,15 @@
> >  # ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot
> argument
> >  # ${SYSLINUX_KERNEL_ARGS} - Add additional kernel arguments
> >
> > -do_bootimg[depends] += "${MLPREFIX}syslinux:do_populate_sysroot \
> > +def boot_image_depends(bb, d):
> > +         import re
> > +         deps = bb.data.getVar('TARGET_PREFIX', d, True)
> > +         if re.search("(x86_64|i.86).*",deps):
> > +                 return "${MLPREFIX}syslinux:do_populate_sysroot"
> > +         if re.search("aarch64",deps):
> > +                 return ""
> > +BIMGDEP = "${@boot_image_depends(bb, d)}"
> > +do_bootimg[depends] += "${BIMGDEP} \
> >                          syslinux-native:do_populate_sysroot"
>
> How about something simpler like:
>
> EXTRABOOTIMGDEPS = ""
> EXTRABOOTIMGDEPS_x86 = "${MLPREFIX}syslinux:do_populate_sysroot"
> EXTRABOOTIMGDEPS_x86-64 = "${MLPREFIX}syslinux:do_populate_sysroot"
>
> ?
>
Thank you very much.  Yes, it is more simple. I will test the same
implementation and make the changes in the next series.

>
> Cheers,
>
> Richard
>
>

Patch

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index d6498d9..7bd8fed 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -17,7 +17,15 @@ 
 # ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot argument
 # ${SYSLINUX_KERNEL_ARGS} - Add additional kernel arguments
 
-do_bootimg[depends] += "${MLPREFIX}syslinux:do_populate_sysroot \
+def boot_image_depends(bb, d):
+         import re
+         deps = bb.data.getVar('TARGET_PREFIX', d, True)
+         if re.search("(x86_64|i.86).*",deps):
+                 return "${MLPREFIX}syslinux:do_populate_sysroot"
+         if re.search("aarch64",deps):
+                 return ""
+BIMGDEP = "${@boot_image_depends(bb, d)}"
+do_bootimg[depends] += "${BIMGDEP} \
                         syslinux-native:do_populate_sysroot"
 
 SYSLINUXCFG  = "${S}/syslinux.cfg"