The mkenv
is a tool to generate a U-Boot environment binary blob from a text file or extract U-Boot environment
variables from a binary blob. It's implementing similar functionality as mkenvimage
tool natively used in Linux.
For printing a general info of usage this tool execute mkenv -?
.
$ Usage: mkenv [OPTIONS] COMMAND [ARGS]...
The U-Boot Make Enviroment Blob Tool
Options:
-v, --version Show the version and exit.
-?, --help Show this message and exit.
Commands:
create Create new image from attached file
extract Extract image content
info List image content
Print the content of U-Boot environment blob in readable format
- -b, --bigendian - The target is big endian (default is little endian)
- -o, --offset - The offset of input file (default: 0)
- -s, --size - The environment blob size (default: 8192)
- -?, --help - Show help message and exit
$ mkenv info env.bin
Name: None
Redundant: True
Endian: Little
Size: 8192 Bytes
EmptyValue: 0x00
Variables:
- bootdelay = 3
- stdin = serial
- stdout = serial
- stderr = serial
- baudrate = 115200
- console = ttymxc3
...
Extract the content of U-Boot environment blob and save it as readable text file. That way you can extract the U-Boot environment blob from SD card image.
- -b, --bigendian - The target is big endian (default is little endian)
- -o, --offset - The offset of input file (default: 0)
- -s, --size - The environment blob size (default: 8192)
- -?, --help - Show help message and exit
$ mkenv extract env.bin
Successfully extracted: env.txt
Create U-Boot environment blob from input text file and save it as binary file.
- -r, --redundant - The environment has multiple copies in flash (default: False)
- -b, --bigendian - The target is big endian (default is little endian)
- -s, --size - The environment blob size (default: 8192)
- -?, --help - Show help message and exit
$ mkenv create env.txt env.bin
Successfully created: env.bin