All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gyorgy Kovesdi <kgy@teledigit.eu>
To: barebox@lists.infradead.org
Subject: Re: Compiling barebox for newest Yocto/meta-freescale
Date: Mon, 29 Jun 2015 12:24:09 +0200	[thread overview]
Message-ID: <20150629122409.1d1c845f@kgy-pc.lan> (raw)
In-Reply-To: <1435156380.25607.28.camel@pengutronix.de>

Hi everybody,

You are right, barebox really cannot be run with hard-float.
I re-enabled soft float in gcc compilation, and now it works perfectly on Yocto build without any modification.

Many thanx
György Kövesdi

On Wed, 24 Jun 2015 16:33:00 +0200
Jan Lübbe <jlu@pengutronix.de> wrote:

> On Di, 2015-06-23 at 21:30 +0200, Lucas Stach wrote:
> > Also you don't have a hard-float only environment, your toolchain is
> > perfectly able to build with the soft-float ABI, it's just that Yocto
> > apparently passes the mfloat-abi=hard flag everywhere instead of
> > setting a reasonable toolchain default.
> 
> I have the same problem now, as well (triggered by setting
> DEFAULTTUNE="cortexa8hf-neon").
> 
> The kernel uses the same -msoft-float in arch/arm/Makefile as we do in
> barebox. As Lucas said, this is actually important for correct behavior.
> 
> Yocto handles this by building the kernel with CC="${KERNEL_CC}"
> LD="${KERNEL_LD}" instead (see kernel.bbclass and kernel-arch.bbclass).
> For barebox I now have:
> do_compile () {
>         unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>         oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> }
> 
> These settings make it impossible to build the barebox target userspace
> tools from scripts/, though. This is because the --sysroot parameter is
> passed by Yocto only in ${CC} and not in ${KERNEL_CC}, so the target
> userspace tools will fail to find their standard headers. So I have as a
> temporary workaround:
> do_configure_prepend() {
>         cp ${WORKDIR}/defconfig ${S}/.config
>         # do not compile tools when using KERNEL_CC/KERNEL_LD
>         echo CONFIG_BAREBOXENV_TARGET=n >> ${S}/.config
>         echo CONFIG_BAREBOXCRC32_TARGET=n >> ${S}/.config
>         echo CONFIG_KERNEL_INSTALL_TARGET=n >> ${S}/.config
>         echo CONFIG_IMD_TARGET=n >> ${S}/.config
>         oe_runmake oldconfig
> }
> 
> To compile the target userspace tools, we'll need to use ${CC} instead,
> which is currently not supported by our (or the kernel's) kbuild. It
> seems that we currently build these tools with -msoft-float as well,
> which causes no problems because we don't use float math, but it's not
> correct either.
> 
> Gyorgy, could you point us to the Yocto side of the discussion, if it
> was on some list?
> 
> Regards,
> Jan


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2015-06-29 10:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 15:18 Compiling barebox for newest Yocto/meta-freescale György Kövesdi
2015-06-23  8:12 ` Jan Lübbe
2015-06-23 11:29   ` György Kövesdi
2015-06-23 12:22     ` Holger Schurig
2015-06-23 13:40       ` György Kövesdi
2015-06-23 14:07         ` Holger Schurig
2015-06-23 14:52           ` György Kövesdi
2015-06-23 15:01             ` Holger Schurig
2015-06-23 17:57               ` Gyorgy Kovesdi
2015-06-23 19:30                 ` Lucas Stach
2015-06-24 14:33                   ` Jan Lübbe
2015-06-24 19:59                     ` Fabio Estevam
2015-06-29 10:24                     ` Gyorgy Kovesdi [this message]

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=20150629122409.1d1c845f@kgy-pc.lan \
    --to=kgy@teledigit.eu \
    --cc=barebox@lists.infradead.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.