Bug#370651: kernel-package: README.modules: "User instructions" are incomplete and misleading
On 7 Jun 2006, Frank Küster told this:
> Manoj Srivastava <srivasta@debian.org> wrote:
>
>> The description is fine for header packages and source
>> packages that are produced by kernel-package itself. However,
>> official header and source packages are incomplete, and are missing
>> information useful for compiling third party modules using
>> kernel-package. Since the information is removed _after_ make-kpkg
>> has created it, I am redirecting this bug report.
>
> Thanks for looking into this.
>
> [...]
>> header packages produced by make-kpkg already have this directory.
>> This is removed, for some reason, from the official header
>> packages, breaking the building of third party modules by end users
>> using make-kpkg, or any possibility of just running ./debian/rules
>> modules_image directly.
>
> I don't understand this. And I find that I was imprecise in my
> description. In fact the prepackaged third-party module sources
> already contain a debian directory in their tarball, but don't work
> nevertheless. Let's take the (non-free) thinkpad-source package as
> an example:
% cd /usr/src/linux-headers-2.6.16-selinux1-1-skas3-v9-pre9
% fakeroot ./debian/rules modules_image
>
>>> So this method does not work.
>>
>> For official kernel header packages, no, since they are
>> incomplete.
>
> What's the information that is missing? Is there already a bug
> report about that?
Well, for starters, ./debian seems to be missing in the
official package. I have not looked at the other differences lately.
> Nice that you expect that from me... In fact I'm sure that I sort
> of new this once upon a time; not in the sense that make oldconfig
> creates version.h, but in the sense of a rule "always run make
> oldconfig when you copied a .config file over". However, I think
> the description in the README should be targetted at users who are
> at least as dumb as I am: Usually you can tell people "If you don't
> know how to compile a kernel, just take the distribution's packaged
> kernel". But with third-party modules, that frequently doesn't
> work, and even newbies need to compile the modules.
>
> Therefore I think the descriptions should be more explicit here; or
> instead refer newbies to tools like module-assistant.
>
> Ooops. And what you said seems to be wrong. I just did:
>
> $ rm -rf linux-source-2.6.16/ modules
> $ tar -xjf /usr/src/linux-source-2.6.16.tar.bz2
> $ tar -xzf /usr/src/thinkpad.tar.gz
> $ cd linux-source-2.6.16/
> $ cp /boot/config-2.6.16-2-686 .config
> $ make oldconfig
> $ ls include/linux/version.h
> ls: include/linux/version.h: No such file or directory
> $
>
> So make oldconfig does not create version.h.
It used to. Things seem to have changed in recent 2.6.X
kernels (the build system was recently revamped). This is one reason
I do not like having version specific information in kernel-package;
things change, and then one has to have special case code to disperse
different information based on kernel versions, and bit rot sets in
...
% make ARCH=i386 prepare
is the current incantation.
>>> Since I and my computer had enough time, I just compiled a
>>> (useless) kernel image along with the modules images, and that
>>> worked fine.
>>
>> Well, that was the default mechanism.
>
> Are you kidding? Why should one compile the complete kernel, when
> all I need are some third-party modules?
I meant that is the common use case -- people using
make-kpkg either have an uncrippled header or source package, or they
build both image and headers.
>> I think you ran into a broken header package, or, at least,
>> one that is not condusive to building third party modules with
>> kernel-package; and so I am redirecting this bug.
>
> The second problem (version.h is not generated by make-kpkg as
> needed) happened in a complete kernel source tree, not only with
> headers.
Hmm. You deliberately skipped the steps recommended, so while
make-kpkg does build the version.h, but you skipped all the steps
where it does it in. Caveatr emptor.
For the future, make-kpkg configure modules_image would
probably work better.
manoj
--
If he should ever change his faith, it'll be because he no longer
thinks he's God.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/%7Esrivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
Reply to: