From owner-freebsd-ppc@FreeBSD.ORG Sun Mar 15 18:57:15 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 F2DEF106564A for ; Sun, 15 Mar 2009 18:57:15 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 720298FC1A for ; Sun, 15 Mar 2009 18:57:14 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from wolfram.andreas.nets ([91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id n2FIvCVb015946; Sun, 15 Mar 2009 19:57:12 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <49BD4F88.9060305@fgznet.ch> Date: Sun, 15 Mar 2009 19:57:12 +0100 From: Andreas Tobler User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Marcel Moolenaar References: <49BC1626.70106@fgznet.ch> <59998CAE-B90C-4038-A6C8-52C3EB35987E@mac.com> In-Reply-To: <59998CAE-B90C-4038-A6C8-52C3EB35987E@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 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: Sun, 15 Mar 2009 18:57:16 -0000 Marcel Moolenaar wrote: > 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... Yep. >> 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. I'll try that later. >> 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. Yes, I did that already. I did a symbolic link for /usr/obj/${TARGET_ARCH}. But better would be to export the /usr/obj/${TARGET_ARCH} instead of /usr/obj on the nfs server. Then I do not need to bother on the client side. Additionally, if I have different TARGET_ARCH's, I can export them to the dedicated client only and make sure that I do not screw up TARGET_ARCH-A while playing with TARGET_ARCH-B. > 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. Here I have questions: - do I do a 'make buildworld' on the powerpc with -DNO_CLEAN? - or can I somehow 'make bootstrap-tools'? I tried to do a make bootstrap-tools but failed. What I miss are the parts from tmp/legacy/usr in native ppc format. Also, the strip command in native format, maybe other follow. To install a crossbuilt kernel on ppc I changed the tmp/legacy/usr/bin/install to the ppc native one. >> 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... Yes, another possibility. I do not have an urgent need to have a newly built world on my ppc. I'm just playing. > 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. That would be great. I'll continue playing. Thanks so far! Andreas