U-Boot features: Difference between revisions

From Variscite Wiki
No edit summary
Line 1: Line 1:
Following are some of the new features introduced in Variscite U-Boot 2015.04:
= New features introduced in Variscite U-Boot 2015.04: =


== Splash Screen ==
== Splash Screen ==
Line 63: Line 63:
== HDMI auto-detection ==
== HDMI auto-detection ==
If an HDMI screen is connected to the board, it will auto-detect it on boot and use it as its display.<br>
If an HDMI screen is connected to the board, it will auto-detect it on boot and use it as its display.<br>
No need to manually change anything.<br>
No need to manually change anything.<br><br>
(What it actually does is automatically add "<span style="font-family:Consolas;">video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24;</span>" to the end of <span style="font-family:Consolas;">bootargs</span>, if hdmi is detected).
 
What it actually does is use the <span style="font-family:Consolas;">hdmidet</span> command to detect the hdmi and automatically add "<span style="font-family:Consolas;">video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24;</span>" to <span style="font-family:Consolas;">bootargs</span>, accordingly.
<br><br>
<br><br>


Line 74: Line 75:
</pre>
</pre>
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.<br><br>
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.<br><br>
Note: USB port 1 on VAR-MX6CustomBoard is always Host.
Note: USB port 1 on VAR-MX6CustomBoard is always Host.<br><br>
<br><br>


== Choosing Root File System location when booting from NAND ==
== Choosing Root File System location when booting from NAND ==
Line 82: Line 82:
=> setenv chosen_rootfs emmc
=> setenv chosen_rootfs emmc
</pre>
</pre>
Otherwise, it will try to mount the rootfs from NAND.<br>
Otherwise, it will try to mount the rootfs from NAND.<br><br>
(What it actually does is choose between running "<span style="font-family:Consolas;">run bootargs_ubifs</span>" or "<span style="font-family:Consolas;">run bootargs_emmc</span>" which sets <span style="font-family:Consolas;">bootargs</span> accordingly)<br><br>
 
What it actually does is choose between running "<span style="font-family:Consolas;">run bootargs_ubifs</span>" or "<span style="font-family:Consolas;">run bootargs_emmc</span>" which sets <span style="font-family:Consolas;">bootargs</span> accordingly:<br>
 
<span style="font-family:Consolas;">
bootargs_ubifs=setenv bootargs console=${console},${baudrate} ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs; run videoargs<br>
bootargs_emmc=setenv bootargs console=${console},${baudrate} root=/dev/mmcblk1p1 rootwait rw; run videoargs
</span><br><br>
 
Note: If you use our NAND/eMMC recovery SD card ver. 50 and above to flash Yocto, the chosen rootfs will be updated automatically to the location that you install the rootfs to - no need to manually change the environment.<br><br>
Note: If you use our NAND/eMMC recovery SD card ver. 50 and above to flash Yocto, the chosen rootfs will be updated automatically to the location that you install the rootfs to - no need to manually change the environment.<br><br>


Line 89: Line 96:
* U-Boot now supports both SD card and eMMC at the same time, also on DART-MX6 SOMs, regardless of where you boot from.<br>
* U-Boot now supports both SD card and eMMC at the same time, also on DART-MX6 SOMs, regardless of where you boot from.<br>
:On DART-MX6 SOMs, the device you boot from is always mmc 0, and the other is mmc 1.
:On DART-MX6 SOMs, the device you boot from is always mmc 0, and the other is mmc 1.
* U-Boot now supports USB also on DART-MX6 SOMs.
* U-Boot now supports USB also on DART-MX6 SOMs.<br><br>
 
= Other Variscite U-Boot features =
 
== Automatic Device Tree selection ==
[[VAR-SOM-MX6_Yocto_Fido_R3_Build_Yocto_release#Automatic_Device_Tree_selection_in_U-Boot|Automatic Device Tree selection]]<br><br>
 
= General U-Boot commands =
 
== List all supported commands and their description/usage (help command) ==
To list all supported commands with a brief description for each one:
<pre>
=> help
</pre>
To print the description and usage of a specific command:
<pre>
=> help <command-name>
</pre><br>
 
== Environment handling commands ==
printenv...<br>
setenv...<br>
env default -a...<br>
 
== FAT and ext file systems commands ==
List files in a directory on a FAT/ext partition (fatls & ext4ls commands)...<br>
Load binary file from a FAT/ext partition to RAM (fatload & ext4load)...<br>
...<br>
== UBI file system commands ==
...<br>
== USB sub-system ==
...<br>

Revision as of 19:39, 21 March 2016

New features introduced in Variscite U-Boot 2015.04:

Splash Screen

A splash screen is enabled by default, and is shown on the LVDS LCD.
To disable the splash screen, stop the boot at u-boot command prompt and enter:

=> run disable_splash
=> saveenv

And to re-enable it:

=> run enable_splash
=> saveenv

The splash image is taken from /boot/splash.bmp in the root file system.

Note: It will take the splash image from whichever rootfs that is going to be mounted later at boot.

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, repartition it or do anything really!
This is especially useful for updating the internal eMMC.

To do this you need to connect a USB cable between the OTG/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:

ums <USB_controller> [<devtype>] <devnum>  e.g. ums 0 mmc 0
    devtype defaults to mmc

devtype can be any block device (e.g. mmc, usb)

To mount the eMMC (most useful):

On any SOM other than DART-MX6, or on a DART-MX6 SOM when booting from SD card:

=> ums 0 mmc 1

On a DART-MX6 SOM when booting from eMMC:

=> ums 0 mmc 0

To mount an SD card:

On any SOM other than DART-MX6, or on a DART-MX6 SOM when booting from SD card:

=> ums 0 mmc 0

On a DART-MX6 SOM when booting from eMMC:

=> ums 0 mmc 1

To mount a USB device connected to the USB Host port (least useful):

=> usb start
=> ums 0 usb 0

Once you've done that, it's just as if you've connected a regular USB Mass Storage device to your host PC.
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.

HDMI auto-detection

If an HDMI screen is connected to the board, it will auto-detect it on boot and use it as its display.
No need to manually change anything.

What it actually does is use the hdmidet command to detect the hdmi and automatically add "video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24;" to bootargs, accordingly.

USB mode on VAR-MX6CustomBoard

USB port 0 on VAR-MX6CustomBoard is not a fully native OTG - it supports either Client or Host mode.
When using it in U-Boot, it is set to Client mode by default and you can change it to Host mode by setting the following environment variable:

=> setenv usbmode host

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: USB port 1 on VAR-MX6CustomBoard is always Host.

Choosing Root File System location when booting from NAND

If you're using a SOM with both NAND flash and eMMC, and you want to manually set the rootfs location to eMMC when booting from NAND, set the following environment variable:

=> setenv chosen_rootfs emmc

Otherwise, it will try to mount the rootfs from NAND.

What it actually does is choose between running "run bootargs_ubifs" or "run bootargs_emmc" which sets bootargs accordingly:

bootargs_ubifs=setenv bootargs console=${console},${baudrate} ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs; run videoargs
bootargs_emmc=setenv bootargs console=${console},${baudrate} root=/dev/mmcblk1p1 rootwait rw; run videoargs


Note: If you use our NAND/eMMC recovery SD card ver. 50 and above to flash Yocto, the chosen rootfs will be updated automatically to the location that you install the rootfs to - no need to manually change the environment.

DART-MX6 features previously missing

  • U-Boot now supports both SD card and eMMC at the same time, also on DART-MX6 SOMs, regardless of where you boot from.
On DART-MX6 SOMs, the device you boot from is always mmc 0, and the other is mmc 1.
  • U-Boot now supports USB also on DART-MX6 SOMs.

Other Variscite U-Boot features

Automatic Device Tree selection

Automatic Device Tree selection

General U-Boot commands

List all supported commands and their description/usage (help command)

To list all supported commands with a brief description for each one:

=> help

To print the description and usage of a specific command:

=> help <command-name>


Environment handling commands

printenv...
setenv...
env default -a...

FAT and ext file systems commands

List files in a directory on a FAT/ext partition (fatls & ext4ls commands)...
Load binary file from a FAT/ext partition to RAM (fatload & ext4load)...
...

UBI file system commands

...

USB sub-system

...