Re: Proposal: /lib/modules/<version> matching /usr/src/linux

From: Adam J. Richter (adam@yggdrasil.com)
Date: Mon Jul 31 2000 - 04:42:24 EST


Keith Owens <kaos@ocs.com.au> writes:
>On Sun, 30 Jul 2000 19:13:58 -0700,
>"Adam J. Richter" <adam@yggdrasil.com> wrote:
>>[snip] I would like to change
>>the layout of /lib/modules/<version> to mirror the layout of
>>/usr/src/linux.
[...]

>modutils 2.3.12 added /lib/modules/<version>/kernel for exactly this
>reason. The idea is to copy modules from linux/modules/*.o to
>/lib/modules/<version>/kernel (LMVK) but preserving the same directory
>structure as the kernel source. [...]

        Wow! I have seen the future, and it works! It turns out that
the latest version of modprobe already recurses through the
subdirectories of /lib/modules/<version>/kernel. Your patch, which
you attached to your previous message, also worked (aside from the
need to remove the "MAKING_MODULES=1" make argument that is no longer
used in the current kernels). This is exactly the module selection
that facility that I wanted, in order to automate the creation of
small systems like boot floppies. I have checked your kernel into our
source tree. How about if you submit your patch to Linus, and I
(and hopefully others) will ask him to integrate it?

<Less_Important_Stuff>

        The following is a pretty minor point, and does not necessarily
need to be addressed simultaneously with your patch:

[...]

>> 4. It should eliminate the need for a staging area in kernel
>> build process for installing modules.

>I was planning to keep the staging area. Some external kernel packages
>look in linux/modules so removing this directory would break those
>packages. Also the staging area ensures that all module names are
>unique. At one stage we had two modules with the same name in
>different source subtrees and the flat staging area caught that error.

        This is not a big issue to me, but I would be curious as
to which utilities rely on that staging area and how difficult it
would be to adjust them. As for error detection, you could actually
do better detection without the staging area, because then you can
more easily tell where both of the colliding module names came from.
For example, you could put something like this in the modules_install
make rule:

        conflicts="$$(find /lib/modules/$(VERSION)/ -type f | \
                sed 's|.*||' | sort | uniq -d)" ; \
        if [ -n "$conflicts" ] ; then \
                echo "Warning: duplicate modules names:" $$conflicts ; \
        fi

</Less_Important_Stuff>

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:33 EST