Bug#411415: afbinit init script does nothing

2007-04-08 Thread Emanuele Rocca
* Jurij Smakov <[EMAIL PROTECTED]>, [2007-02-18 13:50 -0800]:
>  diff -aur a/debian/afbinit.init b/debian/afbinit.init
>  --- a/debian/afbinit.init2007-02-18 13:15:46.0 -0800
>  +++ b/debian/afbinit.init2007-02-18 13:14:59.0 -0800
>  @@ -11,13 +11,11 @@
>   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=$(awk '/Elite/ {printf "fb%d\n",$1}' /proc/fb)
>  +[ -n "${afb_devs}" ] || exit 0

Your patch works correctly here. I would also suggest to redirect the
output of afbinit to /dev/null in order to have a cleaner boot message.

As it is now, afbinit.init prints the firmware revision number every
time:

fb0: Loading Elite3D microcode... Revision-1.3.10 done.

ciao,
ema


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#411415: afbinit init script does nothing

2007-04-08 Thread Emanuele Rocca
* Jurij Smakov <[EMAIL PROTECTED]>, [2007-02-18 13:50 -0800]:
>  Ben, I would like to ask for your permission to become a comaintainer 
>  of afbinit in Debian. 

Please go for it, no answer from Ben in more than one month.

I'll be glad to help you with this package, I have an Elite3D card on my
system so I can at least do some testing.

ciao,
ema


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#411415: afbinit init script does nothing

2007-02-18 Thread Jurij Smakov
Package: afbinit
Version: 1.0-1.1
Severity: important

Hi,

I have a machine with an Elite3D card. Recently I tried using xorg on 
it, and found that afbinit init script does not load the microcode on 
boot. It relies on encountering 'Elite' string in dmesg output as an 
indication that the microcode must be loaded. Latest kernels do not 
contain this string, so it exits silently. The simple attached patch 
works on my box. 

Ben, I would like to ask for your permission to become a comaintainer 
of afbinit in Debian. Then I could upload this fix, and sync with 
Ubuntu.

Best regards,
-- 
Jurij Smakov   [EMAIL PROTECTED]
Key: http://www.wooyd.org/pgpkey/  KeyID: C99E03CC
diff -aur a/debian/afbinit.init b/debian/afbinit.init
--- a/debian/afbinit.init	2007-02-18 13:15:46.0 -0800
+++ b/debian/afbinit.init	2007-02-18 13:14:59.0 -0800
@@ -11,13 +11,11 @@
 	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=$(awk '/Elite/ {printf "fb%d\n",$1}' /proc/fb)
+	[ -n "${afb_devs}" ] || exit 0
 
 	# Load microcode onto each card.
 	for AFB in ${afb_devs}; do
diff -aur a/debian/control b/debian/control
--- a/debian/control	2007-02-18 13:15:46.0 -0800
+++ b/debian/control	2007-02-18 13:25:25.0 -0800
@@ -7,7 +7,7 @@
 
 Package: afbinit
 Architecture: sparc
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, mawk | awk
 Description: Elite 3D Framebuffer firmware initializer
  The package provides a program that can initialize the microcode firmware
  on an Elite 3D framebuffer card found on many UltraSPARC systems. This is