Difference between revisions of "Transclusion: CL-SOM-iMX7: U-Boot: Display and console"
Line 6: | Line 6: | ||
<blockquote><pre> | <blockquote><pre> | ||
CL-SOM-iMX7 # dhcp | CL-SOM-iMX7 # dhcp | ||
− | </pre | + | </pre> |
− | : | + | : {{Note|Use the following alternative for setting static IP address |
− | + | <pre> | |
CL-SOM-iMX7 # setenv ipaddr <ip address> | CL-SOM-iMX7 # setenv ipaddr <ip address> | ||
− | </pre></blockquote> | + | </pre> |
+ | }}</blockquote> | ||
: Set the TFTP server IP address: | : Set the TFTP server IP address: | ||
<blockquote><pre> | <blockquote><pre> |
Latest revision as of 11:10, 27 May 2018
Contents
Reading the splash image into memory
Splash image can be read into memory from a variety of sources:
- Network download:
- Set dynamic IP address:
CL-SOM-iMX7 # dhcp
![]()
Use the following alternative for setting static IP address CL-SOM-iMX7 # setenv ipaddr <ip address>
- Set the TFTP server IP address:
CL-SOM-iMX7 # setenv serverip <server ip>
- Download the image into the memory:
CL-SOM-iMX7 # tftp 80800000 <bmp file name>
- MMC/SD card:
CL-SOM-iMX7 # mmc dev 0; mmc rescan; fatls mmc 0 CL-SOM-iMX7 # load mmc 0 80800000 <bmp file name>
- USB storage:
CL-SOM-iMX7 # usb reset; fatls usb <device number> CL-SOM-iMX7 # load usb <device number> 80800000 <bmp file name>
Testing the splash image
After reading the splash image into memory, the integrity of the splash image can be validated by displaying it using the bmp command:
CL-SOM-iMX7 # bmp display 80800000
This check also verifies that the splash image can be handled at the address it was read to (80800000 in our example). If the image is displayed correctly, the memory address can be safely used as the value of splashimage (see Setting up the environment).
Flashing the splash image into the SPI flash
The maximum splash image size that can be stored in the SPI flash is 1MB.
- Detect SPI flash:
CL-SOM-iMX7 # sf probe
- Erase the SPI flash at offset 0x100000:
CL-SOM-iMX7 # sf erase 100000 100000
- Write the in-memory splash screen image into the SPI flash:
CL-SOM-iMX7 # sf write 80800000 100000 100000
Now the splash screen is in the SPI flash.
Storing the splash image in filesystem formatted storage
The splash image can be stored in a USB, or SD card storage as a file called splash.bmp. The storage can be formatted with either FAT, EXT2 or EXT4 file system.
Setting up the environment
splashsource
Set the splashsource variable to one of the supported storage devices for splash image (optional). For example, the following selects SPI flash as the storage device:
CL-SOM-iMX7 # setenv splashsource sf
If splashsource is not defined, U-Boot will default to loading splash screen from SPI flash.
The supported values for splashsource are
- For raw data on SPI flash: sf.
- For file system file: mmc_fs, usb_fs.
If file system source was selected, set the splash image file name:
CL-SOM-iMX7 # setenv splashfile <bmp file name>
splashimage
Set the splashimage variable to the address where you wish U-Boot to load the splash image from the storage. For example:
CL-SOM-iMX7 # setenv splashimage 80800000
splashpos
It is possible to adjust the position of the splash screen on the display by setting the splashpos variable.
To set logo position to x pixels and y lines:
CL-SOM-iMX7 # setenv splashpos <x>,<y>
Use the following configuration to set splash screen position to the center of the screen:
CL-SOM-iMX7 # setenv splashpos m,m
Saving the splash parameters
Save environment and reset the module to apply the configuration:
CL-SOM-iMX7 # saveenv CL-SOM-iMX7 # reset