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

From Compulab Mediawiki
Jump to: navigation, search

Display support

CL-SOM-iMX7 U-Boot supports displays that are connected via DVI interface and parallel 24-bit display. Supported resolutions:

  • DVI: 1024x768, 1280X720, 1280x1024, 1920X1080.
  • Parallel display: 800X480

Setting the "displaytype" variable

  • To enable display, set the displaytype environment variable to one of the supported display presets:
# setenv displaytype <preset>
# saveenv
  • The displaytype variable can be assigned one of the following values:
    • dvi1280x720 - 1280X720 DVI.
    • dvi1280x1024 - 1280X1024 DVI.
    • dvi1920x1080 - 1920X1080 DVI.
    • dvi1024x768 or dvi (default) - 1024X768 DVI.
    • lcd_KD050C - KD050C 800X480 LCD.

Console support

CL-SOM-iMX7 U-Boot can send console output to the serial port and DVI/parallel display. CL-SOM-iMX7 U-Boot can accept console input from the serial port and USB keyboard.

Console output: enable/disable dvi/parallel display

  • To enable dvi/parallel display:
CL-SOM-iMX7 # setenv stdout serial,vga
  • To disble dvi/parallel display:
CL-SOM-iMX7 # setenv stdout serial

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 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:
Set dynamic IP address:
CL-SOM-iMX7 # dhcp
Admolition note.png 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

See also