[PVFS2-developers] Kernel module install
pw at osc.edu
Fri Mar 12 14:54:41 EST 2004
poznick at conwaycorp.net said on Fri, 12 Mar 2004 13:39 -0600:
> Pete, I saw the flurry of commits dealing with the build process, and
> was particularly interested in the fact that the kernel module is now
> installed with the rest of PVFS2. However, I was wondering if there was
> a specific reason you have it going into $(prefix)/sbin. It would be
> nice if the 'proper' kernel module install directory could be determined
> somehow (would need to probably fetch out the value of KERNELRELEASE
> from the top-level kernel Makefile) and the module be installed into it.
Yeah, that was only to put it somewhere outside of the build tree, which
I like to wipe frequently. Your idea of /lib/modules/<uname>/ is
> Now that I think about it a little more, how does this sound to
> * By default, if the kernel module is compiled, extract the kernel release
> string from the kernel's top-level Makefile and install the module
> into /lib/modules/kernel_release_string/kernel/fs
> * This directory can be overridden on the make install by using
> something like "make KMODDIR=/path/to/somewhere/else install" for those of
> us who for some reason or another, wish it to be placed elsewhere.
I'm all for this, but will never use it, since I need to manage multiple
architectures in the same filesystem. But it would be good to do the
Right Thing for most users.
> ifneq (,$(LINUX_KERNEL_SRC))
> +KERNV := $(shell grep '^VERSION' $(LINUX_KERNEL_SRC)/Makefile | cut -d= -f2 | sed 's/^[ \t]*//;s/[ \t]*$$//' )
> +KERNPL := $(shell grep '^PATCHLEVEL' $(LINUX_KERNEL_SRC)/Makefile | cut -d= -f2 | sed 's/^[ \t]*//;s/[ \t]*$$//' )
> +KERNSL := $(shell grep '^SUBLEVEL' $(LINUX_KERNEL_SRC)/Makefile | cut -d= -f2 | sed 's/^[ \t]*//;s/[ \t]*$$//' )
> +KERNEV := $(shell grep '^EXTRAVERSION' $(LINUX_KERNEL_SRC)/Makefile | cut -d= -f2 | sed 's/^[ \t]*//;s/[ \t]*$$//' )
> +KMODDIR := /lib/modules/$(KERNV).$(KERNPL).$(KERNSL)$(KERNEV)/kernel/fs
> install:: install_kmod
How about just grabbing the UTS_RELEASE string from
$(LINUX_KERNEL_SRC)/include/linux/version.h instead? This is a
configured source directory so we have that luxury.
Should we make this install step be a separate thing so people can
become root and type the magic thing to do the root-only install bit?
More information about the PVFS2-developers