LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   I need make-kpkg kernel_source (https://www.linuxquestions.org/questions/linux-software-2/i-need-make-kpkg-kernel_source-786755/)

miros84 02-03-2010 02:13 PM

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?

evo2 02-03-2010 02:18 PM

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.

miros84 02-03-2010 02:32 PM

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

Quakeboy02 02-03-2010 02:40 PM

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.

evo2 02-03-2010 03:01 PM

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.

miros84 02-03-2010 03:17 PM

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?

Quakeboy02 02-03-2010 03:24 PM

Quote:

Originally Posted by miros84 (Post 3851306)
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.

miros84 02-03-2010 03:40 PM

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.

Quakeboy02 02-03-2010 04:02 PM

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.

AwesomeMachine 02-03-2010 10:18 PM

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.

miros84 02-04-2010 08:58 AM

But linux sources and Linux-header is the same thing?

evo2 02-04-2010 09:02 AM

Quote:

Originally Posted by miros84 (Post 3852388)
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.


All times are GMT -5. The time now is 04:56 AM.