LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Repeated kernel builds on Ubuntu using make-kpkg (https://www.linuxquestions.org/questions/linux-kernel-70/repeated-kernel-builds-on-ubuntu-using-make-kpkg-517958/)

martinrp 01-10-2007 05:15 AM

Repeated kernel builds on Ubuntu using make-kpkg
 
Hello

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?

Thanks

Martin

nx5000 01-10-2007 05:22 AM

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.

martinrp 01-10-2007 06:13 AM

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?

nx5000 01-10-2007 09:24 AM

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.

Quakeboy02 01-10-2007 02:25 PM

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.


All times are GMT -5. The time now is 12:55 PM.