Re: Compiling barebox for newest Yocto/meta-freescale

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux