From owner-freebsd-arch@FreeBSD.ORG Fri Jan 16 09:50:16 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B25D106571B; Fri, 16 Jan 2009 09:50:16 +0000 (UTC) (envelope-from ck-lists@cksoft.de) Received: from mx1.cksoft.de (mx1.cksoft.de [62.111.66.10]) by mx1.freebsd.org (Postfix) with ESMTP id DC89A8FC26; Fri, 16 Jan 2009 09:50:15 +0000 (UTC) (envelope-from ck-lists@cksoft.de) Received: from m.cksoft.de (m.cksoft.de [192.168.64.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.cksoft.de (Postfix) with ESMTP id 1A1612EB862; Fri, 16 Jan 2009 10:32:48 +0100 (CET) Received: from amavis.ahti.cksoft.de (amavis.ahti.cksoft.de [IPv6:2001:4068:10:1::201]) by m.cksoft.de (Postfix) with ESMTP id 36816ED04B; Fri, 16 Jan 2009 10:32:48 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from m.cksoft.de ([192.168.64.204]) by amavis.ahti.cksoft.de (amavis.ahti.cksoft.de [192.168.64.201]) (amavisd-new, port 10024) with ESMTP id wFKyk25yLDZm; Fri, 16 Jan 2009 10:32:40 +0100 (CET) Received: from tapio.cksoft.de (tapio.cksoft.de [IPv6:2001:4068:10:1:218:8bff:fe76:5932]) by m.cksoft.de (Postfix) with ESMTP id 3213BECFB4; Fri, 16 Jan 2009 10:32:39 +0100 (CET) Received: by tapio.cksoft.de (Postfix, from userid 1000) id A6732B8DC; Fri, 16 Jan 2009 10:32:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by tapio.cksoft.de (Postfix) with ESMTP id 98DCDB809; Fri, 16 Jan 2009 10:32:39 +0100 (CET) Date: Fri, 16 Jan 2009 10:32:39 +0100 (CET) From: Christian Kratzer X-X-Sender: ck@tapio.cksoft.de To: Andrew Hotlab In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-Spammer-Kill-Ratio: 75% MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-i386@amd.org, freebsd-amd64@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Cross compiling FreeBSD X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Christian Kratzer List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2009 09:50:17 -0000 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