Hi, Here's a patch which adds partial support for the VBE part of the multiboot specification:
http://www.djm.co.za/spoon/grub-setvbe.2004-01-02.patch The patch applies to the CVS tree from today (2004-01-02) and it does the following: 1. Adds a new command "setvbe" which switches the graphics card into the requested vesa mode if available. The VBE information is passed to multiboot compliant kernels as per the specification. If it's run from the command line, any key stroke will return to text mode and information is not put into the multiboot structure (seems kind of pointless). If it's called from a menu config/script, then the vesa mode stays and the multiboot information is set correctly. 2. Creates two new shared variables in stage2/common.c for the vbe_controller struct and the vbe_mode information structure. I saw that the mbi structure was created there and it seemed the safest place to put them because the memory is allocated at compilation and never re-allocated (so it's safe?). 3. Adds some documentation for the "setvbe" command into docs/grub.texi --- Here are some reasons why I've done this and why I think it's useful: For the last few months, I've been using a modified grub version to switch into vesa modes as part as my os development hobby. Since getting this kind of functionality required some coding and modification of grub, I'm pretty sure I'm part of a small handful of people which are actually using grub this way. I was compiling my kernel with the height, width, depth, etc, request built into the multiboot headear and grub was passing a pointer to the LFB back to the kernel when it booted. It was a crude and dirty hack, by the way. I've realised that I've only been interested in a few things: did the kernel get a vesa mode? what are it's dimensions and depth? where is the lfb? The rest is irrelevant for me because the kernel is hard coded to request a certain mode and then it should be up to drivers or whatever to change the resolution if the OS ever needs a new display mode. (So that also makes information about where the VESA interface is located useful if you're going to develop a vesa driver). I find this setvbe command useful because it doesn't require a kernel recompile to change the mode, allows me to experiment with different display modes easily and it pretty easy to use. I would also like it if setvbe took preference over the requested mode from the kernel in favour of the user's config. I also think that is a feature that many other os developers will find incredibly useful and it will spur on a sudden increase in the number of small, graphical hobby systems - however bad they might be. Right now "cool graphic modes" and the amount of work required to get them is an obstable to any new developers out there. This would make a lot of lives easier. --- Here are the problems with the patch: 1. If setvbe has been called in a menu configuration and then a later module fails to load, text mode is not restored. If someone can point out where this should happen, I'll be happy to fix it. Right now, setvbe should be called last in a menu configuration. 2. I don't know how to get the vbe_interface_seg/off/len information for the struct multiboot_info structure so I've set those all to 0. If someone can tell me how to get these values, it would be great. Otherwise, I'm totally open to instructions on what to change. If I've totally missed the point, lost the plot or I'm on the wrong page, etc,etc, let me know. If anyone is interested, I would also like to follow this patch up with another one which implements the vesa switching according to the multiboot header in the kernel. The VBE implementation would then be complete if I have understood everything correctly. Best Regards, Durand Miller. _______________________________________________ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub