From:
[email protected]
On Fri, 13 Aug 2004 13:09:51 +0200, Sebastian Ley <
[email protected]> said:
On Thu, Aug 12, 2004 at 04:10:27PM -0500, Manoj Srivastava wrote:
Umm. kernel-headers includes just that -- the header files. And
kernel-package does not wittingly include any other stuff even for
2.6.x kernels; if it is doing so then I need to investigate that.
Okay, I elaborate a bit more. I am not sure how the whole stuff
/should/ be working so, please be patient with me if I misunderstood something.
This is what I have in kernel-headers-2.6.7-1:
coyote:/home/sl# cd /usr/src/kernel-headers-2.6.7-1 coyote:/usr/src/kernel-headers-2.6.7-1# ll
insgesamt 51
drwxr-xr-x 22 root root 536 2004-08-13 12:55 arch
drwxr-xr-x 2 root root 96 2004-08-13 12:55 crypto
drwxr-xr-x 43 root root 1104 2004-08-13 12:55 drivers
drwxr-xr-x 53 root root 1376 2004-08-13 12:55 fs
drwxr-xr-x 15 root root 392 2004-08-13 12:55 include
drwxr-xr-x 2 root root 96 2004-08-13 12:55 init
drwxr-xr-x 2 root root 72 2004-08-13 12:55 ipc
drwxr-xr-x 3 root root 96 2004-08-13 12:55 kernel
-rw-r--r-- 1 root root 8 2004-07-08 13:43 kernel-headers.revision drwxr-xr-x 4 root root 160 2004-08-13 12:55 lib
-rw-r--r-- 1 root root 36742 2004-07-08 08:08 Makefile
drwxr-xr-x 2 root root 72 2004-08-13 12:55 mm
drwxr-xr-x 32 root root 840 2004-08-13 12:55 net
lrwxrwxrwx 1 root root 30 2004-08-13 12:55 scripts -> ../kernel-kbuild-2.6-3/scripts
drwxr-xr-x 3 root root 120 2004-08-13 12:55 security
drwxr-xr-x 15 root root 408 2004-08-13 12:55 sound
drwxr-xr-x 2 root root 72 2004-08-13 12:55 usr
And in the arch-specific kernel-headers package, there is this:
And in the arch-specific kernel-headers package, there is this:
coyote:/usr/src# cd kernel-headers-2.6.7-1-k7/ coyote:/usr/src/kernel-headers-2.6.7-1-k7# ll
insgesamt 212
lrwxrwxrwx 1 root root 30 2004-08-13 12:55 arch -> ../kernel-headers-2.6.7-1/arch
lrwxrwxrwx 1 root root 32 2004-08-13 12:55 crypto -> ../kernel-headers-2.6.7-1/crypto
lrwxrwxrwx 1 root root 33 2004-08-13 12:55 drivers -> ../kernel-headers-2.6.7-1/drivers
lrwxrwxrwx 1 root root 28 2004-08-13 12:55 fs -> ../kernel-headers-2.6.7-1/fs
drwxr-xr-x 4 root root 392 2004-08-13 12:55 include
lrwxrwxrwx 1 root root 30 2004-08-13 12:55 init -> ../kernel-headers-2.6.7-1/init
lrwxrwxrwx 1 root root 29 2004-08-13 12:55 ipc -> ../kernel-headers-2.6.7-1/ipc
lrwxrwxrwx 1 root root 32 2004-08-13 12:55 kernel -> ../kernel-headers-2.6.7-1/kernel
lrwxrwxrwx 1 root root 29 2004-08-13 12:55 lib -> ../kernel-headers-2.6.7-1/lib
lrwxrwxrwx 1 root root 34 2004-08-13 12:55 Makefile -> ../kernel-headers-2.6.7-1/Makefile
lrwxrwxrwx 1 root root 28 2004-08-13 12:55 mm -> ../kernel-headers-2.6.7-1/mm
-rw-r--r-- 1 root root 207457 2004-07-08 13:08 Module.symvers
lrwxrwxrwx 1 root root 29 2004-08-13 12:55 net -> ../kernel-headers-2.6.7-1/net
lrwxrwxrwx 1 root root 33 2004-08-13 12:55 scripts -> ../kernel-headers-2.6.7-1/scripts
lrwxrwxrwx 1 root root 34 2004-08-13 12:55 security -> ../kernel-headers-2.6.7-1/security
lrwxrwxrwx 1 root root 31 2004-08-13 12:55 sound -> ../kernel-headers-2.6.7-1/sound
lrwxrwxrwx 1 root root 29 2004-08-13 12:55 usr -> ../kernel-headers-2.6.7-1/usr
Now, let's look at 2.4:
coyote:/usr/src# cd kernel-headers-2.4.26-1 coyote:/usr/src/kernel-headers-2.4.26-1# ll insgesamt 25 drwxr-xr-x
28 root root 768 2004-07-24 11:45 include -rw-r--r-- 1 root root 9
2004-07-22 06:39 kernel-headers.revision -rw-r--r-- 1 root root
19158 2004-07-20 14:05 Makefile
And the according arch-specific header package:
coyote:/usr/src# cd kernel-headers-2.4.26-1-k7 coyote:/usr/src/kernel-headers-2.4.26-1-k7# ll insgesamt 1
drwxr-xr-x 4 root root 792 2004-07-24 11:46 include
...where the symlinks are under include.
The structure under the 2.6 kernels is not added by
kernel-package; this is a case of the kernel image maintainer not
feeding back changes to kernel-package.
Now let's look at the kernel module I want to build. The relevant
line in its Makefile says:
For 2.6: $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) MODVERDIR=$(PWD) modules
This is thenew way of building third party modules in 2.6
For 2.4 $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) BUILD_DIR=$(PWD) modules
This is not the way things have ever worked in debian.
So it calls ther kernel's Makefile to build the modules. This
Makefile is present in kernel-header-2.4.26-1, but not in the arch
specific ones (note that the symlink is missing). In
kernel-headers-2.6.x the symlink in the arch specific file is
present. Additionally the kernel's Makefile needs other files to
properly work: The Makefiles under arch and the scripts under
scripts (symlink to ther kernel-kbuild package on 2.6). All this
works and is present in 2.6 build environments but is missing in
2.4.
I hope I could clarify the situation and that you now have an idea
what is the right thing(TM) to do.
I think you should use the mechanism defined in README.modules
to plug in the module into kernel-package (using -I etc liberally).
manoj
--
Fools ignore complexity. Pragmatists suffer it. Some can avoid it.
Geniuses remove it. Perlis's Programming Proverb #58, SIGPLAN Notices,
Sept. 1982
Manoj Srivastava <
[email protected]> <
http://www.debian.org/%7Esrivasta/> 1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E 1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
--
To UNSUBSCRIBE, email to
[email protected]
with a subject of "unsubscribe". Trouble? Contact
[email protected]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)