Difference between revisions of "DESK-MX6-L/Deployment/Customizing the splash screen"

From DAVE Developer's Wiki
Jump to: navigation, search
(Minor update for DESK MX6 4.0.0 rel)
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History
 
! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History
 
|-  
 
|-  
 +
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |ID#
 
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Issue Date
 
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Issue Date
 
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Notes
 
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Notes
 
|-
 
|-
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |{{oldid|14113|2021/07/16}}
+
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |{{oldid|14113|14113}}
 +
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |16/07/2021
 
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |First DESK release
 
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |First DESK release
 
|-
 
|-
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |{{oldid|16992|2022/03/04}}
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |{{oldid|16992|16992}}
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MX6-L 3.0.0 release
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |04/03/2022
 +
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK 3.0.0 release
 
|-
 
|-
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |2023/04/11
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK-MX6-L 4.0.0 release
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |TBD/04/2023
 +
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK 4.0.0 release
 
|-
 
|-
 
|}
 
|}
Line 28: Line 32:
 
* [http://www.denx.de/wiki/DULG/UBootBitmapSupport U-Boot Bitmap Support]
 
* [http://www.denx.de/wiki/DULG/UBootBitmapSupport U-Boot Bitmap Support]
  
=== Environment variables===
+
=== Instructions ===
  
The following environment variables are used by U-Boot for loading a BMP image from the selected storage and displayed in the screen (read from framebuffer memory):
+
The following U-Boot environment variables are required:
  
* <code>splashimage</code>: RAM address where the BMP image is loaded. Please note that it must be a 32-bit aligned address with a 0x2 offset (eg: 0x20000002)
+
* splashimage: RAM address where the BMP image is loaded. Please note that it must be a 32-bit aligned address with a 0x2 offset (eg: 0x20000002)
* <code>splashpos</code>: image position (eg: splashpos=m,m, for centering the image)
+
* loadsplash: comand for loading the BMP image from the storage device (e.g flash memory) to RAM. This command is automatically run by U-Boot at startup
* <code>splashsize</code>: image size in bytes (default value 0x400000)
+
* splashpos: image position (eg: splashpos=m,m, for centering the image)
 +
Please note that loadsplash command will differ depends on used storage device.
  
The following environment variables are used for reading the splash image from the network:
+
==== Splash image in NOR SPI flash ====
* <code>splashfile</code>: the splash image filename (default value is <code>splash_image.bmp</code>) to be read from the network
 
* <code>loadsplashfile</code> loads the splash file from ''tftp'' in order to store the image in the internal storage device
 
  
Then, the following command is used for reading the image from the used storage device:
+
===== U-Boot variables =====
* <code>loadsplash</code>: command for loading the BMP image from the storage device (e.g flash memory) to RAM. This command is automatically run by U-Boot when it executes <code>bootcmd</code>
 
 
 
=== Splash image in NOR SPI flash ===
 
 
 
The following command is used to store in NOR SPI flash a BMP image loaded via tftp:
 
  
 
<pre>
 
<pre>
 +
loadsplash=run spi_loadsplash
 +
spi_loadsplash=sf probe; sf read ${splashimage} 0xA00000 ${splashsize}
 +
splashfile=splash_image.bmp
 +
splashimage=0x20000002
 +
splashpos=m,m
 +
splashsize=0x400000
 +
loadsplashfile=tftpboot ${loadaddr} axel/${splashfile}
 
spi_updatesplash=sf probe; sf erase 0xA00000 +${filesize}; sf write ${loadaddr} 0xA00000 ${filesize}
 
spi_updatesplash=sf probe; sf erase 0xA00000 +${filesize}; sf write ${loadaddr} 0xA00000 ${filesize}
 
</pre>
 
</pre>
  
so, it is possibile to read a splash image from ''tftp'' and store it in NOR SPI:
+
===== Commands =====
 +
 
 +
The following commands are used to store in NOR SPI flash a BMP image loaded via tftp:
  
 
<pre>
 
<pre>
Line 58: Line 65:
 
</pre>
 
</pre>
  
=== Splash image in NAND flash ===
+
==== Splash image in NAND flash ====
  
The following command is used to store in NAND flash a BMP image loaded via tftp (please note that the NAND mtd partition for the splash image ('''nand-splash''') is defined using the <code>mtdparts</code> parameter, and then referenced by the nand {erase,read,write} commands):
+
===== U-Boot variables =====
  
 
<pre>
 
<pre>
 +
mtdparts=mtdparts=gpmi-nand:2M(nand-SPL),6M(nand-uboot),1M(nand-env1),1M(nand-env2),1M(nand-fdt),1M(nand-spare),8M(nand-kernel),4M(nand-splash),-(nand-ubi)
 +
loadsplash=run nand_loadsplash
 +
nand_loadsplash=nand read ${splashimage} nand-splash ${splashsize}
 +
splashfile=splash_image.bmp
 +
splashimage=0x20000002
 +
splashpos=m,m
 +
splashsize=0x400000
 +
loadsplashfile=tftpboot ${loadaddr} axel/${splashfile}
 
nand_updatesplash=nand erase.part nand-splash; nand write ${loadaddr} nand-splash ${filesize}
 
nand_updatesplash=nand erase.part nand-splash; nand write ${loadaddr} nand-splash ${filesize}
 
</pre>
 
</pre>
  
so, it is possibile to read a splash image from ''tftp'' and store it in NAND:
+
Please note that the NAND mtd partition for the splash image ('''nand-splash''') is defined using the <code>mtdparts</code> parameter, and then referenced by the nand {erase,read,write} commands.
 +
 
 +
===== Commands =====
 +
 
 +
The following commands are used to store in NAND flash a BMP image loaded via tftp:
  
 
<pre>
 
<pre>
Line 73: Line 92:
 
</pre>
 
</pre>
  
=== Splash image in SD/eMMC ===
+
==== Splash image in SD/eMMC ====
  
 
If an SD card or a eMMC device is used as boot device, the splashscreen image is directly loaded from the storage device.
 
If an SD card or a eMMC device is used as boot device, the splashscreen image is directly loaded from the storage device.
 +
 +
===== U-Boot variables =====
  
 
In this example, the first partition - FAT format - is used directly reading the ''${splashimage}'' BMP file.
 
In this example, the first partition - FAT format - is used directly reading the ''${splashimage}'' BMP file.
  
 
<pre>
 
<pre>
 +
loadsplash=run mmc_loadsplash
 +
splashfile=splash_image.bmp
 +
splashimage=0x20000002
 
mmc_loadsplash=fatload mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}
 
mmc_loadsplash=fatload mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}
</pre>
 
 
so, it is possibile to read directly a splash image from the eMMC partition:
 
 
<pre>
 
loadsplash=run mmc_loadsplash
 
 
</pre>
 
</pre>
  

Revision as of 05:48, 4 April 2023

History
ID# Issue Date Notes

14113

16/07/2021 First DESK release

16992

04/03/2022 DESK 3.0.0 release
TBD/04/2023 DESK 4.0.0 release


Customizing the splash screen[edit | edit source]

Resources[edit | edit source]

For further details on splash screen support in U-Boot, please refer to:

Instructions[edit | edit source]

The following U-Boot environment variables are required:

  • splashimage: RAM address where the BMP image is loaded. Please note that it must be a 32-bit aligned address with a 0x2 offset (eg: 0x20000002)
  • loadsplash: comand for loading the BMP image from the storage device (e.g flash memory) to RAM. This command is automatically run by U-Boot at startup
  • splashpos: image position (eg: splashpos=m,m, for centering the image)

Please note that loadsplash command will differ depends on used storage device.

Splash image in NOR SPI flash[edit | edit source]

U-Boot variables[edit | edit source]
loadsplash=run spi_loadsplash
spi_loadsplash=sf probe; sf read ${splashimage} 0xA00000 ${splashsize}
splashfile=splash_image.bmp
splashimage=0x20000002
splashpos=m,m
splashsize=0x400000
loadsplashfile=tftpboot ${loadaddr} axel/${splashfile}
spi_updatesplash=sf probe; sf erase 0xA00000 +${filesize}; sf write ${loadaddr} 0xA00000 ${filesize}
Commands[edit | edit source]

The following commands are used to store in NOR SPI flash a BMP image loaded via tftp:

run loadsplashfile
run spi_updatesplash

Splash image in NAND flash[edit | edit source]

U-Boot variables[edit | edit source]
mtdparts=mtdparts=gpmi-nand:2M(nand-SPL),6M(nand-uboot),1M(nand-env1),1M(nand-env2),1M(nand-fdt),1M(nand-spare),8M(nand-kernel),4M(nand-splash),-(nand-ubi)
loadsplash=run nand_loadsplash
nand_loadsplash=nand read ${splashimage} nand-splash ${splashsize}
splashfile=splash_image.bmp
splashimage=0x20000002
splashpos=m,m
splashsize=0x400000
loadsplashfile=tftpboot ${loadaddr} axel/${splashfile}
nand_updatesplash=nand erase.part nand-splash; nand write ${loadaddr} nand-splash ${filesize}

Please note that the NAND mtd partition for the splash image (nand-splash) is defined using the mtdparts parameter, and then referenced by the nand {erase,read,write} commands.

Commands[edit | edit source]

The following commands are used to store in NAND flash a BMP image loaded via tftp:

run loadsplashfile
run nand_updatesplash

Splash image in SD/eMMC[edit | edit source]

If an SD card or a eMMC device is used as boot device, the splashscreen image is directly loaded from the storage device.

U-Boot variables[edit | edit source]

In this example, the first partition - FAT format - is used directly reading the ${splashimage} BMP file.

loadsplash=run mmc_loadsplash
splashfile=splash_image.bmp
splashimage=0x20000002
mmc_loadsplash=fatload mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}