Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to debug the pci mapping code that the kernel executes on boot, as I have a card that does not get mapped properly. To do this I am adding debug messages to the relevant bits of code, so I can see what's going on.
Then I build the kernel using the "debian way":
make-kpkg clean
make-kpkg --initrd --append-to-version=-pci kernel_image kernel_headers
after compile:
dpkg -i kernel-headers-2.6.15.7-ubuntu1-pci_10.00.Custom_i386.deb
dpkg -i kernel-image-2.6.15.7-ubuntu1-pci_10.00.Custom_i386.deb
which works fine. But the compile takes about an hour, and I boot the new kernel once, read the debug messages, add a few more messages and compile again.
As I'm only making small changes each time, and not changing the configuration, is it possible to only rebuild the parts I have changed?
By not doing the
make-kpkg clean
?
Then you have to use the same revision I suppose.
And probably before installing the new package, it is best to remove the old one. Removing the one you are running one works, ignore the warnings.
If only it were so simple.
This does not work. Running again without the make-kpkg clean does remake the 2 .deb packages, but does not recompile any code that I have changed.
Is it possible to use make instead of make-kpkg, and then put it into packages separately?
Fortunatly it has always worked like this!
It should, its the purpose of make. (On my system, it works)
Did you modify code or changed some #include (which could require a make dep)?
Did you touch any makefile.am or makefile?
Yes you can use make but you should have the same result, make-kpkg calls make. And then with make only, you won't have a package, but it doesn't matter; a kernel package is a list of files in /boot, the tree /lib/modules/2.xxxx so you can easily remove these files manually.
Here's something to try, I'm not promising it will work, though. Make your change, and recompile without the clean. Then, copy the changed module (xxx.ko) over top of the one in the /lib/modules/(version)/kernel/(whatever) directory. Then reboot. If things come down around your head, you should be able to just reboot from a previous kernel and fix it before proceeding.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.