[darwinbuild] Selecting arch to build for
Shantonu Sen
ssen at opendarwin.org
Thu Aug 4 06:57:26 PDT 2005
On Aug 4, 2005, at 4:35 AM, Alastair Rankine wrote:
> (Darwinports newbie, obviously)
I hope you mean darwinbuild ;-)
> So it seems that when you build xnu, it builds a ppc/i386 universal
> binary. What is the darwinbuild magic to disable this and allow me
> to build a kernel that will run on my Powerbook G4?
The universal binary will work fine on your PowerBook. Did you try it?
> I tried modifying the .build/8C46.plist file to add the following
> to the xnu definition:
>
> environment = {
> RC_ARCHS = "ppc";
> };
>
> But no dice. What am I missing?
Which plist did you edit? (the on in $DARWIN_BUILDROOT/.build/
8C46.plist, the one in your darwinbuild distribution, or one
downloaded independently?) Did you do this before or after you did
"darwinbuild -init 8C46.plist"?
If you did it after, note that plists are only used as a transport
mechanism to seed your local SQLite database. Once you've done either
"darwinbuild -init" (or the corresponding set of "darwinxref
loadIndex" commands), the plist is no longer consulted.
If you edited the plist after configuring your environment, you want
to reload the index for that build with:
/usr/local/bin/darwinxref loadIndex /path/to/plist/8C46.plist
This worked for me. Your RC_ARCHS change is the right one. The only
thing this will save you is time, at the expense of falling outside
the norm of the standard Darwin build configuration. Some projects
don't built at all unless they are built for all supported
architectures, but "xnu" should build fine for ppc only if you really
want this.
> Alternatively, how can I turn the universal binary back into a
> bootable PPC binary? (possibly not a darwinbuild question)
You can use lipo(1). See the man page for more information. But this
shouldn't be necessary to get a working kernel.
Shantonu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-dev/attachments/20050804/42dd25e8/attachment.html
More information about the darwinbuild-dev
mailing list