cross build world on amd64 install on ppc
Andreas Tobler
andreast-list at fgznet.ch
Sun Mar 15 11:57:16 PDT 2009
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
More information about the freebsd-ppc
mailing list