OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Jan 18, 2022 8:20 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: GRUB Boot Picture
PostPosted: Sat Oct 25, 2008 6:39 pm 
Offline
Member
Member

Joined: Mon Oct 06, 2008 12:38 am
Posts: 29
I have been looking for a way to show a picture during boot like Ubuntu or most OS. I heard there is a way using GRUB but I cannot recall. Any hints?


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sat Oct 25, 2008 6:48 pm 
Offline
Member
Member

Joined: Tue Sep 23, 2008 1:45 pm
Posts: 158
Location: Eindhoven, Netherlands
Switch video mode and write the picture to video memory?


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sat Oct 25, 2008 7:19 pm 
Offline
Member
Member
User avatar

Joined: Mon Dec 04, 2006 6:06 am
Posts: 158
Location: Berlin, Germany
You can patch GRUB to support graphical themes. I think GRUB2 will support it natively. But booting your OS will still be in text mode. I agree with CodeCat.


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sat Oct 25, 2008 7:27 pm 
Offline
Member
Member

Joined: Mon Oct 06, 2008 12:38 am
Posts: 29
I just want graphical boot screen. GRUB has VBE functions built-in, why would I build a vesa driver? Any one using GRUB to load an image at boot? Link, Sample, Hint?


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sat Oct 25, 2008 9:48 pm 
Offline
Member
Member
User avatar

Joined: Mon Dec 04, 2006 6:06 am
Posts: 158
Location: Berlin, Germany
whiteOS wrote:
I just want graphical boot screen. GRUB has VBE functions built-in, why would I build a vesa driver? Any one using GRUB to load an image at boot? Link, Sample, Hint?

You still need the setvbe patch or a similar patch. AFAIK support for the Multiboot video fields newer made it into GRUB Legacy.


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sun Oct 26, 2008 5:32 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 17, 2006 12:00 am
Posts: 500
Location: Napoli, Italy
Maybe you can have a boot picture using the splashimage option. I think there is a patch to do this.

_________________
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sun Oct 26, 2008 10:36 am 
Offline
Member
Member

Joined: Mon Oct 06, 2008 12:38 am
Posts: 29
Anyone know where I get grub 0.94 vbe patch. this link dead: http://www.smk.co.za/software/vbe-grub/ the site runs but link to patch is dead.

EDIT: Jeko, thank you for suggestion. That is what i remember i heard now. this was a while ago i heard so hearing that made it come to mind. yes, i think the vbe patch is the same as you suggested. i keep looking.


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sun Oct 26, 2008 1:42 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 9:29 pm
Posts: 2426
Location: Canada
whiteOS wrote:
Anyone know where I get grub 0.94 vbe patch. this link dead: http://www.smk.co.za/software/vbe-grub/ the site runs but link to patch is dead.

I mentioned this to him on his blog, I'm sure he'll get around to fixing it.. until then I'll attach the patches here.

Note; It cannot set a "boot image" as requested by the OP, that's a different patch.. it's typically found in the repositories of Linux distributions.

Looking back though, I realize I forgot to add the *.texi files as mentioned in the ChangeLog, whoops, not sure what happened to them. ;)

Have fun.


Attachments:
vbe_grub-0.97.patch [8.6 KiB]
Downloaded 169 times
vbe_grub-0.94.patch [9.03 KiB]
Downloaded 162 times

_________________
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sun Oct 26, 2008 2:20 pm 
Offline
Member
Member
User avatar

Joined: Fri Mar 17, 2006 12:00 am
Posts: 500
Location: Napoli, Italy
Brynet-Inc wrote:
whiteOS wrote:
Anyone know where I get grub 0.94 vbe patch. this link dead: http://www.smk.co.za/software/vbe-grub/ the site runs but link to patch is dead.

I mentioned this to him on his blog, I'm sure he'll get around to fixing it.. until then I'll attach the patches here.

Note; It cannot set a "boot image" as requested by the OP, that's a different patch.. it's typically found in the repositories of Linux distributions.

Looking back though, I realize I forgot to add the *.texi files as mentioned in the ChangeLog, whoops, not sure what happened to them. ;)

Have fun.


How can I apply the patch? And to use it, must I change something in my menu.lst?

And where can I find the patch for the splashimage?

_________________
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sun Oct 26, 2008 5:03 pm 
Offline
Member
Member
User avatar

Joined: Mon Dec 04, 2006 6:06 am
Posts: 158
Location: Berlin, Germany
Jeko wrote:
How can I apply the patch? And to use it, must I change something in my menu.lst?

Try something like this:
Code:
patch -p0 < patch-file

And how do you use it. Well, it says on the website... follow the link. :)


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sun Oct 26, 2008 8:27 pm 
Offline
Member
Member

Joined: Mon Oct 06, 2008 12:38 am
Posts: 29
this how on windows:

Code:
@echo off
set PATH=path_to_patch.exe;%PATH%
chdir path_to_patch.exe
patch.exe -p0 < file.patch
pause


any luck finding splashimage patch for 0.94 grub?


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Sun Oct 26, 2008 11:03 pm 
Offline
Member
Member
User avatar

Joined: Mon Dec 04, 2006 6:06 am
Posts: 158
Location: Berlin, Germany
whiteOS wrote:
any luck finding splashimage patch for 0.94 grub?

I found a patch for GRUB 0.97 in the Debian source files. I attached it. Be aware that it conflicts with the setvbe patch, but it's only two lines of code, so you can easily fix it. You also need automake in order to create a successful build using the Debian patch. I never used automake before. I just read the Debian patch script and saw what it did. I hope you can get automake for Windows (Cygwin?). Well, I did something like this:
Code:
tar xzvf grub-0.97.tar.gz  # Extract GRUB source code.
patch -p0 < grub_0.97-27etch1_debian_graphics.patch
patch -p0 < vbe_grub-0.97.patch
# Here I fixed the patch conflict. Use your favourite editor.
mkdir grubinst  # Folder for installing GRUB files.
cd grub-0.97/
aclocal-1.9
automake-1.9
autoconf
./configure --disable-auto-linux-mem-opt --prefix=../grubinst
make
make check
make install
cd ../grubinst/lib/grub/i386-pc/  # Here you find the built GRUB stages.

That's it! It works for me (you just need a 640x480 14-color .xpm image). The vbeset and vbematch exists as well, although they don't seem to work. When I use vbematch it displays "vbematch <resolution>" when loading my kernel, but it doesn't change the resolution or anything. The built-in vbeprobe command also gives me an error. Strange. :? I have only tested in Bochs/QEMU. I need to test it on a real computer.


Attachments:
File comment: Patch to add splashimage support for GRUB 0.97, found in the Debian source files.
grub_0.97-27etch1_debian_graphics.patch [59.43 KiB]
Downloaded 37 times
Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Mon Oct 27, 2008 4:42 am 
Offline
Member
Member
User avatar

Joined: Sun Nov 07, 2004 12:00 am
Posts: 148
I have a question!

Can't we just use the grub supplied with various distributions to make another floppy drive grub bootable by using grub-install command?

_________________
Magneto OS ver 0.2
OS Dev Begineers Guide
My New Home


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Wed Oct 29, 2008 2:31 pm 
Offline
Member
Member

Joined: Mon Oct 06, 2008 12:38 am
Posts: 29
Walling wrote:
although they don't seem to work. When I use vbematch it displays "vbematch <resolution>" when loading my kernel, but it doesn't change the resolution or anything. The built-in vbeprobe command also gives me an error. Strange. :? I have only tested in Bochs/QEMU. I need to test it on a real computer.


try setting this line at the end of your menu.lst:

vbeset 0x117

that should be 1024X768X16 mode, and it works for me. I of course see nothing sense i no have vbe address mapped, still trying to find a way to get address from grub.


Top
 Profile  
 
 Post subject: Re: GRUB Boot Picture
PostPosted: Wed Oct 29, 2008 4:00 pm 
Offline
Member
Member
User avatar

Joined: Mon Dec 04, 2006 6:06 am
Posts: 158
Location: Berlin, Germany
Snake wrote:
Can't we just use the grub supplied with various distributions to make another floppy drive grub bootable by using grub-install command?

Many distributions enable splashimage, but I haven't seen any use the vbeset patch for Multiboot kernels. Why should they? They only have to load the Linux kernel :shock: I have seen some distributions (openSUSE) that just pass a VBE mode number as a kernel argument and then it is up to the kernel to set the VBE mode.

whiteOS wrote:
try setting this line at the end of your menu.lst:

vbeset 0x117

that should be 1024X768X16 mode, and it works for me.

Does it work for you in Bochs/QEMU too? I have to try on a real machine, but I just had the time yet. The only pc I have (IBM X41 laptop) does not have a cd-drive, so I have to install the patched GRUB in order to test it. I will eventually.

whiteOS wrote:
I of course see nothing sense i no have vbe address mapped, still trying to find a way to get address from grub.

Hmm... it seems the vbeset patch isn't "finished". It does not transfer the VBE info to the kernel. Look in the patch file. There's a comment saying "give it to the kernel", but no code:
Code:
--- grub-0.97/stage2/boot.c     Tue Mar 30 11:44:08 2004
+++ grub-0.97/stage2/boot.c     Thu Nov 23 20:26:17 2006
@@ -87,6 +87,13 @@
            }
          type = KERNEL_TYPE_MULTIBOOT;
          str2 = "Multiboot";
+
+      /* Check to see if the kernel wants a video mode */
+         if ( (flags & MULTIBOOT_VIDEO_MODE) != 0 )
+         {
+               // ... give it to the kernel
+         }
+
          break;
        }
     }


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 10 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group