[yocto] x86_64 kernel with i586 userland plus SDK?

Richard Weinberger richard.weinberger at gmail.com
Mon Dec 17 05:50:57 PST 2018


Bruce,

On Mon, Dec 17, 2018 at 2:47 PM Bruce Ashfield
<bruce.ashfield at windriver.com> wrote:
> > Yocto seems to try a different approach.
> > When I use qemux86-64.conf with DEFAULTTUNE being "i586" it generates a 32bit
> > toolchain by default.
> >
> > Build Configuration:
> > BB_VERSION           = "1.38.0"
> > BUILD_SYS            = "x86_64-linux"
> > NATIVELSBSTRING      = "universal"
> > TARGET_SYS           = "i686-poky-linux"
> > MACHINE              = "myqemux86-64"
> > DISTRO               = "poky"
> > DISTRO_VERSION       = "2.5.1"
> > TUNE_FEATURES        = "m32 i586"
> >
> > What I need is a x86_64-poky-linux toolchain with -m32 set for everything except
> > kernel (and modules).
>
> For the most part the kernel builds do not take any flags from the
> outside, i.e. they are all generated based on the kernel build
> structure, not what is calling the build. (unless you bury flags
> into the definition of $(CC), etc, but I wouldn't recommend that.
>
> So if you have a 64 bit capable toolchain, have a 64 bit configured
> kernel (i.e. CONFIG_64BIT=y), are passing -m32 to usespace .. the
> kernel really should build 64bit.

This was my plan, but yocto always create a 32bit toolchain when
it set DEFAULTTUNE to i586 for a 64bit machine.

> Have you tried that and are seeing the kernel still be built with the
> 32bit toolchain ?

Yes, it builds with i686-poky-linux. :-(

-- 
Thanks,
//richard


More information about the yocto mailing list