[Tfug] Ubuntu Gutsy Compiling Kernel

Jude Nelson judecn at gmail.com
Thu Oct 25 19:29:29 MST 2007


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
>
>
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>



More information about the tfug mailing list