[PATCH] Keeping out of .tmp_versions in linux 2.5.x

Pavel Roskin proski at gnu.org
Tue May 20 02:00:27 EDT 2003


When hostap is compiled against 2.5.x kernels, files are created in the
kernel tree under ".tmp_versions" directory.  Those files correspond to
the modules and end with ".mod" suffix.  They hold the path to the module.

When I run "make install" under hostap, the modules are copied to the 
locations where they are supposed to be, i.e. under 
/lib/modules/`uname -r`/kernel/drivers/net/wireless/

If I run "make modules_install" in the kernel tree, hostap drivers are
also installed.  This may seem to be a nice side effect, but it's actually
not so nice.  This time, the hostap modules end up installed under
/lib/modules/`uname -r`/kernel/extra

If I run "make install" under hostap again (perhaps after some changes in
the sources) I end up with two copies of the hostap modules.  If the
hostap source has been cleaned, "make modules_install" in the kernel tree
will warn about stale entries.

I believe the right solution is not to disturb the kernel and keep the 
*.mod files in the hostap source tree.

Fortunately, it's not hard at all.  MODVERDIR should be set to the
directory where *.mod files are to be kept.  I think it should be the same
directory where the modules are compiled.

The patch is attached.

In the long run, we may want to try Linux Kernel Module Builder:

Pavel Roskin
-------------- next part --------------
--- Makefile
+++ Makefile
@@ -120,7 +120,8 @@
 		echo "*** Can't build for 2.5 with a non-2.5 source!"; \
 		exit 1; \
-	$(MAKE) -C $(KERNEL_PATH) SUBDIRS=$(PWD)/driver/modules modules
+	$(MAKE) -C $(KERNEL_PATH) SUBDIRS=$(PWD)/driver/modules \
+		MODVERDIR=$(PWD)/driver/modules modules
 	$(MAKE) install_all_info
 pccard:	$(MSRC)/$(MODULE_CS) hostap crypt install_info

More information about the HostAP mailing list