U-Boot features¶
Introduction¶
This page documents the key features and functionalities supported by U-Boot.
Info
The default environment may change between releases/commits. If you manually upgrade U-Boot, and you have an old environment saved, it is a good idea to reset your environment to the new default (see Environment handling commands).
(There is no need to do that manually if you install U-Boot using our recovery SD card image).
Notable features¶
Splash Screen¶
A splash screen is enabled by default, and is shown on the LVDS LCD. To disable the splash screen, enter the following in the U-Boot command line interface:
And to re-enable it:
The splash image is taken from /boot/splash.bmp in the root file system.
Automatic Splash source selection¶
The splash image will be taken from whichever rootfs that is going to be mounted later at boot. To enable the automatic selection (already enabled by default):
To disable the automatic selection:
YOUR_SELECTION should be one of {sd, emmc}
Note:
- In case the rootfs is a UBIFS, mounting it in order to load the splash file will add a few seconds to the boot time.
Using your own LCD screen¶
There is support for the 800x480 LCD screen that Variscite uses. If you want to add support for a different LCD that is not currently supported, you need to edit the displays[] array in board/variscite/mx6ul_var_dart/mx6ul_var_dart.c in the U-Boot source code, according to your LCD parameters.
USB ports¶
On the VAR-6ULCustomBoard the micro-USB port is not a fully native OTG - it supports either Client or Host mode (the ID pin is not connected).
In the DART-6UL U-Boot: USB port 1 (lower type-A receptacle) is defined as USB Host. USB port 0 (micro USB receptacle / upper type-A receptacle) is defined as USB Client by default.
To use port 0 as USB Host set the following environment variable:
You can change it back and forth in real time when using this USB port in U-Boot, but pay attention that you are using the USB port correctly, according to the mode you set it to.
Note that the above is only relevant for the VAR-6ULCustomBoard (DART-6UL) and that on the Concerto-Board (VAR-SOM-6UL) the micro-USB port is fully native OTG (the ID pin is connected and used).
USB Mass Storage gadget¶
You can use the board as a USB Mass Storage device: You will be able to access all the partitions of any block device that is on the board or connected to it, from your host PC - You will see them as /dev/sdXX, just like connecting a regular USB storage to your PC, and you'll be able to mount them, and have full read/write access to them. You can even use it to flash a new U-Boot, re-partition the storage, re-format it, etc. This is especially useful for updating the internal eMMC.
To do this you need to connect a USB cable between the USB Client port of the board and a regular USB Host port on your PC, and use U-Boot's ums command.
General ums usage is:
devtype can be any block device (e.g. mmc, usb)
To mount the eMMC:
To mount an SD card:
Depending on your host PC, it may automatically mount it or not. If not, you can use dmesg to see the names of the device and its partitions (it should be in the form of /dev/sdXX) and mount them yourself. To exit the ums command and disconnect the USB device press ctrl+c.
Note: You should use a Linux PC host as Windows can't naturally read ext file systems.
USB Ethernet Gadget¶
The USB Ethernet gadget allows you to make the board act as a USB Ethernet device when connecting its USB Client port to a host PC using a USB cable. Basically, it allows for "Ethernet over USB". This is especially useful if you build a custom board without an Ethernet interface and you want to boot via network using TFTP.
For this, a new Ethernet interface called usb_ether was added to U-Boot.
General U-Boot commands¶
List all supported commands and their description/usage (help command)¶
List all supported commands with a brief description for each one:
Print the description and usage of 'command':
Environment handling commands¶
Print the values of all environment variables:
Print value of environment variable 'name':
Set environment variable 'name' to 'value ...':
Delete environment variable 'name':
Reset default environment:
Save environment variables to persistent storage:
File System access¶
List files in a directory (default /):
For example:
List files in directory /opt/images/Debian in the rootfs partition of our eMMC Recovery SD card (after booting from it):
ls mmc 0:2 /opt/images/Debian
Load binary file 'filename' from a partition to RAM address 'addr':
For example:
Load /boot/splash.bmp from the rootfs partition of our eMMC Recovery SD card (after booting from it) to RAM address 0x83100000:
load mmc 0:2 0x83100000 /boot/splash.bmp
USB sub-system¶
To use the USB as host (connect a USB Storage or Ethernet Device to the board), you need to use the usb command. Usage:
usb start - start (scan) USB controller
usb reset - reset (rescan) USB controller
usb stop [f] - stop USB [f]=force stop
usb tree - show USB device tree
usb info [dev] - show available USB devices
usb test [dev] [port] [mode] - set USB 2.0 test mode
(specify port 0 to indicate the device's upstream port)
Available modes: J, K, S[E0_NAK], P[acket], F[orce_Enable]
usb storage - show details of USB storage devices
usb dev [dev] - show or set current USB storage device
usb part [dev] - print partition table of one or all USB storage devices
usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
to memory address `addr'
usb write addr blk# cnt - write `cnt' blocks starting at block `blk#'
from memory address `addr'
First, connect your device to a USB port on the board. After the device is connected, start the USB controller:
If you connect/disconnect devices after that, before you can access them you need to rescan the USB controller:
Using a USB Storage Device¶
Once you connected the device and stated the USB controller, you can now use the regular File System commands mentioned above with it.
The