Hi,
I recently installed Coreboot and SeaBIOS on my Thinkpad X230. After sorting out a little problem with suspend/resume, I am quite happy with it.
Now I would like to add a bootsplash image, but SeaBIOS seems unable to find any vesa modes.
However, HDT (http://www.hdt-project.org) shows several modes, including the native display resolution (1366x768x32) and the resolution of my bootsplash.bmp (1024x768x32).
I am using the proprietary vesa bios blob extracted from the original X230 BIOS and it seems to work fine, except for the bootsplash.
Thanks for any help, Gert
PS: increased log verbosity.
Hi again,
okay, it seems I don't have any 24bpp vesa modes, only 32bpp. But SeaBIOS assumes that BMPs are 24bpp only. This patch makes SeaBIOS support 32bpp BMPs.
Have fun, Gert
On Wed, Mar 15, 2017 at 11:23:05PM +0100, Gert Menke wrote:
Hi again,
okay, it seems I don't have any 24bpp vesa modes, only 32bpp. But SeaBIOS assumes that BMPs are 24bpp only. This patch makes SeaBIOS support 32bpp BMPs.
Thanks.
FYI, patches for seabios should be sent via 'git send-email' or 'git format-patch' and they should contain a signed-off-by line in the description. Also, tabs should be avoided (in favor of spaces). See: https://www.seabios.org/Contributing
diff --git a/src/bmp.c b/src/bmp.c index 96a2b3f..e9bc6a3 100644 --- a/src/bmp.c +++ b/src/bmp.c @@ -56,10 +56,9 @@ typedef struct tagRGBQUAD {
- arrange horizontal pixel data, add extra space in the dest buffer
for every line
*/ -static void raw_data_format_adjust_24bpp(u8 *src, u8 *dest, int width,
int height, int bytes_per_line_dest)
+static void raw_data_format_adjust(u8 *src, u8 *dest, int width,
int height, int bytes_per_line_src, int bytes_per_line_dest)
{
- int bytes_per_line_src = 3 * width; int i; for (i = 0 ; i < height ; i++) { memcpy(dest + i * bytes_per_line_dest,
@@ -95,10 +94,11 @@ int bmp_decode(struct bmp_decdata *bmp, unsigned char *data, int data_size) }
/* get bmp properties */ -void bmp_get_size(struct bmp_decdata *bmp, int *width, int *height) +void bmp_get_info(struct bmp_decdata *bmp, int *width, int *height, int *bpp) { *width = bmp->width; *height = bmp->height;
- *bpp = bmp->bpp;
}
Wouldn't it be better to adjust raw_data_format_adjust() to convert from 24bpp bmps to 32bit mode automatically? Seems annoying to have to store a 32bit bmp in flash. Doing so would also simplify enable_bootsplash() and find_videomode() too.
-Kevin
Hi,
On 2017-03-25 01:26, Kevin O'Connor wrote:
FYI, patches for seabios should be sent via 'git send-email' or 'git format-patch' and they should contain a signed-off-by line in the description. Also, tabs should be avoided (in favor of spaces). See: https://www.seabios.org/Contributing
Thanks, I didn't know that. I will update my patch and send a new version.
Wouldn't it be better to adjust raw_data_format_adjust() to convert from 24bpp bmps to 32bit mode automatically?
Not sure if raw_data_format_adjust() has a way of knowing if it's 24bpp or 32bpp. I'll look into it again.
Seems annoying to have to store a 32bit bmp in flash.
Doesn't make too much of a difference if you use LZMA. (coreboot currently only offers adding an uncompressed BMP in its configuration, but it is easily added by hand with cbfstool and works fine with compression.)
Cheers Gert