Cross compiling FreeBSD
andrew.hotlab at hotmail.com
Fri Jan 16 02:24:47 PST 2009
> Date: Fri, 16 Jan 2009 10:32:39 +0100
> From: ck-lists at cksoft.de
> On Wed, 14 Jan 2009, Andrew Hotlab wrote:
>> 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.
Sorry for my stupid question: I'll do the right thing if I'll build an i386 jail chroot/jail on the
amd64 builder host with the following commands? (grabbed from the FreeBSD Handbook)
# cd /usr/src
# make buildworld TARGET=i386
# make installworld TARGET=i386 DESTDIR=/path-to-jail
# cd etc/
# make distribution DESTDIR=/path-to-jail
# mount -t devfs devfs /path-to-jail/dev
> 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.
Wonderful, I'll try this as soon as possible. Thank you!
News, entertainment and everything you care about at Live.com. Get it now!
More information about the freebsd-arch