Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: TinyErestor on January 14, 2018, 11:45:38 AM
-
Hi,
because one of my computer needs an option to the module forcedeth, I have tc-config extended to react on kernel parameter modopt=.
This is a diff -u from the original tc-config of TC-8 to my changed one:
--- /etc/init.d/tc-config
+++ tc8-rootfs/etc/init.d/tc-config
@@ -60,6 +60,7 @@
xvesa* ) XVESA=${i#*=} ;;
rsyslog=* ) RSYSLOG=${i#*=}; SYSLOG=1 ;;
blacklist* ) BLACKLIST="$BLACKLIST ${i#*=}" ;;
+ modopt* ) MODOPT="$MODOPT ${i#*=}" ;;
iso* ) ISOFILE=${i#*=} ;;
esac
;;
@@ -98,6 +99,13 @@
echo "$i" | tr ',' '\n' | while read j ; do
echo "blacklist $j" >> /etc/modprobe.d/blacklist.conf
done
+ done
+fi
+
+if [ -n "$MODOPT" ]; then
+ mkdir -p /etc/modprobe.d
+ for i in $MODOPT; do
+ echo "options,$i" | tr ',' ' ' >> /etc/modprobe.d/options.conf
done
fi
This causes for example the kernel argument modopt=forcedeth,msi=0 to generate a line
options forcedeth msi=0
to be put into /etc/modprobe.d/options.conf. By this, the modules foredeth will be loaded with the argument msi=0.
Because this is no bug resolution, I have put this into TCB talk.
Regards
-
Another way would be to put /etc/modprobe.d/options.conf into it's own initrd and load it after rootfs in extlinux.conf. Then you don't have to update your version of the TC rootfs everytime there is a change.
-
I don't think this is necessary, most modules accept such options directly on the kernel line. Try "forcedeth.msi=0", etc. Alternatively, blacklist it and load manually in bootlocal.sh.