[RFC] Machine-specific modules ala m68k
'lo all. I was thinking abit about the lack of /etc/modutils/arch/powerpc*,
and thought about how we should fix it. What I did was as following:
In /sbin/update-modules:
@@ -56,6 +56,20 @@
echo "/proc/hardware does not exist, assuming general m68k system"
fi
fi
+ if [ $arch = "powerpc" ]; then
+ if [ -f /proc/cpuinfo ]; then
+ model=`awk '/machine/ {print $3}' /proc/cpuinfo`
+ case $model in
+ CHRP*) model=".chrp"; ;;
+ PReP*) model=".prep"; ;;
+ Power*|iMac*) model=".pmac"; ;;
+ *) model=".generic"; ;;
+ esac
+ else
+ model=".generic"
+ echo "/proc/cpuinfo does not exist, assuming generic powerpc system"
+ fi
+ fi
echo "${arch}${model}"
}
Which adds bits to archmodel() ala what m68k does so that we can have different
files for pmac, prep & chrp. Other machines which don't fall into this
(ie the various boards in 2_4_devel) should work fine with the .generic file.
8xx machines _should_ be OK as well (serial cannot be a module currently or
probably ever). In each of the files, i've got an appropriate alias for
what serial should be (since that's the only thing I could think of off the
top of my head). Comments? Does this sound good (and I should file a wishlist
bug for it)? Horribly wrong?
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
Reply to: