Bug#192232: Modifications to get modconf working with 2.5/2.6 kernel
Here is a better version of my diff file to get modconf working with a
2.5/2.6 kernel. This one is slightly different -- I have it sorting the
directories now to make it easier to find them in the menu system, and I
produced this diff with the "-u" option to make it easier to use.
Binary files orig/modconf/Module-HOWTO.gz and modconf/Module-HOWTO.gz differ
diff -ru orig/modconf/mkdescr.pl modconf/mkdescr.pl
--- orig/modconf/mkdescr.pl 2002-02-08 14:10:35.000000000 -0800
+++ modconf/mkdescr.pl 2003-10-31 01:06:01.000000000 -0800
@@ -23,7 +23,7 @@
elsif (m,^ Load command:,) {
$state="loadcommand";
}
- elsif (m, */sbin/modprobe (.*)\.o( (.*)|)$,) {
+ elsif (m, */sbin/modprobe (.*)\.k?o( (.*)|)$,) {
if ($state eq "modprobe") {
if ( $count == 0 ) {
print " $module $params\n \n";
diff -ru orig/modconf/modconf modconf/modconf
--- orig/modconf/modconf 2002-01-27 13:43:36.000000000 -0800
+++ modconf/modconf 2003-10-31 02:24:42.000000000 -0800
@@ -210,14 +210,11 @@
else
dir_descrs=""
for i in $(get_modules_dirs $Dir_Prefix); do
- if [ -d $Dir_Prefix/$i -a \
- -f $(first $Dir_Prefix/$i/*.o) ]; then
- if [ -n "$Exclude_Section" ] &&
- in_list $i $Exclude_Section ; then
- true
- else
- dir_descrs="$dir_descrs $i"
- fi
+ if [ -n "$Exclude_Section" ] &&
+ in_list $i $Exclude_Section ; then
+ true
+ else
+ dir_descrs="$dir_descrs $i"
fi
done
fi
diff -ru orig/modconf/modules/util modconf/modules/util
--- orig/modconf/modules/util 2002-02-03 09:50:06.000000000 -0800
+++ modconf/modules/util 2003-10-31 02:57:57.000000000 -0800
@@ -31,8 +31,8 @@
basemodulename () {
local module=$1
- # strip off .o suffix
- module=${module%.o}
+ # strip off .o or .ko suffix
+ module=`echo $module | perl -pe 's/\.k?o$//'`
# strip off path prefix
module=${module##*/}
echo $module
@@ -57,7 +57,7 @@
build_chandev_list () {
kver=`uname -r`
- chandev_module_list="$(for file in `find /lib/modules/$kver -name "*.o"`; do grep -q "chandev_register" $file; if [ $? -eq 0 ]; then basemodulename $file; fi; done | sort -u)"
+ chandev_module_list="$(for file in `find /lib/modules/$kver \( -name "*.o" -o -name "*.ko" \)`; do grep -q "chandev_register" $file; if [ $? -eq 0 ]; then basemodulename $file; fi; done | sort -u)"
return 0;
}
@@ -130,7 +130,8 @@
if [ "$Source" = "floppy" ]; then
eval "list=$`echo dir_content_$directory`"
else
- list="$Dir_Prefix/$directory/*.o"
+ list=`find $Dir_Prefix/$directory -mindepth 1 -maxdepth 1 \
+ -name \*.o -o -name \*.ko`
fi
for i in $list; do
@@ -591,9 +592,8 @@
local mdir="$1"
local dir
- for dir in $(cd $mdir; find -type d); do
- if [ "$dir" != "." ]; then
- echo ${dir#./}
- fi
+ for dir in $(cd $mdir; find -type f -name \*.o -o -name \*.ko \
+ -printf "%h\n" | uniq); do
+ echo ${dir#./}
done
}
Only in modconf/modules: util.~1.27.~
Reply to: