freebsd-ports/sysutils/afbinit/files/patch-debian::afbinit.init
Alexander Leidinger 1eddd19d0c Add afbinit, a tool to load the microcode firmware onto Sun Microsystem
AFB Graphics Accelerators aka Sun Microsystems Elite 3D. The microcode
is necessary if you want to run XFree86 with acceleration on these cards.
The microcode in itself has to be obtained from an existing SunOS/Solaris
installation.

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2003-09-24 13:59:43 +00:00

44 lines
1.1 KiB
Text

--- debian/afbinit.init.orig Mon Sep 15 17:41:40 2003
+++ debian/afbinit.init Mon Sep 15 18:08:15 2003
@@ -1,35 +1,28 @@
#!/bin/sh
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-set -e
-
# This only applies to UltraSPARC's
-[ `uname -m` = "sparc64" ] || exit 0
+[ `/usr/bin/uname -m` = "sparc64" ] || exit 0
# The microcode loader binary and the microcode itself must exist.
if [ ! -x /usr/sbin/afbinit -o ! -f /usr/lib/afb.ucode ]; then
exit
fi
-# Need a better way to test this
-[ `dmesg | grep -c "Elite 3D"` -ne 0 ] || exit
-
case "$1" in
start)
# Make FB device list.
- afb_devs=`/bin/dmesg | /bin/egrep -i "Elite 3D" | /bin/sed 's/\:.*//'`
+ afb_devs=`/bin/ls /dev/fb[0-7]`
# Load microcode onto each card.
for AFB in ${afb_devs}; do
- echo -n "${AFB}: Loading Elite3D microcode... "
- /usr/sbin/afbinit /dev/${AFB} /usr/lib/afb.ucode
- echo "done."
+ /usr/sbin/afbinit ${AFB} /usr/lib/afb.ucode > /dev/null
done
+ echo -n ' afbinit'
;;
- stop|restart|force-reload) # Nothing
+ stop|restart) # Nothing
;;
*)
- echo "Usage: $0 start" >&2
+ echo "Usage: `basename $0` start" >&2
exit 1
;;
esac