LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2010, 02:13 PM   #1
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Rep: Reputation: 31
I need make-kpkg kernel_source


Hello
I just installed a my own kernel I compiled from kernel.org

But now in man page I see this command

Code:
make-kpkg kernel_source
I run this command and it created me a linux-sources.deb file and several folders in /home/miros/miskernels/linux-2.6.32.5/debian/linux-source-2.6.32.5

Did I need to run this command? And what is this file for? (linux-sources.deb)
I need to install it?
 
Old 02-03-2010, 02:18 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
It is the recommended way to compile and install kernels on a debian system. This way you can easily upgrade, install and/or remove kernels just like you would any other package.

Evo2.
 
Old 02-03-2010, 02:32 PM   #3
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
When I compile my kernel I used this command

Code:
    make-kpkg --rootcmd fakeroot --initrd --revision=custom.001 kernel_image kernel_headers
DO I need to add
Code:
make-kpkg kernel_source
at final
Something like this?

Code:
    make-kpkg --rootcmd fakeroot --initrd --revision=custom.001 kernel_image kernel_headers kernel_source
 
Old 02-03-2010, 02:40 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Why would you need to add anything to what is already working? Here is my kernel compiler string that I've been using for several years.
Code:
#!/bin/sh
export CONCURRENCY_LEVEL=4
make-kpkg clean
fakeroot make-kpkg --append_to_version -k8 --revision=0.3 --initrd kernel_image
Note that I do not have a "kernel_headers" part, as it's not needed unless you plan to remove your source directory after you compile the new kernel.
 
1 members found this post helpful.
Old 02-03-2010, 03:01 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Sorry, I totally missed the point of your original post. As you found out that option makes a kernel source deb. Could be handy if you'd patched something and wanted to recompile the kernel again, or wanted to share it etc.

But, no, you don't need to do it.

Evo2.
 
Old 02-03-2010, 03:17 PM   #6
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Wait, wait, wait...
you just told me something I was asking for a long time.
I need to install nvidia kernel that requires linux-headers.
So, you mean, that if I keep folder with sources, is the same as install linux-headers?
Boths things are OK to intall nvidia driver or other moduls against the kernel?
 
Old 02-03-2010, 03:24 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by miros84 View Post
Wait, wait, wait...
you just told me something I was asking for a long time.
Glad to help! Just hit the little Thanks button, if you don't mind.

Quote:
I need to install nvidia kernel that requires linux-headers.
So, you mean, that if I keep folder with sources, is the same as install linux-headers?
Boths things are OK to intall nvidia driver or other moduls against the kernel?
Yep. As far as outside drivers are concerned, they're the same. When the nvidia driver compiles, it only needs access to the kernel headers, not the actual kernel source. It doesn't matter whether they're in the source tree or in a separate kernel headers tree. If you look at /lib/modules/`uname -r` (for the running kernel) you can see the links.
 
1 members found this post helpful.
Old 02-03-2010, 03:40 PM   #8
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
I had pressed thank you
So, if I install linux-headers, then I can delete the folder with sources that I extracted from kernel.org.
And later, if I want to install some driver against the kernel, I will can do it. No need source folder anymore.
That is what I understand.
 
Old 02-03-2010, 04:02 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
My understanding is that if you want to remove your source tree, then you should make and install the kernel_headers for the kernel you're installing. I haven't done this because I keep my source trees, so I don't know whether it creates a separate deb or how it works.

Added:
OK, so I just did a compilation of an old kernel with the kernel_headers option, and you are right, there is a linux-headers deb created. So, that could be installed along with the new kernel and the kernel source tree could be removed.

Last edited by Quakeboy02; 02-03-2010 at 04:16 PM.
 
1 members found this post helpful.
Old 02-03-2010, 10:18 PM   #10
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I would keep the source tree, and use: make-kpkg --revision=<at least one number and one letter> --initrd kernel_image. Then install the resulting: /usr/src/linux-image-<version>-<revision>.deb file, using dpkg -i /usr/src/linux-image-<version>-<revision>.deb.
 
Old 02-04-2010, 08:58 AM   #11
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
But linux sources and Linux-header is the same thing?
 
Old 02-04-2010, 09:02 AM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by miros84 View Post
But linux sources and Linux-header is the same thing?
No, the source contains everything you need to actually compile the kernel. The headers just give modules the information they need to compile against the kernel.

Cheers,

Evo2.
 
  


Reply



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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What does "make-kpkg kernel_source" do? JoeDuncan Debian 4 08-30-2006 11:14 AM
Where can i get make-kpkg linuxmandrake Debian 1 12-16-2005 04:36 PM
Kernel compile fails with make-kpkg, not with make cspos Debian 37 11-09-2005 09:11 AM
where do i get make-kpkg linuxmandrake Debian 4 09-27-2005 04:42 AM
Using make-kpkg Maximus2000 Debian 4 02-27-2004 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration