From owner-freebsd-arm@FreeBSD.ORG Sat May 10 11:48:02 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4354A8AA for ; Sat, 10 May 2014 11:48:02 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1904739C for ; Sat, 10 May 2014 11:48:01 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Wj5l1-000IuE-ST; Sat, 10 May 2014 11:48:00 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s4ABluPl031625; Sat, 10 May 2014 05:47:56 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/YulGlWWrLZTK8xNLaZ1P+ Subject: Re: cross compiling & Native installing From: Ian Lepore To: Matthias Meyser In-Reply-To: <536DDB0B.7040502@xenet.de> References: <536DDB0B.7040502@xenet.de> Content-Type: text/plain; charset="us-ascii" Date: Sat, 10 May 2014 05:47:55 -0600 Message-ID: <1399722475.22079.382.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 11:48:02 -0000 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@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@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