[OT?] is there no package containing the raw "vmlinux" kernel image?

Stefan Bader stefan.bader at canonical.com
Thu Jul 1 14:58:27 UTC 2010


On 07/01/2010 04:10 PM, Robert P. J. Day wrote:
> On Thu, 1 Jul 2010, Stefan Bader wrote:
> 
>> The package linux-source is one I personally find the least useful.
>> It contains the raw upstream part of the kernel tree (iirc) but
>> misses the configuration and I believe also any additions.
>>
>> The method of using apt-get has its limits as you need to have
>> source packages enabled in your config and packages can get removed
>> when they are superseded. The command would be "apt-get source
>> linux-image-2.6.32-23-generic" for example.
> 
>   actually, i may have stumbled over one solution:
> 
>   $ apt-get source linux-image-$(uname -r)
> 
> which ends up unloading the following in my current directory:
> 
>   linux-2.6.32/
>   linux_2.6.32-23.37.diff.gz
>   linux_2.6.32-23.37.dsc
>   linux_2.6.32.orig.tar.gz
> 
> and if i read the msgs that flashed by, as long as i'm running the
> latest kernel, this gives me the original kernel tarball, a
> ubuntu-supplied diff file, unloads the tarball, and then applies the
> diff file to get the appropriate ubuntu kernel source tree.  does that
> sound right?
> 

That is right. As you mention it, the downside is that this relies on the fact
that the currently running kernel is the latest kernel.

>> I am not sure it really is sounding simpler to you, but I find the
>> method of using git simpler. You would do a one time:
>>
>> #> git clone git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git
>> #> cd ubuntu-lucid
>>
>> #> uname -a
>> Linux maximegalon 2.6.32-23-generic #37-Ubuntu SMP Mon Jun 28 13:06:35 UTC 2010
>> i686 GNU/Linux
>>
>> (Note the #37)
>>
>> #> git checkout Ubuntu-2.6.32-23.37
>>
>> Now you have the exactly matching kernel source and could build a generic kernel
>> with:
>>
>> #> fakeroot debian/rules binary-generic
>>
>> Even without the debug package, you got the vmlinux file you are looking for in
>> debian/build/build-generic.
> 
>   i have no problem using git -- i was just trying to keep things
> simple for students in the sense of giving them an alternative that
> represented just downloading packages.  but i can test the above as
> well.
> 
> rday
> 
> p.s.  i seriously didn't think this was going to get so involved.
> 

No worries. The other solution is valid. Its just that bit of leying on certain
other things which may break things. Just be prepared to have a student failing
to do the apt-get because the running kernel is not the latest. On the other
hand there is always somthing that can fail. :)

Stefan




More information about the kernel-team mailing list