Transclusion: CL-SOM-iMX7: U-Boot: Display and console

From Compulab Mediawiki
Revision as of 12:41, 26 October 2017 by Grinberg (talk | contribs) (saving the splash parameters)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Console input: enabling USB keyboard

  • Connect USB keyboard to a USB port.
  • Start USB subsystem to detect the USB keyboard:
CL-SOM-iMX7 # usb reset

Splash screen

U-Boot for CL-SOM-iMX7 supports uncompressed 8-bit BMP splash screen images. An example of such an image can be found in the U-Boot for CL-SOM-iMX7 package (here) under utilities/splash_images folder. The splash screen image can be stored in the CL-SOM-iMX7 SPI flash at offset 0x100000. U-Boot will automatically relocate the splash screen image from its storage into the MX7 display frame buffer.

The following setup is required to enable splash screen display:

Upon completion of the above steps, the splash image will be displayed automatically on boot.

Reading the splash image into memory

Splash image can be read into memory from a variety of sources:

  • Network download:
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