FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 10-11-2012, 02:12 PM
Nikolaus Rath
 
Default apt-get linux-source vs apt-get source linux

Hello,

(asked before on debian-user, but no one there seems to now)

I'd like to rebuild the stock Debian wheezy kernel with an additional
patch. According to
http://kernel-handbook.alioth.debian.org/ch-common-tasks.html,
there are two ways to do this.

Either I can install the linux-source package (apt-get install
linux-source), unzip the .tar.bz, apply my patch and run 'make deb-pkg'.

Or I can install the source of the linux-package (apt-get source linux),
and run 'fakeroot debian/rules source', apply my patch, and run
'fakeroot make -f debian/rules.gen binary-arch_amd64'.

Can someone explain to me which method I should use in which situation?

I have randomly picked the first method, and am very surprised that the
resulting kernel has version 3.2.23, while the stock wheezy kernel is
3.2.0. Shouldn't linux-source give me the sources for linux-image?

In addition to that, the custom package comes with 449 modules taking
427 MB of space, while the official one ships 2848 modules taking 106
MB. The lower number is expected because I used 'make localmodconfig',
but why are the custom built modules so huge?


Thanks,

-Nikolaus

--
»Time flies like an arrow, fruit flies like a Banana.«

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87fw5lqeqs.fsf@inspiron.ap.columbia.edu">http://lists.debian.org/87fw5lqeqs.fsf@inspiron.ap.columbia.edu
 
Old 10-11-2012, 07:40 PM
Ben Hutchings
 
Default apt-get linux-source vs apt-get source linux

On Thu, Oct 11, 2012 at 10:12:43AM -0400, Nikolaus Rath wrote:
> Hello,
>
> (asked before on debian-user, but no one there seems to now)
>
> I'd like to rebuild the stock Debian wheezy kernel with an additional
> patch. According to
> http://kernel-handbook.alioth.debian.org/ch-common-tasks.html,
> there are two ways to do this.
>
> Either I can install the linux-source package (apt-get install
> linux-source), unzip the .tar.bz, apply my patch and run 'make deb-pkg'.
>
> Or I can install the source of the linux-package (apt-get source linux),
> and run 'fakeroot debian/rules source', apply my patch, and run
> 'fakeroot make -f debian/rules.gen binary-arch_amd64'.
>
> Can someone explain to me which method I should use in which situation?

If you want a highly customised kernel then use the binary package
'linux-source'. If you want to make some small change to an official
linux-image package then use the source package 'linux'.

> I have randomly picked the first method, and am very surprised that the
> resulting kernel has version 3.2.23, while the stock wheezy kernel is
> 3.2.0. Shouldn't linux-source give me the sources for linux-image?

They are the same sources. However the build system for the
source package 'linux' overrides the release string to reflect the
current kernel ABI. This is explained in chapter 5 of the kernel
handbook.

> In addition to that, the custom package comes with 449 modules taking
> 427 MB of space, while the official one ships 2848 modules taking 106
> MB. The lower number is expected because I used 'make localmodconfig',
> but why are the custom built modules so huge?

Most likely you left debug information (CONFIG_DEBUG_INFO) enabled.
Some of the official linux-image packages are built with debug
information, but there is a post-processing step that strips it into a
separate binary package. If you use the upstream build system then

Ben.

--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121011194035.GR13292@decadent.org.uk">http://lists.debian.org/20121011194035.GR13292@decadent.org.uk
 
Old 10-12-2012, 12:49 AM
Nikolaus Rath
 
Default apt-get linux-source vs apt-get source linux

Ben Hutchings <ben@decadent.org.uk> writes:
> On Thu, Oct 11, 2012 at 10:12:43AM -0400, Nikolaus Rath wrote:
>> Hello,
>>
>> (asked before on debian-user, but no one there seems to now)
>>
>> I'd like to rebuild the stock Debian wheezy kernel with an additional
>> patch. According to
>> http://kernel-handbook.alioth.debian.org/ch-common-tasks.html,
>> there are two ways to do this.
>>
>> Either I can install the linux-source package (apt-get install
>> linux-source), unzip the .tar.bz, apply my patch and run 'make deb-pkg'.
>>
>> Or I can install the source of the linux-package (apt-get source linux),
>> and run 'fakeroot debian/rules source', apply my patch, and run
>> 'fakeroot make -f debian/rules.gen binary-arch_amd64'.
>>
>> Can someone explain to me which method I should use in which situation?
>
> If you want a highly customised kernel then use the binary package
> 'linux-source'. If you want to make some small change to an official
> linux-image package then use the source package 'linux'.

Alright, thanks!

>> In addition to that, the custom package comes with 449 modules taking
>> 427 MB of space, while the official one ships 2848 modules taking 106
>> MB. The lower number is expected because I used 'make localmodconfig',
>> but why are the custom built modules so huge?
>
> Most likely you left debug information (CONFIG_DEBUG_INFO) enabled.
> Some of the official linux-image packages are built with debug
> information, but there is a post-processing step that strips it into a
> separate binary package. If you use the upstream build system then

I suppose this sentence was supposed to end with something like "...you
have to disable CONFIG_DEBUG_INFO, but if you use the 'linux' source
package, you can keep it enabled"?


Best,

-Nikolaus

--
»Time flies like an arrow, fruit flies like a Banana.«

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87626gseds.fsf@vostro.rath.org">http://lists.debian.org/87626gseds.fsf@vostro.rath.org
 
Old 10-12-2012, 04:10 AM
Ben Hutchings
 
Default apt-get linux-source vs apt-get source linux

On Thu, 2012-10-11 at 20:49 -0400, Nikolaus Rath wrote:
> Ben Hutchings <ben@decadent.org.uk> writes:
[...]
> >> In addition to that, the custom package comes with 449 modules taking
> >> 427 MB of space, while the official one ships 2848 modules taking 106
> >> MB. The lower number is expected because I used 'make localmodconfig',
> >> but why are the custom built modules so huge?
> >
> > Most likely you left debug information (CONFIG_DEBUG_INFO) enabled.
> > Some of the official linux-image packages are built with debug
> > information, but there is a post-processing step that strips it into a
> > separate binary package. If you use the upstream build system then
>
> I suppose this sentence was supposed to end with something like "...you
> have to disable CONFIG_DEBUG_INFO, but if you use the 'linux' source
> package, you can keep it enabled"?

Yes, good guess. :-)

Ben.

--
Ben Hutchings
Kids! Bringing about Armageddon can be dangerous. Do not attempt it in
your own home. - Terry Pratchett and Neil Gaiman, `Good Omens'
 

Thread Tools




All times are GMT. The time now is 07:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org