mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Jan Lübbe" <jlu@pengutronix.de>
To: Lucas Stach <dev@lynxeye.de>
Cc: barebox@lists.infradead.org, Gyorgy Kovesdi <kgy@teledigit.eu>,
	Holger Hans Peter Freyther <holger@freyther.de>
Subject: Re: Compiling barebox for newest Yocto/meta-freescale
Date: Wed, 24 Jun 2015 16:33:00 +0200	[thread overview]
Message-ID: <1435156380.25607.28.camel@pengutronix.de> (raw)
In-Reply-To: <1435087804.28585.8.camel@lynxeye.de>

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
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

  reply	other threads:[~2015-06-24 14:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 15:18 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 [this message]
2015-06-24 19:59                     ` Fabio Estevam
2015-06-29 10:24                     ` Gyorgy Kovesdi

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=1435156380.25607.28.camel@pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=dev@lynxeye.de \
    --cc=holger@freyther.de \
    --cc=kgy@teledigit.eu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox