cross compiling & Native installing
Ian Lepore
ian at FreeBSD.org
Sat May 10 11:48:02 UTC 2014
On Sat, 2014-05-10 at 09:53 +0200, Matthias Meyser wrote:
> Hi
>
> I xcompile armv6 World and kernel (BEAGLEBONE) on an amd64 machine with
>
> make buildworld TARGET=arm TARGET_ARCH=armv6
> make buildkernel TARGET=arm TARGET_ARCH=armv6 KERNCONF=BEAGLEBONE
>
> this works as expected.
>
> The I want to install world/kernel on the target machine (Beagelbone black)
>
> on the Beagkebone I nfsmount /usr/src /usr/doc /usr/obj exported from
> the build machine.
>
> then I do
>
> cd /usr/src
> make installkernel KERNCONF=BEAGELBONE CROSS_BUILD_TESTING=yes
>
> to install the kernel this does not work
>
> -------------------------8<---------------------------------------------
> --------------------------------------------------------------
> >>> Installing kernel BEAGLEBONE
> --------------------------------------------------------------
> cd /usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE;
> MAKEOBJDIRPREFIX=/usr/obj/arm.armv6 MACHINE_ARCH=armv6 MACHINE=arm
> CPUTYPE= GROFF_BIN_PATH=/usr/obj/arm.armv6/usr/src/tmp/legacy/usr/bin
> GROFF_FONT_PATH=/usr/obj/arm.armv6/usr/src/tmp/legacy/usr/share/groff_font
> GROFF_TMAC_PATH=/usr/obj/arm.armv6/usr/src/tmp/legacy/usr/share/tmac
> PATH=/usr/obj/arm.armv6/usr/src/tmp/legacy/usr/sbin:/usr/obj/arm.armv6/usr/src/tmp/legacy/usr/bin:/usr/obj/arm.armv6/usr/src/tmp/legacy/usr/games:/usr/obj/arm.armv6/usr/src/tmp/legacy/bin:/usr/obj/arm.armv6/usr/src/tmp/usr/sbin:/usr/obj/arm.armv6/usr/src/tmp/usr/bin:/usr/obj/arm.armv6/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
> make KERNEL=kernel install
> cc: Exec format error
> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 12: warning: "cc
> --version" returned non-zero status
> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 20: Unable to determine
> compiler type for cc. Consider setting COMPILER_TYPE.
> *** Error code 1
>
> Stop.
> make[1]: stopped in /usr/src
> *** Error code 1
>
> Stop.
> make: stopped in /usr/src
> -------------------------8<---------------------------------------------
>
> Any hints are welcome.
>
> uname Buildsystem:
> FreeBSD slx00.lan.xenet.de 10.0-STABLE FreeBSD 10.0-STABLE #1 r262074: Tue
> Feb 18 01:00:39 CET 2014
> root at slx00.lan.xenet.de:/usr/obj/usr/src/sys/SLX00 amd64
>
> uname Beaglebone:
> FreeBSD bbb.lan.xenet.de 11.0-CURRENT FreeBSD 11.0-CURRENT #0: Thu May 8
> 10:16:09 CEST 2014 root at bbb.lan.xenet.de:/usr/obj/usr/src/sys/BEAGLEBONE
> arm
>
> /usr/src: latest head
>
>
I think it's the CROSS_BUILD_TESTING that's causing the problem. It's
trying to run the x86 cross-tools during the native install. Try
replacing that with MAKEOBJDIRPREFIX=/usr/obj/arm.armv6. I'm not sure
that'll work, I've never tried to do what you're doing... I do the
install on the same machine as the cross-builds, using
make installworld TARGET_ARCH=armv6 DESTDIR=/path/to/nfsroot
and likewise for installkernel but with KERNCONF added.
-- Ian
More information about the freebsd-arm
mailing list