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/ (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.
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
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.
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 ?
Hi
I'm interested into adding a boot screen too. Did you make it work ?
+1, would be very nice a bootsplash tutorial
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.
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?
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.
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.
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.
Maybe we can try using the fbi program with the u-boot pre boot used for the hello word.
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 (http://linux-sunxi.org/Fex_Guide) how to do it.
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
@geena : Hi can you share what you've done for this please ?
I note that newly purchased A20 Debian SD Cards have a splash screen at boot. Does anyone know how Olimex do it. I would like to change or remove this splash screen if possible.
Anyone Know how?
the big problem here is wrong memory address. in my board the command
bdinfo
says the memory mapping starts at 0x4000000
...using this address i can load the bmp succesfully from emmc:
=>load mmc 0 0x4000000 splash.bmp
=> bmp info 0x40000000
Image size : 1280 x 800
Bits per pixel: 8
Compression : 1
anyway whe i try to display the image to the lvds connected lcd nothing is shown :(
=> bmp display 0x40000000
With self-built mainline U-Boot on SD card and 4.3" display it's going like:
git clone git://git.denx.de/u-boot.git u-boot-2017
cd u-boot-2017
git checkout v2017.07
scripts/kconfig/merge_config.sh configs/A20-OLinuXino_MICRO_defconfig
Modify the .config file (CONFIG_VIDEO_LCD_MODE from http://linux-sunxi.org/LCD#Script_for_automated_conversion)
--- .config 2017-10-04 16:47:01.604866748 +0200
+++ .config.lcdActive 2017-10-04 16:46:36.589380334 +0200
@@ -204,10 +204,10 @@
# CONFIG_I2C4_ENABLE is not set
# CONFIG_AXP_GPIO is not set
CONFIG_VIDEO=y
-CONFIG_VIDEO_HDMI=y
-CONFIG_VIDEO_VGA=y
+# CONFIG_VIDEO_HDMI is not set
+# CONFIG_VIDEO_VGA is not set
# CONFIG_VIDEO_COMPOSITE is not set
-CONFIG_VIDEO_LCD_MODE=""
+CONFIG_VIDEO_LCD_MODE="x:480,y:272,depth:18,pclk_khz:9000,le:10,ri:5,up:3,lo:8,hs:30,vs:5,sync:3,vmode:0"
CONFIG_VIDEO_LCD_DCLK_PHASE=1
CONFIG_VIDEO_LCD_POWER=""
CONFIG_VIDEO_LCD_RESET=""
@@ -523,7 +523,7 @@
#
# Misc commands
#
-# CONFIG_CMD_BMP is not set
+CONFIG_CMD_BMP=y
# CONFIG_CMD_BSP is not set
# CONFIG_CMD_BKOPS_ENABLE is not set
# CONFIG_CMD_CACHE is not set
Compile:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
And put it on SD card:
sudo dd if=u-boot-sunxi-with-spl.bin of=${SD} bs=1024 seek=8;
Or test it via OTG/FEL injection:
sudo sunxi-fel uboot u-boot-sunxi-with-spl.bin
In U-Boot do:
$ load mmc 0:1 50000000 /bootlogo.bmp
reading /bootlogo.bmp
391802 bytes read in 51 ms (7.3 MiB/s)
$ bmp info 50000000
Image size : 480 x 272
Bits per pixel: 24
Compression : 0
$ bmp display 50000000
You can add this to boot.cmd, but haven't done that yet.
Edit: This does not work properly yet, linux kernel distorts the logo as soon as it boots
Get Armbian and exchange /boot/boot.bmp and you are done. At least for the bootloader.
Hi, I know that this is an old post, but "groped does not harm".
Trying this command
sudo dd if=u-boot-sunxi-with-spl.bin of=${SD} bs=1024 seek=8;
gives me back:
dd: failed to open '': No such file or directory
So I tried
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
But in U-Boot bmp command are unknow.
Do you knw a possible solution for this or other working sequence of commands to change the splash screen?
You may need SKIP instead of SEEK
John
It doesn't work.
If I use
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 skip=8
reboot
The boards doesen't boot anymore (the green LED reamins off) :(
OK - sorry.
John
A bootsplash can be a simple visualization of the scrolling boot messages in the console, but it can also present graphics or some combinations of both.