Date: Fri, 16 Jan 2009 10:24:46 +0000 From: Andrew Hotlab <andrew.hotlab@hotmail.com> To: <ck@cksoft.de> Cc: freebsd-i386@freebsd.org, freebsd-amd64@freebsd.org, freebsd-arch@freebsd.org Subject: RE: Cross compiling FreeBSD Message-ID: <COL112-W780FD46B6DB58A4A4DD545F6D40@phx.gbl> In-Reply-To: <alpine.BSF.2.00.0901161027550.14974@tapio.cksoft.de> References: <COL112-W14559CEDAEB8C5373A03B4F6D60@phx.gbl> <alpine.BSF.2.00.0901161027550.14974@tapio.cksoft.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Fri, 16 Jan 2009 10:32:39 +0100 > From: ck-lists@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! http://www.live.com/getstarted.aspx
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?COL112-W780FD46B6DB58A4A4DD545F6D40>
