cross compiling & Native installing

Warner Losh imp at bsdimp.com
Sat May 10 15:49:05 UTC 2014


On May 10, 2014, at 1:53 AM, Matthias Meyser <Meyser at xenet.de> 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.

Have you considered setting COMPILER_TYPE to “clang” or something? The problem is that the cross build is trying to invoke the compiler that runs on the x86 box. There are likely other issues similar to this, but give it a try.

Or do as Ian suggested and install from the compile host over NFS.

Warner

> *** 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
> 
> 
> -- 
> Matthias Meyser            | XeNET GmbH
> Tel.:  +49-5323-9489050    | 38678 Clausthal-Zellerfeld, Marktstrasse 40
> Fax:   +49-5323-94014      | Registergericht: Amtsgericht Braunschweig HRB 110823
> Email: Meyser at xenet.de     | Geschaeftsfuehrer: Matthias Meyser
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20140510/f8ffbb2c/attachment.sig>


More information about the freebsd-arm mailing list