• Bug#265359: kernel-package: kernel-headers do not contain Makefiles on

    From Sebastian Ley@1:229/2 to All on Thu Aug 12 23:00:16 2004
    From: [email protected]

    Package: kernel-package
    Version: 8.093
    Severity: normal

    While trying to fix #256492 for my package ipw2100 I found out that
    unlike on 2.6.x the kernel-headers packages for 2.4.x do not contain all Makefiles and build scripts to build external kernel modules. Thus
    building the abovementioned module fails.

    Regards,
    Sebastian

    -- System Information:
    Debian Release: 3.1
    APT prefers unstable
    APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: i386 (i686)
    Kernel: Linux 2.6.6-1-k7
    Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro

    Versions of packages kernel-package depends on:
    ii altgcc [c-compiler] 1:2.7.2.3-2 Alternate gcc package for the libc ii dpkg 1.10.23 Package maintenance system for Deb ii dpkg-dev 1.10.23 Package building tools for Debian ii gcc [c-compiler] 4:3.3.4-2 The GNU C compiler
    ii gcc-3.3 [c-compiler] 1:3.3.4-7 The GNU C compiler
    ii make 3.80-9 The GNU version of the "make" util ii perl 5.8.4-2 Larry Wall's Practical Extraction

    -- no debconf information



    --
    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)
  • From Manoj Srivastava@1:229/2 to Sebastian Ley on Sat Aug 14 06:40:07 2004
    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)
  • From Sebastian Ley@1:229/2 to All on Sun Aug 15 20:00:14 2004
    From: [email protected]

    * Manoj Srivastava wrote:

    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.

    [...]
    I think you should use the mechanism defined in README.modules
    to plug in the module into kernel-package (using -I etc liberally).

    Well it is not the problem with plugging into kernel-package. The upstream Makefile for the module uses the above lines to build the the module. I would have to copy and the whole kernel Makefile in the 2.4 tree to workaround the Makefiles not being present. I'd rather not support 2.4 kernels before I
    start diving into that.

    It seems that the "new" system of building modules has been adopted for recent 2.4 kernels as well which is the reason that such a thing as above actually works. In that case we should support building modules in this style.

    Regards,
    Sebastian

    --
    PGP-Key: http://www.mmweg.rwth-aachen.de/~sebastian.ley/public.key
    Fingerprint: A46A 753F AEDC 2C01 BE6E F6DB 97E0 3309 9FD6 E3E6



    --
    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)