LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-10-2007, 05:15 AM   #1
martinrp
LQ Newbie
 
Registered: Jun 2004
Location: UK
Distribution: Mandrake
Posts: 7

Rep: Reputation: 0
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
 
Old 01-10-2007, 05:22 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
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.
 
Old 01-10-2007, 06:13 AM   #3
martinrp
LQ Newbie
 
Registered: Jun 2004
Location: UK
Distribution: Mandrake
Posts: 7

Original Poster
Rep: Reputation: 0
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?
 
Old 01-10-2007, 09:24 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
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.
 
Old 01-10-2007, 02:25 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
  


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
make-kpkg --revision=xxxx kernel-image issue divukman Debian 2 03-06-2006 05:52 PM
Kernel compile fails with make-kpkg, not with make cspos Debian 37 11-09-2005 09:11 AM
Kernel make-kpkg error TaNeK Debian 7 01-09-2005 12:24 PM
make-kpkg not working, so no kernel includes genixpro Linux - Hardware 3 09-14-2004 06:56 PM
Need some advice on upgrading kernel via make-kpkg davidas Debian 4 04-07-2004 07:02 PM

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

All times are GMT -5. The time now is 03:45 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