3 # afbinit firmware loader for Elite 3D cards
5 # chkconfig: 2345 90 10
7 # description: Load microcode at boottime to all detected Elite3D
11 # Source function library
12 . /etc/rc.d/init.d/functions
14 UCODE=/lib/firmware/afb.ucode
15 LOADER=/usr/sbin/afbinit
18 # If this is not sparc64, get out of here.
19 if [ "$ARCH" != "sparc64" ]; then
20 echo "$ARCH cannot have AFB"
24 # The microcode must exist.
25 if [ ! -f $UCODE ]; then
26 echo "Missing microcode"
30 # Make FB device list.
31 afb_devs=$(awk '/Elite/ {printf "fb%d\n",$1}' /proc/fb)
32 if [ -z "$afb_devs" ]; then
33 echo "No AFB detected"
39 # Load microcode onto each card.
40 for afb in $afb_devs; do
41 show "Starting afbinit for $afb device "
43 $LOADER /dev/$afb $UCODE > /dev/null
45 [ $RETVAL -eq 0 ] && ok || fail
51 start|restart|try-restart|reload|force-reload)
57 echo "AFB devices present: $afb_devs"
60 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload}"