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 loader binary and the microcode
26 if [ ! -x $LOADER ]; then
27 echo "Missing afbinit"
31 if [ ! -f $UCODE ]; then
32 echo "Missing microcode"
36 # Make FB device list.
37 afb_devs=$(awk '/Elite/ {printf "fb%d\n",$1}' /proc/fb)
38 if [ -z "$afb_devs" ]; then
39 echo "No AFB detected"
45 # Load microcode onto each card.
46 for afb in $afb_devs; do
47 show "Starting afbinit for $afb device "
49 $LOADER /dev/$afb $UCODE > /dev/null
51 [ $RETVAL -eq 0 ] && ok || fail
62 msg_usage "$0 {start|stop|restart|reload}"