Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fbsplash +-ppc: console text does not stay in text box FIXED
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Dent
n00b
n00b


Joined: 01 Dec 2003
Posts: 7

PostPosted: Wed Apr 13, 2005 12:21 am    Post subject: fbsplash +-ppc: console text does not stay in text box FIXED Reply with quote

Hello...

Using kernel 2.6.11-gentoo-r6 with boot logo and fbsplash enabled (haven't tried older kernels)
splashutils 1.1.9.3 (same problem with earlier versions)

cat /proc/fbsplash: Frambuffer splash v0.9, mode: verbose

using the default emergence theme to test with
relevant kernel command line args: video=radeonfb:1280x854-32 splash-silent,fadein,theme:emergence CONSOLE=/dev/tty1 quiet

The console text goes to all edges of the screen
ie tx = ty = 0, tw=1280, th=854, even though the values in the .cfg are:
tx=31,ty=30, tw=1223, th=809

It's pretty, but it would be so much better if the text was where it should be.

I am not sure vesa support would be a good idea as this is a ppc (powerbook).


Last edited by Dent on Wed Apr 13, 2005 10:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dent
n00b
n00b


Joined: 01 Dec 2003
Posts: 7

PostPosted: Wed Apr 13, 2005 5:33 am    Post subject: Reply with quote

Code:
Splash config on console 2:
tx:       0
ty:       0
twidth:   1280
theight:  854
bg_color: 0
theme:    emergence


I am beginning to think it may have to do with config parsing, or something?

The config file says:
Code:
bgcolor=0

tx=31
ty=30
tw=1223
th=809

text_x=254
text_y=604
text_size=28
text_color=0xeef4ff
Back to top
View user's profile Send private message
Dent
n00b
n00b


Joined: 01 Dec 2003
Posts: 7

PostPosted: Wed Apr 13, 2005 10:34 pm    Post subject: fixed Reply with quote

turns out this is an endian bug.

edit the file parse.c
find the parse_int function
change the last line of the function so that the int pointer cast is a u16 pointer cast
[ change "*(unsigned int*)opt.val = strtol(t,NULL,0);" to "*(u16*)opt.val = strtol(t,NULL,0);"]

and I have my text boxes!

I'll submit a patch to spock
Back to top
View user's profile Send private message
antrix
n00b
n00b


Joined: 31 Oct 2003
Posts: 62

PostPosted: Thu Apr 14, 2005 12:38 am    Post subject: Reply with quote

Excellent. I noticed that the tex wast all the way to the edges as well!
I will try the endian fix tomorrow.

Would you mind posting your entire yaboot.conf just so I could have a look at it?
_________________
Antrix
| 2.6.9-gentoo-r13 i686 AMD Athlon(tm) XP 2000+ AuthenticAMD GNU/Linux | (My desktop PC, which needs an update world)

| 2.6.11-gentoo-r6 PPC 7447A, altivec supported PowerBook6,5 GNU/Linux | (My iBook G4)
Back to top
View user's profile Send private message
Dent
n00b
n00b


Joined: 01 Dec 2003
Posts: 7

PostPosted: Thu Apr 14, 2005 3:30 am    Post subject: Reply with quote

Code:
boot=/dev/hda9
device=/pci@f4000000/ata-6@d/disk@0:
#defaultos=macosx
partition=4
root=/dev/hda4
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
#video=ofonly
macos=/dev/hda8
macosx=/dev/hda3

image=/boot/kernel-2.6.11-dst3
        label=Linux
        sysmap=/boot/System.map-2.6.11-dst3
        initrd=/boot/initrd-splash
        append="video=radeonfb:ywrap,1280x854-32 splash=silent,theme:World,fadein CONSOLE=/dev/tty1 quiet"
        read-only


World is a custom theme... macos was a tiger beta
Back to top
View user's profile Send private message
Pylon
Retired Dev
Retired Dev


Joined: 17 Jan 2003
Posts: 279
Location: Cologne

PostPosted: Thu Apr 14, 2005 10:23 pm    Post subject: Re: fixed Reply with quote

Dent wrote:
turns out this is an endian bug.


Thanks a lot! 8) I had that nasty bug for quite a while now (and that's the reason why the 2005.0 ppc LiveCD don't boot up with that nice artwork). But now everything is fine and I had a good chat with spock (who told me about this thread).

But there is another bug with --tty= instead of --vc=. Somehow the --tty= causes a segfaut on my machine.
_________________
hacking is not a crime
Back to top
View user's profile Send private message
Dent
n00b
n00b


Joined: 01 Dec 2003
Posts: 7

PostPosted: Fri Apr 15, 2005 2:00 am    Post subject: Reply with quote

It was a fun problem to diagnose too...

I added fprints to stderr and noticed that when I would set tx, ty would get set. when tw was set, the value would end up in th. I was totally confused until I noticed that the struct is packed and remebered that cs lecture on endianess.

I am still having a slight problem... /etc/init.d/splash doesn't work during the boot process. console 1 and 8 are setup during boot, but the rest fail with error 22. After boot, I do /etc/init.d/splash restart, and all the consoles are setup. I use different themes on each vc, but that doesn't appear to be the issue as splashutil gets called correctly.
Back to top
View user's profile Send private message
Dent
n00b
n00b


Joined: 01 Dec 2003
Posts: 7

PostPosted: Fri Apr 15, 2005 5:27 am    Post subject: Reply with quote

Here's a little kernel patch that improves startup for me.

use the patch below, it's safer and won't spit kernel warnings

Without it, most of my virtual consoles don't get setup with fbsplash when the splash script
(/etc/init.d/splash) starts. With it, they do.

Code:
removed because it was a little dangerous...  see below for a new version


Last edited by Dent on Sun Apr 17, 2005 9:36 am; edited 1 time in total
Back to top
View user's profile Send private message
antrix
n00b
n00b


Joined: 31 Oct 2003
Posts: 62

PostPosted: Sat Apr 16, 2005 1:44 am    Post subject: Reply with quote

Cheers Dent.

I spotted a problem in my yaboot.conf, which prevented me from seeing the bootup screen.

I had forgotten to separate the splash and theme options with a comma. Thanks to you, its working now. :)
_________________
Antrix
| 2.6.9-gentoo-r13 i686 AMD Athlon(tm) XP 2000+ AuthenticAMD GNU/Linux | (My desktop PC, which needs an update world)

| 2.6.11-gentoo-r6 PPC 7447A, altivec supported PowerBook6,5 GNU/Linux | (My iBook G4)
Back to top
View user's profile Send private message
Dent
n00b
n00b


Joined: 01 Dec 2003
Posts: 7

PostPosted: Sun Apr 17, 2005 9:33 am    Post subject: Reply with quote

Here's a better patch that actually locks the semaphore (to avoid error messages and possible problems).

Code:
diff -upr linux-2.6.11-gentoo-r6/drivers/video/fbsplash.c linux-2.6.11-gentoo-r6-vc_allocate/drivers/video/fbsplash.c
--- linux-2.6.11-gentoo-r6/drivers/video/fbsplash.c     2005-04-17 02:26:45.000000000 -0700
+++ linux-2.6.11-gentoo-r6-vc_allocate/drivers/video/fbsplash.c 2005-04-17 02:27:58.000000000 -0700
@@ -433,8 +433,14 @@ static int splash_ioctl(struct inode * i
                __get_user(origin, &wrapper->origin);
                __get_user(data, &wrapper->data);

-               if (!vc_cons_allocated(vc_num))
-                       return -EINVAL;
+               if (!vc_cons_allocated(vc_num)) {
+                       acquire_console_sem();
+                        if (vc_allocate(vc_num)) {
+                                release_console_sem();
+                               return -EINVAL;
+                        }
+                        release_console_sem();
+                }

                vc = vc_cons[vc_num].d;
        }
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum