[PATCH] Fix for warning in MODPOST

Pavel Roskin proski at gnu.org
Wed May 28 15:10:38 EDT 2003


Hello!

When compiling hostap for 2.5.x kernels and it depends on some other
modules (in particular, hostap_cs can depend on ds), there are spurious
warnings:

  Starting the build. KBUILD_BUILTIN= KBUILD_MODULES=1
  Building modules, stage 2.
  MODPOST
*** Warning: "pcmcia_unregister_driver"
[/home/proski/src/hostap/driver/modules/hostap_cs.ko] undefined!
*** Warning: "pcmcia_register_driver"
[/home/proski/src/hostap/driver/modules/hostap_cs.ko] undefined!
*** Warning: "cs_error"
[/home/proski/src/hostap/driver/modules/hostap_cs.ko] undefined!
*** Warning: "CardServices"
[/home/proski/src/hostap/driver/modules/hostap_cs.ko] undefined!

This is especially visible for 2.5.70 kernel that defaults to the quiet
build.  We need to do it better.

The attached patch (checking that it's indeed attached :-)) copies
.tmp_versions from the kernel sources to driver/modules.  This directory
together with the *.mod files is removed by "make clean".
"driver/modules" has been replaced with $(MSRC) everywhere for
consistency.

driver/modules/.cvsignore has been changed to include .tmp_versions and
*.ver files.  The later are created when building hostap for 2.4.x
kernels.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- Makefile
+++ Makefile
@@ -133,7 +133,7 @@
 		echo "*** Can't build for 2.4 with a non-2.4 source!"; \
 		exit 1; \
 	fi
-	$(MAKE) -C $(KERNEL_PATH) SUBDIRS=$(PWD)/driver/modules modules
+	$(MAKE) -C $(KERNEL_PATH) SUBDIRS=$(PWD)/$(MSRC) modules
 	$(MAKE) install_all_info
 
 2.5:
@@ -141,8 +141,10 @@
 		echo "*** Can't build for 2.5 with a non-2.5 source!"; \
 		exit 1; \
 	fi
-	$(MAKE) -C $(KERNEL_PATH) SUBDIRS=$(PWD)/driver/modules \
-		MODVERDIR=$(PWD)/driver/modules modules
+	rm -rf $(MSRC)/.tmp_versions
+	cp -rf $(KERNEL_PATH)/.tmp_versions $(MSRC)/.tmp_versions
+	$(MAKE) -C $(KERNEL_PATH) SUBDIRS=$(PWD)/$(MSRC) \
+		MODVERDIR=$(PWD)/$(MSRC)/.tmp_versions modules
 	$(MAKE) install_all_info
 
 pccard:	$(MSRC)/$(MODULE_CS) hostap crypt install_info
@@ -263,5 +265,5 @@
 	rm -f $(MSRC)/*.ko
 	rm -f $(MSRC)/*.ver
 	rm -f $(MSRC)/*.mod.[co]
-	rm -f $(MSRC)/*.mod
 	rm -f $(MSRC)/.hostap*.cmd
+	rm -rf $(MSRC)/.tmp_versions
--- driver/modules/.cvsignore
+++ driver/modules/.cvsignore
@@ -1,3 +1,5 @@
 *.ko
 *.mod.c
 *o.cmd
+*.ver
+.tmp_versions


More information about the HostAP mailing list