Date: Fri, 16 Jan 2009 10:32:39 +0100 (CET) From: Christian Kratzer <ck-lists@cksoft.de> To: Andrew Hotlab <andrew.hotlab@hotmail.com> Cc: freebsd-i386@amd.org, freebsd-amd64@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Cross compiling FreeBSD Message-ID: <alpine.BSF.2.00.0901161027550.14974@tapio.cksoft.de> In-Reply-To: <COL112-W14559CEDAEB8C5373A03B4F6D60@phx.gbl> References: <COL112-W14559CEDAEB8C5373A03B4F6D60@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Wed, 14 Jan 2009, Andrew Hotlab wrote: > >> From: andrew.hotlab@hotmail.com >> To: freebsd-questions@freebsd.org >> Subject: Builder for many architectures and releases >> Date: Sat, 10 Jan 2009 02:37:37 +0000 >> >> [...] I looked for any documentation about setup a FreeBSD builder machine which will track sources and build binaries for all the hardware platform and OS releases I need to support in my network. I have found some interesting articles (http://www.onlamp.com/pub/a/bsd/2006/04/13/freebsd-build-system.html - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/small-lan.html), but nothing which actually addresses my needs. [...] >> > > At this time, I've tried to build RELENG_7_1 for the i386 architecture using an amd64 machine (running RELENG_7_0 for amd64) then, exporting /usr/src and /usr/obj via NFS in read-only mode to target machines, I've experienced a lot of troubles trying to install both kernel and world, which made impossible for me to install FreeBSD on target i386 machines. > Can anyone kindly confirm that it's a supported procedure to compile FreeBSD for a Tier1 architecture by using another Tier1-architecture machine? Maybe I didn't understood documentation or I'm missing some essential steps in the build process? as you already found out this does not work as the crossbuild process will build the native host tools in /usr/obj and the target system binaries in /usr/obj/i386. On recent RELENG_7 or HEAD machines you should be able to build in an i386 chroot. This would produce a clean /usr/obj you can copy to your i386 machines and install from there. The hack to enable building in an i386 chroot is to set UNAME_m and UNAME_p to i386. I use following in the chroots .cshrc setenv UNAME_m i386 setenv UNAME_p i386 This will avoid any crossbuild magic and you will be able to build as if on an i386 machine. This of course only works for the amd64, i386 combination. Greetings Christian -- Christian Kratzer CK Software GmbH Email: ck@cksoft.de Schwarzwaldstr. 31 Phone: +49 7452 889 135 D-71131 Jettingen Fax: +49 7452 889 136 HRB 245288, Amtsgericht Stuttgart Web: http://www.cksoft.de/ Geschaeftsfuehrer: Christian Kratzer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0901161027550.14974>