Compiling barebox for newest Yocto/meta-freescale

Gyorgy Kovesdi kgy at teledigit.eu
Mon Jun 29 03:24:09 PDT 2015


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 at 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




More information about the barebox mailing list