Re: Building the XNU kernel
Re: Building the XNU kernel
- Subject: Re: Building the XNU kernel
- From: Patrick Cusack <email@hidden>
- Date: Wed, 20 Feb 2013 10:17:07 -0800
Silly Question:
Why does someone need to build a kernel? Do you want to implement some functionality otherwise missing?
Patrick
Sent from my iPhone
On Feb 20, 2013, at 10:10 AM, G 3 <email@hidden> wrote:
> Sure, I can tell you how I built xnu. But I didn't do it on modern
> hardware. It was quite the opposite. I used a really old iMac running
> Mac OS 10.2.8 to do it. I needed to build the xnu kernel that came
> with Mac OS 10.2.8, so I went to opensource.apple.com, and clicked on
> the link for Mac OS 10.2.8. In the list of software, I downloaded
> cctools-435.4, Libstreams-23, bootstrap_cmds-35, and xnu-344.49.
>
> All the extra software packages had to be built and installed first
> before I could build xnu. Bootstrap_cmds-35 and Libstreams-23 built
> without problems.
>
> cctools-435.4 was the biggest problem to deal with. There was
> virtually no documentation to help me, so I didn't know I had to build
> and install Libstreams-23 first before building cctools. The build
> process continued for cctools until reaching the ld folder.
>
> The problem I encountered was with an include file called
> <sys/file.h>. After I commented that line out of the pass1.c and
> pass2.c files, I was able to continue.
>
> The next problem was with a missing command called seg_hack. It is
> apart of cctools so I just had to copy this command to the /bin folder
> for the build to continue.
>
> After cctools was done, I proceeded to build xnu. The file libkld.a
> wasn't installed to /usr/local/lib/, so I had to copy it there myself
> from the cctools folder. Then I had to fix an out of date error with
> the libkld.a file by running this command: ranlib
> /usr/local/lib/libkld.a.
>
> Shortly after continuing, an error stated that the /usr/bin/strip
> command could not be found. Thankfully this was also a part of the
> cctools, so I was able to copy it to the /usr/bin folder and continue.
> For some reason I had to restart the terminal just for that change to
> take effect.
>
> After all those problems I finally had my own homemade xnu kernel.
>
> On Wed, Feb 20, 2013 at 9:47 AM, Alex Zavatone <email@hidden> wrote:
>> Care to detail what was required and different from the instructions? FWIW, I do think it's rather impressive that you're able to build an 11 year old OS kernel in modern hardware.
>>
>> On Feb 20, 2013, at 8:28 AM, Programmingkid wrote:
>>
>>> Thanks for the info, but I finally made the XNU kernel. It was surprisingly difficult to do. Something I wouldn't expect from Apple software.
>>>
>>> On Feb 19, 2013, at 10:41 AM, Jean-Daniel Dupas wrote:
>>>
>>>> Did you try to use darwinbuild ( http://darwinbuild.macosforge.org/ ) ? Look like it is relatively up to date, and the readme (at http://darwinbuild.macosforge.org/trac/browser/trunk/README ) says:
>>>>
>>>> To build a Darwin project, for example xnu, the darwinbuild script can be used in the following manner:
>>>> # darwinbuild xnu
>>>>
>>>>
>>>> Le 19 févr. 2013 à 16:28, Programmingkid <email@hidden> a écrit :
>>>>
>>>>> I am trying to build xnu version 344.49. I thought that guide would help because of how close in date the guide and the XNU kernel are. It looks like Apple changed the way each kernel version was made and didn't document it.
>>>>>
>>>>>
>>>>> On Feb 19, 2013, at 9:35 AM, Alex Zavatone wrote:
>>>>>
>>>>>> FYI, that guide is from 2005.
>>>>>>
>>>>>> Apple doesn't even have the darwintools.pkg listed in that guide online anymore.
>>>>>>
>>>>>> http://hints.macworld.com/article.php?story=20020226235050467
>>>>>>
>>>>>> curl -0 http://www.opensource.apple.com/projects/darwin/1.4/darwintools.pkg.tar
>>>>>>
>>>>>> Which version of XNU are you trying to build? FYI, here's the Apple URL for XNU, in case you don't have a current version.
>>>>>>
>>>>>> http://www.opensource.apple.com/source/xnu/
>>>>>
>>>>>
>>>>>>
>>>>>> On Feb 18, 2013, at 10:01 PM, Programmingkid wrote:
>>>>>>
>>>>>>> I'm trying to build the XNU kernel (What Mac OS X uses as the kernel) and was having a little problem with the lack of documentation available.
>>>>>>>
>>>>>>> I have been following this information on building the kernel: http://examples.oreilly.com/9780596006075/ch07.pdf. This document states I need the darwintools.pkg package to make the kernel. Does anyone know where it is located?
>>>>>>>
>>>>>>> Any hints would be great.
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>> Xcode-users mailing list (email@hidden)
>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>
>>>>>>> This email sent to email@hidden
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Xcode-users mailing list (email@hidden)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>
>>>>> This email sent to email@hidden
>>>>
>>>> -- Jean-Daniel
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Xcode-users mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden