Progress so far:
- tried to build a uboot image for rpi3. Miserably failed. some setting with the compilers seems to be off.
- fortunately, rpi2 build works very well. I can get get the build images.
- confirmed that the vanilla build works well with rpi2. Made some changes in the ‘config.txt’ file in /boot partition of the rpi sd card so that I can access the uboot prompt through UART communication.
- succeeded adding a very simple custom command in uboot.
- wanted to display some picture or whatever with uboot.
The failure with displaying a picture on the display with uboot seems to be a complicated matter. I think there are two problems that I should tackle
- enabling BMP command
From various uboot splashscreen tutorials, most of them utilize a ‘bmp’ command. Apparently, this is the command that will display a bmp image file to the display. However, this command is not included in the default uboot .config option. One must manually add ‘CONFIG_CMD_BMP’ configuration.
Further digging suggested that enabling ‘CONFIG_CMD_BMP’ alone is not enough. In order to this to work properly, one must also turn on other ‘CONFIG_’s as well.
2. raspberry display related address is messed up
One of the replies written in this thread suggests that raspberry pi’s default address configuration is messed up in a way that the display driver will corrupt other critical memory regions whenever it will try to show something up on the display.
Here is what the comment says:
Hi a little (headache) contributed from me:
If you want use the Splash screen of bitmap display in bootmap , there is a bug in the video driver.
The panel_info.cmap is not allocated and have a NULL value. So the cmap is fill at 0x0 and lot’s of essential data like device tree too (at 0x100) is overwritten.
index 7867fe3..6f450b2 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -102,14 +102,16 @@ void lcd_ctrl_init(void *lcdbase)
panel_info.vl_col = w;
panel_info.vl_row = h;
panel_info.vl_bpix = LCD_COLOR16;
-
- gd->fb_base = msg_setup->allocate_buffer.body.resp.fb_address;
+ panel_info.cmap=malloc(256 * NBITS(panel_info.vl_bpix) / 8);
+ gd->fb_base = msg_setup->allocate_buffer.body.resp.fb_address;
+ gd->fb_base &= ~0xc0000000;
}
I haven’t looked deep into this yet.