From owner-freebsd-ppc@FreeBSD.ORG Sat Mar 14 21:33:07 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DECAD106564A for ; Sat, 14 Mar 2009 21:33:07 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout015.mac.com (asmtpout015.mac.com [17.148.16.90]) by mx1.freebsd.org (Postfix) with ESMTP id CC07F8FC0C for ; Sat, 14 Mar 2009 21:33:07 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from ovautrin-t431.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp015.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KGI007UZMJ6SL30@asmtp015.mac.com> for freebsd-ppc@freebsd.org; Sat, 14 Mar 2009 14:33:07 -0700 (PDT) Message-id: <59998CAE-B90C-4038-A6C8-52C3EB35987E@mac.com> From: Marcel Moolenaar To: Andreas Tobler In-reply-to: <49BC1626.70106@fgznet.ch> Date: Sat, 14 Mar 2009 14:33:05 -0700 References: <49BC1626.70106@fgznet.ch> X-Mailer: Apple Mail (2.930.3) Cc: FreeBSD PowerPC ML Subject: Re: cross build world on amd64 install on ppc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2009 21:33:08 -0000 On Mar 14, 2009, at 1:40 PM, Andreas Tobler wrote: > make -j4 buildlernel TARGET_ARCH=powerpc KERNCONF=GENERIC > make installkernel TARGET_ARCH=powerpc KERNCONF=GENERIC DESTDIR=/tmp > > Now I'd like to do the same for 'buildworld'. make buildworld TARGET_ARCH... make installworld TARGET_ARCH... DESTDIR... > I have taken the approach to nfs export the /usr/src and the /usr/ > obj from the amd64 to the powerpc machine. You can NFS export DESTDIR and mount that on your powerpc machine. > First, is this possible to do a buildkernel/buildworld on an amd64 > for powerpc and then install it on powerpc? Indirectly yes. > Is the nfs approach dead wrong? No, but there are gotchas. For one, a cross build uses /usr/obj/${TARGET_ARCH} as the root of the object tree, whereas a native build simply uses /usr/obj. This needs to be compensated for. Also, as part of a buildworld we build host tools. These you need to build on your powerpc. One way is to do a buildworld on your powerpc machine after doing it on your amd64, making sure that the object tree is shared. This should avoid rebuilding on your powerpc, while making sure the prerequisites are dealt with. > If it is possible to do a cross buildworld how do I install it on > the ppc machine? I think the easiest approach is to do an installworld on your amd64 and mount that on your powerpc machine. You can use rsync to sync your powerpc /. Alternatives are tar, cp -R, etc... It would be great if we can improve the process so that you can build on machine X and install on machine Y, by sharing usr and obj trees. -- Marcel Moolenaar xcllnt@mac.com