[Tfug] Ubuntu Gutsy Compiling Kernel

Andrew Ayre andy at britishideas.com
Thu Oct 25 22:21:13 MST 2007


Hi Jude,

Thanks for the reply. Here is the problem though:

  - with the Ubuntu version of the kernel, the kernel won't compile with
the RTAI patch

  - with the vanilla kernel ethernet doesn't work for some reason

I am patching version 2.6.22.9 with the RTAI 2.6.22.9 patch. When I did
a diff between the vanilla kernel and the Ubuntu kernel, there are a lot
of changes.

The RTAI documentation recommends only patching vanilla kernels.

My only thought at this point is to give the vanilla 2.6.23 a try, but
that takes me even closer to the bleeding edge...

Any suggestions on how to proceed? I looked at the syslog after booting
with the vanilla kernel and didn't see anything obviously wrong.

Thanks for the help!

Andy

Jude Nelson wrote:
> To find out how to kernels differ, get the vanilla one and the Ubuntu one
> and do this:
> 
> diff -u /path/to/vanilla/kernel /path/to/Ubuntu/kernel >
> /path/to/convenient/patchfile
> 
> That'll give you a source patch file that will contain all the patches
> applied to the Ubuntu kernel from the vanilla.
> 
> To set up RTAI, you'll need to know what kernel version(s) the RTAI patch in
> question requires.  Just grab the one you want and the corresponding
> kernel.  Unpack the kernel, cd into the kernel's root source directory, and
> execute this command*:
> 
> patch -Np1 < /path/to/RTAI/diff
> 
> (fill in the blanks as needed).
> 
> *If you want to add Ubuntu's patches to the vanilla kernel, then apply the
> patch you created above BEFORE the RTAI diff.
> 
> Now, do a make menuconfig to load in the config options (you don't need to
> feed it the Ubuntu kernel config--the script is smart enough to do that
> itself).
> 
> If you don't feel like looking through all the options, just abort and have
> a look inside the .config file in the root directory of the kernel.
> Somewhere, there should be an RTAI option.  You may need to enable it
> manually.  Chances are, the CONFIG_xxx key/value pair will have the string
> "RTAI" in there somewhere, so you can easily use vi to locate it.
> 
> After that, just a "make-kpkg --initrd --bzimage kernel_image modules_image"
> command should create a kernel deb and any additional out-of-tree modules
> you may need (you'll need module-assistant, fakeroot, make-kpkg, etc. to do
> this).  If you don't want an initrd, then omit the "--initrd" option.
> 
> Hope this helps,
> Jude
> 
> On 10/25/07, Glen Pfeiffer <glen at thepfeiffers.net> wrote:
>> I don't have any answers, but am posting this to start it as a new thread.
>>
>> -- andy at britishideas.com wrote:
>>> I'm running Ubuntu 7.10 Gutsy on my desktop PC and I want to patch the
>>> kernel with RTAI. However my knowledge of patching and kernels is
>>> limited... Here is what I tried:
>>>
>>> I grabbed the Linux source from the Ubuntu gutsy repos and found it to
>>> be 2.6.22.9. I built it and installed the package and it worked fine. I
>>> used /boot/config-2.6.22-14-generic as the .config file.
>>>
>>> Next I grabbed 2.6.22.9 from kernel.org. I built it in the same way and
>>> installed the package. It works except Ethernet is broken. I again used
>>> /boot/config-2.6.22-14-generic as the .config file.
>>>
>>> In both cases I didn't configure the kernel - I simply built it.
>>>
>>> So I am assuming that something was patched in the Ubuntu version to fix
>>> some kind of problem.
>>>
>>> eth0 appears to be ok, but there are no packets in or out.
>>>
>>> Does anyone have any pointers on how do I find out what patch is missing
>>> from my vanilla kernel? It seems Gutsy ships with 2.6.22.14, but nothing
>>> beyond 9 is available from kernel.org. So I'm guessing the Ubuntu team
>>> made a few revs of their own.
>>>
>>> I posted on ubuntuforums.org but haven't received any replies on this.
>>>
>>> thanks, Andy
>>>
>>> -- Andy

-- 
Andy
PGP Key ID: 0x67090A54




More information about the tfug mailing list