LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-03-2009, 03:44 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
kernel headers files difference


I usually custom compile my kernel and generate the header files with the following command:

Code:
fakeroot make-kpkg --initrd --append-to-version=generic-ide kenrel_image kernel_headers
However, I noticed that there are some difference in the headers files that get generated with the above command as compared to the header files that are available from Debian repo.

For example, the header files for 2.6.24 kernel have files like:
Code:
debian:/usr/src/linux-headers-2.6.24-etchnhalf.1-686/arch/x86# ls
Kconfig  Kconfig.cpu  Kconfig.debug  kernel  Makefile  Makefile_32  Makefile_32.cpu  Makefile_64
However, if I custom compile the above kernel from Debian sources (2.6.24), the headers files does not have the above files:
Code:
debain:/usr/src/linux-headers-2.6.24-generic-ide/arch/x86# ls
boot    ia32     Kconfig.cpu    kernel  lib           mach-es7000   mach-visws    Makefile     mm        pci    vdso   xen
crypto  Kconfig  Kconfig.debug  lguest  mach-default  mach-generic  mach-voyager  math-emu         oprofile  power  video
As you can see from above output, files like Makefile_32, Makefile_32.cpu are not present, if I generate kernel headers files using the make-kpkg command as mentioned in the beginning of the post.

I happened to notice the above issue, while I was trying to compile a out-of-tree kernel module and the "make" command for those sources (some graphics card drm module) worked with the default header files (linux-headers-2.6.24-etchnhalf.1-686) but did not work with (linux-headers-2.6.24-generic-ide) because it did not find the Makefile_32.

Although I was able to fix the problem by copying the Makefile_32 from linux-headers-2.6.24-etchnhalf.1-686 but I would like to know why there is a difference. This is bit of a concern because it unnecessarily breaks the out-of-tree module compilation process because of trivial reasons.

Can anybody throw some light on this?

Last edited by kushalkoolwal; 07-03-2009 at 03:47 PM.
 
Old 07-05-2009, 12:14 AM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
I can't help you with your question, but do you really need to generate a new set of kernel headers? If so, why? Normally, you don't need to do that, unless you're planning to remove the source code and still need to have access to the headers.
 
Old 07-05-2009, 02:41 AM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by Quakeboy02 View Post
Normally, you don't need to do that, unless you're planning to remove the source code and still need to have access to the headers.
Yes, I am exactly doing the same. Removing the source code but still providing access to header files for out of tree module compilation. Don't ask me why I am doing this. There are several reasons but that's a complete different topic.
 
Old 07-05-2009, 03:25 AM   #4
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
This still about the ide-generic I take it.
Either you don't have correct header targets in /yourkernelsrcpath/debian/ruleset/targets/headers.mk, you've stumbled across the packaging bug from the x86 architecture merge, or your kernel-package is lacking one of the following lines:
Code:
:~$cat /usr/share/kernel-package/ruleset/targets/headers.mk |sed -n '83,97p'
######################################################################
        $(install_file) Makefile                           $(SRCDIR)
        test ! -e Rules.make || $(install_file) Rules.make $(SRCDIR)
        test ! -e .kernelrelease || $(install_file) .kernelrelease $(SRCDIR)
        test ! -e arch/$(LINK_ARCH)/Makefile     ||                             \
                                $(install_file) arch/$(LINK_ARCH)/Makefile      \
                                                     $(SRCDIR)/arch/$(LINK_ARCH)
        test ! -e arch/$(LINK_ARCH)/Makefile.cpu ||                             \
                                $(install_file) arch/$(LINK_ARCH)/Makefile.cpu  \
                                                     $(SRCDIR)/arch/$(LINK_ARCH)
        test ! -e arch/$(LINK_ARCH)/Makefile_32.cpu ||                             \
                                $(install_file) arch/$(LINK_ARCH)/Makefile_32.cpu  \
                                                     $(SRCDIR)/arch/$(LINK_ARCH)
        test ! -e Rules.make     || $(install_file) Rules.make     $(SRCDIR)
        test ! -e Module.symvers || $(install_file) Module.symvers $(SRCDIR)
 
Old 07-05-2009, 03:39 AM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by makuyl View Post
This still about the ide-generic I take it.
Actually it is not. I just used a name (generic-ide) for the kernel as an example. This is a completely different issue and I have been observing this behavior for quite some time (even with 2.6.25 I think).
 
  


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
Automatic removal of kernel headers package when kernel packages are removed bgoodr Debian 3 12-30-2008 08:14 PM
Difference between: linux-kbuild and linux-headers kushalkoolwal Debian 1 08-05-2008 05:10 PM
Difference between kernel-headers kernel-source twinkers Debian 2 06-18-2005 11:20 AM
.rar files versus .iso files the difference? dolphans1 Mandriva 14 01-31-2005 09:33 AM
where to get kernel-headers-2.6.6-1 and other necessary files? parv Fedora 14 07-23-2004 11:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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