How to compare two kernel sources?

This is a discussion on How to compare two kernel sources? within the Linux General forums, part of the Linux Forums category; I have a new machine what works fine with the stock Debian Etch kernel 2.6.18 but will not ...


Go Back   Usenet Forums > Linux Forums > Linux General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-04-2007
Bill Davis
 
Posts: n/a
Default How to compare two kernel sources?

I have a new machine what works fine with the stock Debian Etch kernel
2.6.18 but will not boot with 2.6.22. I have both sources on my machine
and want to find out what the problem is. For learning purposes mostly.

As I started comparing sources using make menuconfig I decided that there
must be a better way than manually plowing through hundreds of lines of
options. Can anyone tell me of a utility to print off the catagories and
values, or just a better way to compare different source files?

Bill D
Reply With Quote
  #2 (permalink)  
Old 09-04-2007
Mike
 
Posts: n/a
Default Re: How to compare two kernel sources?

On Sep 4, 9:39 am, Bill Davis <somewh...@nowhere.com> wrote:
> I have a new machine what works fine with the stock Debian Etch kernel
> 2.6.18 but will not boot with 2.6.22. I have both sources on my machine
> and want to find out what the problem is. For learning purposes mostly.
>
> As I started comparing sources using make menuconfig I decided that there
> must be a better way than manually plowing through hundreds of lines of
> options. Can anyone tell me of a utility to print off the catagories and
> values, or just a better way to compare different source files?
>
> Bill D


For basics (not line by line C code), you can compare config files of
the two kernels. See if your kernel was compiled to post a /proc/
config.gz file. zcat the file out, and build the new kernel with that
config file using 'make oldconfig' ( zcat /proc/config.gz > /home/
user/newkernel/.config ). Then see if the "new" kernel works. If it
doesn't and you want to dive further into it, you can compare changes
in the source code with diff.

Thanks

Mike

Reply With Quote
  #3 (permalink)  
Old 09-04-2007
Darren Salt
 
Posts: n/a
Default Re: How to compare two kernel sources?

I demand that Bill Davis may or may not have written...

> I have a new machine what works fine with the stock Debian Etch kernel
> 2.6.18 but will not boot with 2.6.22. I have both sources on my machine
> and want to find out what the problem is. For learning purposes mostly.


There are some significant configuration differences between 2.6.18 and
2.6.22, in particular if you're using SATA. You should check that the correct
low-level hardware drivers are selected.

Should it not be obvious what's wrong, lspci output and output from an
attempt to boot 2.6.22 may be helpful. You will find it useful to set up a
serial or net console to capture kernel output.

[snip]
--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| <URL:http://www.youmustbejoking.demon.co.uk/> (PGP 2.6, GPG keys)

No matter how much you do, it'll never be enough.
Reply With Quote
  #4 (permalink)  
Old 09-04-2007
Jim Phillips
 
Posts: n/a
Default Re: How to compare two kernel sources?

On Tue, 04 Sep 2007 11:39:04 -0500, Bill Davis wrote:

> I have a new machine what works fine with the stock Debian Etch kernel
> 2.6.18 but will not boot with 2.6.22. I have both sources on my machine
> and want to find out what the problem is. For learning purposes mostly.
>


By any chance does your machine have a Sata drive?

I am bringing up a new Shuttle AMD/64 x2 with a Sata and Etch 4.0. It
installs fine and runs mostly ok on the Debian kernel 2.6.18, but when I
build a 2.6.20 or .22 kernel and restart, it hangs with "Waiting on boot
filesystem." Also the CD/DVD does not work on 2.6.18 and there is nothing
in Dmesg about it.

With a Pata drive it works fine.

I have just started troubleshooting so no answers yet. Just wondering if
you have the same setup.

Jim Phillips


Reply With Quote
  #5 (permalink)  
Old 09-04-2007
Mumia W.
 
Posts: n/a
Default Re: How to compare two kernel sources?

On 09/04/2007 11:39 AM, Bill Davis wrote:
> I have a new machine what works fine with the stock Debian Etch kernel
> 2.6.18 but will not boot with 2.6.22. I have both sources on my machine
> and want to find out what the problem is. For learning purposes mostly.
>
> As I started comparing sources using make menuconfig I decided that there
> must be a better way than manually plowing through hundreds of lines of
> options. Can anyone tell me of a utility to print off the catagories and
> values, or just a better way to compare different source files?
>
> Bill D


As Mike said, you would compare the config files for the two kernels, e.g.

cd /boot
diff config-2.6.18-3-686 config-2.6.22-1-686 | less

Reply With Quote
  #6 (permalink)  
Old 09-05-2007
Bill Davis
 
Posts: n/a
Default Re: How to compare two kernel sources?

On Tue, 04 Sep 2007 11:39:04 -0500, Bill Davis wrote:

Thanks all.

I either forgot or never knew about the config files in /boot. I have
been wading though all the stuff in /usr/src.

Sure enough, diff shows that 2.6.18 has lots of CONFIG_SCSI_SATA options
turned on and 2.6.22 does not. However, it turns out that 2.6.22 has NO
Sata options anywhere. Period.

I assume that this means that all Sata stuff has been hardwired into the
kernel from now on. So I am going to have to fix my boot problem with the
boot process, not just a kernel config.

Bill Davis
Reply With Quote
  #7 (permalink)  
Old 09-05-2007
Bill Davis
 
Posts: n/a
Default Re: How to compare two kernel sources?

>
> By any chance does your machine have a Sata drive?
>


Yes. A single sata and a cdrom. I forget the exact message, but I
believe it is the same as yours. Read my other post for today. We are
going to have to fix the problem outside of the kernel, it seems.

Bill Davis
Reply With Quote
  #8 (permalink)  
Old 09-05-2007
Darren Salt
 
Posts: n/a
Default Re: How to compare two kernel sources?

I demand that Bill Davis may or may not have written...

> I either forgot or never knew about the config files in /boot. I have been
> wading though all the stuff in /usr/src.
>
> Sure enough, diff shows that 2.6.18 has lots of CONFIG_SCSI_SATA options
> turned on and 2.6.22 does not. However, it turns out that 2.6.22 has NO
> Sata options anywhere. Period.


Er, it does, in the "device drivers" menu. (Se drivers/ata/Kconfig.)

> I assume that this means that all Sata stuff has been hardwired into the
> kernel from now on. [...]


It doesn't, and it isn't.

--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Output less CO2 => avoid massive flooding. TIME IS RUNNING OUT *FAST*.

The Ranger isn't gonna like it, Yogi.
Reply With Quote
  #9 (permalink)  
Old 09-05-2007
Mumia W.
 
Posts: n/a
Default Re: How to compare two kernel sources?

On 09/05/2007 08:26 AM, Bill Davis wrote:
> On Tue, 04 Sep 2007 11:39:04 -0500, Bill Davis wrote:
>
> Thanks all.
>
> I either forgot or never knew about the config files in /boot. I have
> been wading though all the stuff in /usr/src.
>
> Sure enough, diff shows that 2.6.18 has lots of CONFIG_SCSI_SATA options
> turned on and 2.6.22 does not. However, it turns out that 2.6.22 has NO
> Sata options anywhere. Period.
>
> I assume that this means that all Sata stuff has been hardwired into the
> kernel from now on. So I am going to have to fix my boot problem with the
> boot process, not just a kernel config.
>
> Bill Davis


SATA is most definitely in 2.6.22. Do something like this:

cd /boot
grep SATA config-2.6.22-1-686

SATA is not hardwired into the kernel. If you have the source, you can
configure it.

Go into "make menuconfig"
Device Drivers/ Serial ATA (prod).../

You didn't say what distribution you're using. I'm using Debian Sarge,
but I downloaded the kernel source from Sid, and I configured SATA into
my kernel.

If you're using Sid, you should have a binary kernel available; however,
that kernel will probably load the SATA modules from an initrd which may
or may not work for you.
Reply With Quote
  #10 (permalink)  
Old 09-05-2007
Bill Davis
 
Posts: n/a
Default Re: How to compare two kernel sources?

>
> You didn't say what distribution you're using. I'm using Debian Sarge,
> but I downloaded the kernel source from Sid, and I configured SATA into
> my kernel.
>


Ok, I am using Debian Etch 4.0r1. I certainly don't want to make flat
statements to folks that obviously know a whole lot more about kernels
than I do (which would not take much) but here goes.

I downloaded 2.6.22 from kernel.org. Unzipped it in /usr/src. Moved into
that subdirectory and started make menuconfig. But there is nothing about
Serial ATA in the Device Drivers category. I have gone through every
submenu under device drivers and there is absolutely nothing about Sata or
Serial ATA. If I grep the /boot/config file I get nothing. I even loaded
it into Kate and searched there. Nothing about Sata or Serial ATA.

Now if I do the same thing in the 2.6.18 subdirectory, I see the lines you
are talking about. Lots of them. Lots of them in /boot/config-2.6.18
also.

I'm going to dump the usr/src stuff and download a new zip from kernel.org
and start fresh. It has to be something that I have hosed up as I played
around.

Bill D.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:16 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0