[U-Boot] interaction between CONFIG_CMD_SAVEENV and CONFIG_BOOTCOMMAND

Nicolas le bayon nlebayon at gmail.com
Wed Sep 14 16:46:39 CEST 2016


Hi

Let me firstly explain my need. We use U-boot as a primary bootloader, with
a bootcmd which loads and executes a script on one external device (SD ou
USB). This script will continue the boot process (launch a kernel for
example). The corresponding bootcmd defined in CONFIG_BOOTCOMMAND does this
load/execute operation.

Of course, the user will be able to modify the content of the script, to
fit with their needs. But on our side, provider of this primary bootloader,
we want to be sure that the environment of this u-boot won't be changed by
the user, so that we want to disable all access to "saveenv" command.

That's why we configure: #undef CONFIG_CMD_SAVEENV

With this modifications, saveenv command is not available in the u-boot
commands, that's nice. But bootcmd is empty. It's like there was an
interaction between both settings, maybe the saveenv primitive is necessary
one time to construct the environment content.

How could we do to have a well-constructed and not updatable env content?

Thanls in advance for your answers
Best Regards
Nicolas


More information about the U-Boot mailing list