~~NOTOC~~
===== U-Boot Tools =====
U-Boot provides two tools to read **fw_printenv** and edit **fw_setenv** the U-Boot environment from the Linux shell. The U-Boot tools are selected by default in PTXdist based BSP's. This tutorial describes how to setup the configuration file and the usage of the tools mentioned above.
Working with U-Boot tools requires that the U-Boot environment has been saved with the ''saveenv'' command in U-Boot, otherwise the U-Boot tools are using the default environment.\\
If a redundant environment is configured the ''saveenv'' command must be executed twice.
==== Customising The Config File ====
The U-Boot Tools need a proper configuration of environment size and memory offset in the /etc/fw_env.config file. \\ In case of a unmanaged memory (e.g. SPI NOR) the block size also has to be configured. The example configurations below refers to the default partitioning of our BSP's.
++++TQMa7x |
===eMMC===
# THIS IS VALID FOR TQMa7 eMMC only!
# eMMC Block device access
/dev/mmcblk0 0x100000 0x2000
# if using with redundant env
/dev/mmcblk0 0x102000 0x2000
===SD Card===
# THIS IS VALID FOR TQMa7 SD-card only!
# eMMC Block device access
/dev/mmcblk1 0x100000 0x2000
# if using with redundant env
/dev/mmcblk1 0x102000 0x2000
++++
++++TQMa6UL |
===eMMC===
# THIS IS VALID FOR TQMa6UL eMMC only!
# eMMC Block device access
/dev/mmcblk0 0x100000 0x2000
# if using with redundant env
/dev/mmcblk0 0x102000 0x2000
===SD Card===
# THIS IS VALID FOR TQMa6UL SD-card only!
# eMMC Block device access
/dev/mmcblk1 0x100000 0x2000
# if using with redundant env
/dev/mmcblk1 0x102000 0x2000
++++
++++TQMa6x |
===eMMC===
# THIS IS VALID FOR TQMa6x eMMC only!
# eMMC Block device access
/dev/mmcblk0 0x100000 0x2000
# if using with redundant env
/dev/mmcblk0 0x102000 0x2000
===SD Card===
# THIS IS VALID FOR TQMa6x SD-card only!
# eMMC Block device access
/dev/mmcblk1 0x100000 0x2000
# if using with redundant env
/dev/mmcblk1 0x102000 0x2000
++++
++++TQMa28 |
===eMMC===
# THIS IS VALID FOR TQMa28 eMMC only!
# eMMC Block device access
/dev/mmcblk0 0x400 0x1FC00
===SD Card===
# THIS IS VALID FOR TQMa28 SD-card only!
# eMMC Block device access
/dev/mmcblk1 0x400 0x1FC00
++++
++++TQMLS102xA |
===eMMC and SD Card===
# THIS IS VALID FOR TQMLS102xA SD-Card and eMMC!
# eMMC Block device access
/dev/mmcblk0 0x100000 0x8000
# if using with redundant env
/dev/mmcblk0 0x108000 0x8000
===SPI NOR===
# THIS IS VALID FOR TQMLS102xA SPI NOR only!
/dev/mtd1 0x100000 0x8000 0x10000
++++
==== Using U-Boot Tools ====
== Read U-Boot Environment ==
fw_printenv
== Edit U-Boot Environment ==
fw_setenv [parameter] [value]
++++Example |
This sets the value of the bootdelay paramter in your environment to 3
fw_setenv bootdelay 3
++++