Home | Projects | Notes > Embedded Linux > Introduction to uEnv.txt File
uEnv.txt file is nothing but a collection of various environment variables which are initialized to a number of U-boot commands that automates the command execution.
Minicom window
help will display all the U-boot commands supported by the current version of U-boot.
Specify the command if you need to see only a specific command: help <command>
xxxxxxxxxx871=> help2? - alias for 'help'3askenv - get environment variables from stdin4base - print or set address offset5bdinfo - print Board Info structure6boot - boot default, i.e., run 'bootcmd'7bootd - boot default, i.e., run 'bootcmd'8bootefi - Boots an EFI payload from memory9bootelf - Boot from an ELF image in memory10bootm - boot application image from memory11bootp - boot image via network using BOOTP/TFTP protocol12bootvx - Boot vxWorks from an ELF image13bootz - boot Linux zImage image from memory14cmp - memory compare15coninfo - print console devices and information16cp - memory copy17crc32 - checksum calculation18dfu - Device Firmware Upgrade19dhcp - boot image via network using DHCP/TFTP protocol20dm - Driver model low level access21echo - echo args to console22editenv - edit environment variable23eeprom - EEPROM sub-system24env - environment handling commands25exit - exit script26ext2load- load binary file from a Ext2 filesystem27ext2ls - list files in a directory (default /)28ext4load- load binary file from a Ext4 filesystem29ext4ls - list files in a directory (default /)30ext4size- determine a file's size31ext4write- create a file in the root directory32false - do nothing, unsuccessfully33fastboot- use USB Fastboot protocol34fatinfo - print information about filesystem35fatload - load binary file from a dos filesystem36fatls - list files in a directory (default /)37fatsize - determine a file's size38fatwrite- write file into a dos filesystem39fdt - flattened device tree utility commands40fstype - Look up a filesystem type41go - start application at address 'addr'42gpio - query and control gpio pins43gpt - GUID Partition Table44help - print command description/usage45i2c - I2C sub-system46iminfo - print header information for application image47imxtract- extract a part of a multi-image48itest - return true/false on integer compare49load - load binary file from a filesystem50loadb - load binary file over serial line (kermit mode)51loads - load S-Record file over serial line52loadx - load binary file over serial line (xmodem mode)53loady - load binary file over serial line (ymodem mode)54loop - infinite loop on address range55ls - list files in a directory (default /)56md - memory display57mdio - MDIO utility commands58mii - MII utility commands59mm - memory modify (auto-incrementing address)60mmc - MMC sub system61mmcinfo - display MMC info62mw - memory write (fill)63nfs - boot image via network using NFS protocol64nm - memory modify (constant address)65part - disk partition related commands66ping - send ICMP ECHO_REQUEST to network host67printenv- print environment variables68pxe - commands to get and boot from pxe files69reset - Perform RESET of the CPU70run - run commands in an environment variable71save - save file to a filesystem72setenv - set environment variables73sf - SPI flash sub-system74showvar - print local hushshell variables75size - determine a file's size76sleep - delay execution for some time77source - run script from memory78spl - SPL configuration79sspi - SPI utility command80sysboot - command to get and boot from syslinux files81test - minimal test like /bin/sh82tftpboot- boot image via network using TFTP protocol83true - do nothing, successfully84ums - Use the UMS [USB Mass Storage]85usb - USB sub-system86usbboot - boot from USB device87version - print monitor, compiler and linker versionSimilar to Linux environment variables, U-boot also has a set of standard as well as user defined environmental variables which determine the behavior of the U-boot. This behavior can be altered by overriding or changing the environmental variable values.
Use printenv to display all environment variables.
xxxxxxxxxx21=> printenv soc2soc=am33xxUse setenv to set the value of a specified environment. (Creates on if the environment variable is not present.)
xxxxxxxxxx31=> setenv serverip 192.168.27.12=> printenv serverip3serverip=192.168.27.1You can also combine multiple U-boot commands delimited by ; in one envinronment variable. (They all will run in one go!)
xxxxxxxxxx21=> printenv bootcmd2bootcmd=if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run init_console; run envboot; run disdUse run to run a command.
Create a user-defined environment variable.
xxxxxxxxxx61=> setenv my_mmc_list 'mmc list'2=> printenv my_mmc_list 3my_mmc_list=mmc list4=> run my_mmc_list 5OMAP SD/MMC: 06OMAP SD/MMC: 1
mmc listis a predefined U-boot command.MMC0 is the interface to
SD card. MMC1 is the interface to eMMC.
Nayak, K. (2022). Embedded Linux Step by Step Using Beaglebone Black [Video file]. Retrieved from https://www.udemy.com/course/embedded-linux-step-by-step-using-beaglebone/