Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Mar 2009 14:33:05 -0700
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        Andreas Tobler <andreast-list@fgznet.ch>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: cross build world on amd64 install on ppc
Message-ID:  <59998CAE-B90C-4038-A6C8-52C3EB35987E@mac.com>
In-Reply-To: <49BC1626.70106@fgznet.ch>
References:  <49BC1626.70106@fgznet.ch>

next in thread | previous in thread | raw e-mail | index | archive | help

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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?59998CAE-B90C-4038-A6C8-52C3EB35987E>