Moving into a production phase of the project, I need to make it easy from them to load U-Boot Environment variables. Some like the MAC address change with every system. The rest are unique to our product but the same across all devices. I found that I could write a compiled script to enter these. However, the script crashes on a setenv that contains multiple entries separated by semi-colons since it thinks that is a line ending. The processor is the LS1046A.
I found the mkenvimage command that will compile a text file list of environment variables. However, it requires to know the U-Boot environment size as a compile option. When I print the environment, it lists the size as 8188. Is that the number that I enter? Once I compile this to a binary, then I can read it into RAM, but what command do I use to append it to the environment? I looked by could not find any example on the web of the entire process. My U-Boot is in QSPI flash.
Since I am also recompiling U-Boot, can I just over-ride the defaults and add these parameters to the default settings of U-Boot? I looked but did not find where to do this.
Thanks.
(For anyone wanting to script U-Boot, the mkimage command from flexbuilder lets you do that. I have systems with older versions of U-Boot on demo units that need to be upgraded. I was able to compile these commands to a script with mkimage. Since the script automates the commands, there is much less chance of someone bricking a system by entering an individual command wrong.)
Please write MAC address variables list in variable "CONFIG_EXTRA_ENV_SETTINGS" in include/configs/ls1046a_common.h in u-boot source code, then rebuild u-boot.