It is great that driver/Makefile2.6's install target checks for
pre-existing modules that might conflict with ivtv's. In this patch,
I improve on this check:
- modules are checked for throughout the module tree, not just in one
place
- the new code is more concise. Because it is less repetitive, it
should be easier to maintain. It still needs manual modification
if modules are added or removed from IVTV.
- the new code does not complain if the module is byte-for-byte
identical with ivtv's. This is needed because otherwise the new
code would complain about the modules that we just installed, but
I think that the feature is good in any case.
- the new code suggests a command to hide the offending module
(this is better than removal because it is reversible)
Lightly tested -- works for me. This change seems low-risk since it
only produces warning messages
This is a patch to ivtv-0.3.7a.
===================================================================
RCS file: driver/RCS/Makefile2.6,v
retrieving revision 1.1
diff -u -r1.1 driver/Makefile2.6
--- driver/Makefile2.6 2005/07/30 19:29:13 1.1
+++ driver/Makefile2.6 2005/07/30 19:29:29
@@ -24,34 +24,15 @@
install: all
$(MAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=$(MDIR) \
$(CONFIG) -C $(KDIR) M=$(PWD) modules_install
- @msp=/lib/modules/$(KVER)/kernel/drivers/media/video/msp3400.ko ; \
- if [ -f $$msp ]; then \
- echo "You appear to have a $$msp."; \
- echo "That can cause a conflict with the msp3400.ko from
ivtv."; \
- echo "It is wise to remove $$msp."; \
- echo "After that run depmod again."; \
- fi
- @tuner=/lib/modules/$(KVER)/kernel/drivers/media/video/tuner.ko ; \
- if [ -f $$tuner ]; then \
- echo "You appear to have a $$tuner."; \
- echo "That can cause a conflict with the tuner.ko from ivtv."; \
- echo "It is wise to remove $$tuner."; \
- echo "After that run depmod again."; \
- fi
- @tda9887=/lib/modules/$(KVER)/kernel/drivers/media/video/tda9887.ko ; \
- if [ -f $$tda9887 ]; then \
- echo "You appear to have a $$tda9887."; \
- echo "That can cause a conflict with the tda9887.ko from
ivtv."; \
- echo "It is wise to remove $$tda9887."; \
- echo "After that run depmod again."; \
- fi
- @tveeprom=/lib/modules/$(KVER)/kernel/drivers/media/video/tveeprom.ko ;
\
- if [ -f $$tveeprom ]; then \
- echo "You appear to have a $$tveeprom."; \
- echo "That can cause a conflict with the tveeprom.ko from
ivtv."; \
- echo "It is wise to remove $$tveeprom."; \
- echo "After that run depmod again."; \
- fi
+ @ for m in ` find /lib/modules/$(KVER)/kernel -name msp3400.ko -o -name
tuner.ko -o -name tda9887.ko -o -name tveeprom.ko ` ; \
+ do \
+ if ! cmp -s $$m `basename $$m` ; \
+ then \
+ echo "Module $$m conflicts with the ivtv module of the
same name -- please hide or delete it." ; \
+ echo "To hide: mv $$m $$m.HIDE" ; \
+ echo "You will then need to run depmod." ; \
+ fi ; \
+ done
clean:
rm -rf .*.cmd *.o *.mod.c *.ko *~ core .tmp_versions
================ end of patch ================
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
ivtv-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ivtv-devel