Booting splash screen

Started by herter, April 11, 2014, 12:29:58 PM

Previous topic - Next topic

herter

Hello,

I'm developping a system driven by the A20-OLinuXino with a 4GB Sd Card and a Debian-LXDE Linux.
The system take approximately 30 seconds to boot, and keep the screen black all this time.

To make this system more user-friendly, I want to display a splash screen during the boot.

I tried the following procedure :
- Download the u-boot sources, and modify the file corresponding with my board to add #define CONFIG_SPLASH_SCREEN. Then, recompile the u-boot and re-write it on the SD card.
   -> For this step, I followed the instructions about compiling and writing U-boot here http://olimex.wordpress.com/2013/09/18/7795/

- In the u-boot terminal :
     - fatload mmc 0 10000000 splashimg.bmp
     - cp.b 10000000 41F80000 ${filesize}
     - setenv splashimage 41F80000
     - saveenv
     - boot

But that doesn't works. The system boots, so I suppose I properly compiled and written the u-boot. But there is no boot splash, the screen stay black until the desktop is displayed.

How can I display a splash sreen during boot ?

Thanks.

isidoro

Hi,
you must be logged via uart at the  very start and just use the commands below:> help bmp
bmp info <imageAddr>            - display image info
bmp display <imageAddr> [x y]   - display image at x,y


http://www.denx.de/wiki/DULG/UBootBitmapSupport


herter

Hello,

I already tried this, because I already tried this tutorial, and others, but I can't because in my bootloader, the bmp commands disabled and return 'unknown command'.

I tried to enable them when I compiled u-boot, adding the  line
     #define CONFIG_CMD_BMP
in the file corresponding to my board, but that can't compile.

herter

Sorry for double-post, I give you an update :

Well, I compile U-boot for an a20-OLinuXino, form the u-boot directory, I edit the file include/configs/sunxi-commins.h

In this file, I add the lines :

    define CONFIG_SPLASH_SCREEN
    define CONFIG_SPLASH_SCREEN_ALIGN


To compile, I use commands :

$ make distclean
$ make A20_OLiunXino_MICRO_config
$ make CROSS_COMPILE=arm-cortexa7_neonvfpv4-linux-gnueabihf-


And that works, but is not enouth to display a boot splash, becouase the BMP command is not available in that bootloader.

So, in the same file, I add the line :

    define CONFIG_CMD_BMP

and recompile.

But that no compile, and I have and error message : "Requires CONFIG_LCD or CONFIG_VIDEO"

So, beofre this line, I add the line :

    define CONFIG_LCD


And that not compile, I have some error messages of type : "in function ... : lcd.c: undefined reference to ..."

I have the same if I replace CONFIG_LCD by CONFIG_VIDEO

(NB : each define is a sharp-define, but the sharps are not displayed here).

Someone can help me ?

Alex293

Hi

I'm interested into adding a boot screen too. Did you make it work ?

AzHofi

+1, would be very nice a bootsplash tutorial

dudo

Here is a hint, currently I don't have time to write complete tutorial.
You can use initramfs image (or initrd) to load it with u-boot together with kernel. It is executed before main rootfs (or main distro). In that initrams image (which is, let's say, small filesystem) you can load some image/picture into framebuffer/display and then let main rootfs/distro booting.
I know this isn't howto or tutorial, but it's worth trying. It isn't so simple to implement. I think that some linux distros use this method.

Simpler method whould be to initiate image/picture loading into framebuffer before first script located in /etc/rcS.d/ is executed. That means, write your own script an put it in /etc/rcS.d/ to be alphabetically first.

geenna

Is possible add splash screen on the lcd? I think that the image will be shown after the loading of the module LCD near the end of the boot.
Is true?

dudo

It is possible, but depends on how do you implement splash image loading/showing. If your LCD depends on kernel module, then you can first load that module(s) and afterwards initiate splash image load. It all depends how deep can you configure your linux. In my case, LCD is compiled in kernel, so, after kernel loads, splash can be loaded.

MBR

Quote from: geenna on August 18, 2014, 06:18:57 PM
Is possible add splash screen on the lcd? I think that the image will be shown after the loading of the module LCD near the end of the boot.
Is true?

If your module is A20-LCD* (or A13-LCD*), the module for framebuffer is loades as soon as the udev is started, on the end of the boot, when /etc/rc.local is executed, is just enabled (and backlight turneed on). Look into this file how to do it, you also need the framebuffer, GPIO and PWM working and /sys mounted. If you switch vitrual TTY using openvt or chvt, you can display splash screen on another TTY while the messages are displaed on the first one.

geenna

Thank you.

I think to use a little workaround without recompile the u-boot.

I will redirect the serial output from u-boot to LCD (/dev/ttyS0 to /dev/tty7) and add programs like fbi in the init scripts to display the image on the fb.

If this solution will not work I will recompile (or search for download) u-boot with bmp support.


Alex293

Maybe we can try using the fbi program with the u-boot pre boot used for the hello word.

MBR

To display a picture on framebuffer, you theoreticaly don't need any special program as long as you have a raw image in the same format (correct endianness, size and bits per pixel) as the framebuffer. You can simply write the raw image into framebufer by something like cat rawimage > /dev/fb0 (or zcat rawimage.gz > /dev/fb0, if you want to keep the file size small). The raw image can be made simply by writting the framebuffer with displayed image into file (like cat /dev/fb0 > rawimage).

And if you want to turn the LCD on as early as possible, enable the control GPIO pin in the FEX file by setting port to output (by setting MUX to 0) and setting output level to <1>, see FEX Guide on http://linux-sunxi.org/Fex_Guide how to do it.

geenna

YES.

I wrote a little boot process that check if udev has been created /dev/fb0. After creation of the device I cat one raw Image.

THK

Alex293

@geena : Hi can you share what you've done for this please ?