patch changes installer so it writes /etc/modprobe.d/$profile.conf instead of just /etc/modules.
putting options in former means that modprobe will find them automatically, simplifying rmmod, modprobe cycles.. patch removes options from /etc/modules: theyre allowed, but having them in 2 places may confuse someone. BTW, scx200_acb doesnt probe ports 0x810,0x820 properly on this board, I dont know what works, so I left it alone.
From ea10230dc88fb5b3f5fa6b7c71d8687fa5ba62a2 Mon Sep 17 00:00:00 2001 From: root <[email protected]> Date: Tue, 16 Aug 2011 03:27:52 -0600 Subject: [PATCH 1/4] teach installer to write /etc/modprobe.d/profile.conf rework update_modules() to write etc/modprobe.d/$profile.conf along with etc/modules, drop module options from latter, and put them in former, where theyre used by modprobe. Tested on soekris net4801, with updated modules list: dropped lm77, not present on the net4801 added scx200_hrt, scx200_gpio, pc8736x_gpio, pc87360 The last is an lm-sensor, which needs user-space config tool to use. --- etc/voyage-profiles/4801.pro | 2 +- usr/local/sbin/update-config.sh | 25 ++++++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/etc/voyage-profiles/4801.pro b/etc/voyage-profiles/4801.pro index eba8019..1606ee2 100755 --- a/etc/voyage-profiles/4801.pro +++ b/etc/voyage-profiles/4801.pro @@ -2,4 +2,4 @@ VOYAGE_PROFILE=4801 VOYAGE_SYSTEM_CONSOLE=serial VOYAGE_SYSTEM_SERIAL=19200 VOYAGE_SYSTEM_PCMCIA=no -VOYAGE_SYSTEM_MODULES="wd1100 sysctl_wd_graceful=0 sysctl_wd_timeout=30; lm77; scx200_acb base=0x810,0x820" +VOYAGE_SYSTEM_MODULES="wd1100 sysctl_wd_graceful=0 sysctl_wd_timeout=30; scx200_acb base=0x810,0x820; pc87360 init=2; pc8736x_gpio; scx200_hrt; scx200_gpio" diff --git a/usr/local/sbin/update-config.sh b/usr/local/sbin/update-config.sh index d3a4cbc..6b0f272 100755 --- a/usr/local/sbin/update-config.sh +++ b/usr/local/sbin/update-config.sh @@ -15,21 +15,32 @@ # Params: $1 - root directory of target # update_modules() { - local saveifs modname buildlist + local saveifs modline moduleslist nameonly modoptslist saveifs=$IFS IFS=";" - buildlist=" + moduleslist=" # -# These lines generated automatically by `basename $0` +# These lines generated automatically by `basename $0`, +# parsing VOYAGE_SYSTEM_MODULES from Profile: $VOYAGE_PROFILE # on `date` # " - for modname in $VOYAGE_SYSTEM_MODULES; do - rmspace=`echo $modname | sed -e "s/^ *//"` - buildlist="$buildlist\n$rmspace" + modoptslist=$moduleslist + + # echo "Profile: $VOYAGE_PROFILE" + # echo "system-modules: $VOYAGE_SYSTEM_MODULES; " + for modline in $VOYAGE_SYSTEM_MODULES; do + rmspace=`echo $modline | sed -e "s/^ *//"` + nameonly=`echo $rmspace | cut -d' ' -f1` + # echo "modline: $modline" + # echo "rmspace: $rmspace" + # echo "nameonly: $nameonly" + moduleslist="$moduleslist\n$nameonly" + modoptslist="$modoptslist\noptions $rmspace" done IFS=$saveifs - echo -e "$buildlist" >> $1/etc/modules + echo -e "$moduleslist" >> $1/etc/modules + echo -e "$modoptslist" >> $1/etc/modprobe.d/$VOYAGE_PROFILE.conf } # -- 1.7.4.4
_______________________________________________ Voyage-linux mailing list [email protected] http://list.voyage.hk/mailman/listinfo/voyage-linux
