Difference between revisions of "U-Boot Splash Screen"
From ArmadeusWiki
(→Continuity with Linux Boot Logo) |
SebastienSz (Talk | contribs) (→Installation) |
||
Line 4: | Line 4: | ||
=Installation= | =Installation= | ||
− | * Save your image as BMP file (in Gimp use Run-Length (RLE) encoding, no alpha channel and no color informations (compatibility options)) | + | * Save your image as BMP file (in Gimp use Run-Length (RLE) encoding, no alpha channel and no color informations (compatibility options). If the RLE option is grayed out, go to Image > Mode and select Indexed...) |
* Activate LCD in U-Boot (here ST0700): | * Activate LCD in U-Boot (here ST0700): | ||
<pre class="apf"> | <pre class="apf"> |
Latest revision as of 08:15, 15 March 2018
Contents
Introduction
On this page you will learn how to activate LCD support in U-Boot and display a Splash Screen at boot.
Note: The following instructions have only be tested on OPOS6UL. |
Installation
- Save your image as BMP file (in Gimp use Run-Length (RLE) encoding, no alpha channel and no color informations (compatibility options). If the RLE option is grayed out, go to Image > Mode and select Indexed...)
- Activate LCD in U-Boot (here ST0700):
BIOS> setenv videomode video=ctfb:x:800,y:480,depth:18,pclk:33033,le:8,ri:4,up:2,lo:4,hs:64,vs:4,sync:0,vmode:0
Test it
BIOS> tftpboot ${loadaddr} xxx.bmp BIOS> bmp info ${loadaddr} Image size : 296 x 72 Bits per pixel: 8 Compression : 0
BIOS> bmp display ${loadaddr} 100 50
Deploy it
- Here we assume that logo is stored in /boot directory of rootfs eMMC partition as logo.bmp:
BIOS> setenv splashimage 0x80000000 BIOS> setenv splashfile /boot/logo.bmp BIOS> setenv splashsource mmc_fs
Continuity with Linux Boot Logo
- If you want Linux to keep your U-Boot Logo during boot process, then some tweaks are needed:
- define CONFIG_SYS_MEM_TOP_HIDE in U-Boot configuration file, here we reserve 2MBytes:
#define CONFIG_SYS_MEM_TOP_HIDE (2 << 20)
- define CONFIG_SYS_MEM_TOP_HIDE in U-Boot configuration file, here we reserve 2MBytes:
- Force framebuffer RAM address in U-Boot LCD driver (OPOS6UL has 256MBytes (0x10000000) RAM starting at physical 0x80000000):
@@ -197,8 +197,8 @@ panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP; /* Allocate framebuffer */ - fb = memalign(ARCH_DMA_MINALIGN, - roundup(panel.memSize, ARCH_DMA_MINALIGN)); + fb = (void *)0x8fe00000; /*memalign(ARCH_DMA_MINALIGN, + roundup(panel.memSize, ARCH_DMA_MINALIGN));*/ if (!fb) { printf("MXSFB: Error allocating framebuffer!\n"); return NULL;
- Tell Linux to not print cursor on Framebuffer and to not use last 2M of RAM:
BIOS> setenv extrabootargs vt.global_cursor_default=0 mem=248M
- Force framebuffer RAM address to same value in Linux LCD driver:
@@ -825,17 +824,18 @@ var->vmode = FB_VMODE_NONINTERLACED; /* Memory allocation for framebuffer */ +#define FORCED_FB_ADDR 0x8fe00000 fb_size = SZ_2M; - fb_virt = dma_alloc_wc(dev, PAGE_ALIGN(fb_size), &fb_phys, GFP_KERNEL); + fb_virt = ioremap_wc(FORCED_FB_ADDR, fb_size); if (!fb_virt) return -ENOMEM; + fb_phys = FORCED_FB_ADDR; fb_info->fix.smem_start = fb_phys; fb_info->screen_base = fb_virt; fb_info->screen_size = fb_info->fix.smem_len = fb_size; - if (mxsfb_restore_mode(host, vmode)) - memset(fb_virt, 0, fb_size); + mxsfb_restore_mode(host, vmode); return 0; }
- Remove following options of your Linux config file:
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
-CONFIG_FONTS=y
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
- Reflash all that on your board and... That's it ! ;-)