CM-FX6: U-Boot: Display and console

From Compulab Mediawiki
Revision as of 13:23, 19 January 2015 by Nikita (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Display support

CM-FX6 U-Boot supports displays that are connected via HDMI interface, and a resolution of 1024x768.

Enable display

  • To enable display, set the displaytype environment variable to one of the supported display presets:
> setenv displaytype <preset>
> saveenv
  • The supported values of displaytype are: HDMI.
  • For backwards compatibility, the displaytype variable can be substituted with the panel variable. If both variables are defined, displaytype takes precedence.

Console support

CM-FX6 U-Boot can send console output to the following devices: serial, HDMI display. CM-FX6 U-Boot can accept console input from the following devices: serial, USB keyboard.

By default, U-Boot only performs console I/O over serial. If display is enabled (see Enable display), only the Compulab logo and the U-Boot header are displayed (no console output). This behavior can be overridden in various ways:

Console input: enabling USB keyboard

  • Connect USB keyboard to a USB port.
  • Start USB subsystem to detect the USB keyboard:
> usb start
  • Add USB keyboard as console input device:
> setenv stdin serial,usbkbd
> saveenv
  • To make U-Boot detect the keyboard automatically at boot, run the following commands:
> setenv preboot "usb start"
> saveenv

Console output: enabling framebuffer console

To output console to the display screen, run the following commands:

> setenv stdout serial,vga
> setenv stderr serial,vga
> saveenv

Enabling framebuffer console will display the console output below the Compulab logo if no splash screen is setup, and will overwrite the splash screen otherwise.

Splash screen

The following setup is required to enable splash screen display:

Splash screen image

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

Flashing the splash screen image into the SPI flash

To write the splash screen image into the SPI flash use the following command sequence:

  • Download the image to the CM-FX6 RAM:
> tftp 10800000 <bmp file name>
  • Or read the image from MMC/SD card:
> mmc dev 2
> mmc rescan
> load mmc 2 10800000 <bmp file name>
  • Detect SPI flash
> sf probe
  • Erase the SPI flash at offset 0x100000:
> sf erase 100000 <bmp size>
  • Write the splash screen image into the SPI flash:
> sf write 10800000 100000 <bmp size>

Now the splash screen is in the SPI flash.

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:
> setenv splashsource sf
> saveenv
  • If splashsource is not defined, U-Boot will default to loading splash screen from SPI flash.
  • The supported values for splashsource are: sf.
splashimage
  • Set the splashimage variable to the address to which you wish U-Boot to load the splash image from its storage. For example:
> setenv splashimage 10800000
> saveenv

See also