All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@sigma-star.at>
To: richard.purdie@linuxfoundation.org, yocto@yoctoproject.org
Subject: Re: x86_64 kernel with i586 userland plus SDK?
Date: Mon, 17 Dec 2018 13:18:10 +0100	[thread overview]
Message-ID: <5071759.uEPJhu1AMY@blindfold> (raw)
In-Reply-To: <d17af21817915d847a9bb508f6380195cd76d8dc.camel@linuxfoundation.org>

Richard,

Am Montag, 17. Dezember 2018, 11:34:08 CET schrieb richard.purdie@linuxfoundation.org:
> On Mon, 2018-12-17 at 11:26 +0100, Richard Weinberger wrote:
> > On Wed, Nov 28, 2018 at 9:42 AM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > > The system can definitely do it, its just not something we tend to
> > > do
> > > very often so its not entirely clear the best way to do it.
> > > 
> > > What may work is selecting the i586 tune from an x64-64 target
> > > machine?
> > > 
> > > Copying qemux86-64.conf to qemux86-64-2.conf and changing it to
> > > have
> > > DEFAULTTUNE ?= "i586" did appear to start to build at least in a
> > > quick
> > > test here...
> > 
> > I went this approach for now.
> > That way I get i586 userland and an SDK with both 32bit and 64bit
> > toolchains.
> > The SDK offers me multiple environment files to include.
> > 
> > What I don't understand right now is, how can i tell the kernel
> > recipe
> > that it has
> > to use the 64bit toolchain to build the kernel?
> > 
> > Any hints?
> 
> I think (but am going from memory) that the x86 toolchains can generate
> 64 and 32 bit code with the right compiler option. The kernel just
> passes in the right options if configured to build as 64 bit even if it
> has the 32 bit toolchain?

This was my hope, and this is also what I get when doing such builds manually.
Having a x86_64 gcc and building userspace with "-m32" appended.

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).

Thanks,
//richard

-- 
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y




  reply	other threads:[~2018-12-17 12:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 21:46 x86_64 kernel with i586 userland plus SDK? Richard Weinberger
2018-11-28  2:19 ` ChenQi
2018-11-28  8:42 ` Richard Purdie
2018-11-28 20:26   ` Richard Weinberger
2018-12-03  8:52     ` Richard Weinberger
2018-12-04 16:49       ` richard.purdie
2018-12-17 10:26   ` Richard Weinberger
2018-12-17 10:34     ` richard.purdie
2018-12-17 12:18       ` Richard Weinberger [this message]
2018-12-17 12:25       ` Richard Weinberger
2018-12-17 13:47         ` Bruce Ashfield
2018-12-17 13:50           ` Richard Weinberger
2018-12-17 13:53             ` Bruce Ashfield
2018-12-17 14:00               ` Richard Weinberger
2018-12-17 20:13                 ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5071759.uEPJhu1AMY@blindfold \
    --to=richard@sigma-star.at \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.