summaryrefslogtreecommitdiff
path: root/configs/ls1021aqds_nand_defconfig
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@bootlin.com>2018-07-09 19:16:29 +0200
committerTom Rini <trini@konsulko.com>2018-07-20 15:55:09 -0400
commiteaf734724fd8117045423d126427c8b2f33e40e3 (patch)
treeea7a7ed14b9498b76b10647c6c09093e61f18206 /configs/ls1021aqds_nand_defconfig
parentd9fc9077eb7eb5b793e5cbfb3364f15754fbb562 (diff)
cmd: nvedit: env import can now import only variables passed as parameters
While the `env export` can take as parameters variables to be exported, `env import` does not have such a mechanism of variable selection. Let's add the ability to add parameters at the end of the command for variables to be imported. Every env variable from the env to be imported passed by parameter to this command will override the value of the variable in the current env. If a variable exists in the current env but not in the imported env, if this variable is passed as a parameter to env import, the variable will be unset ONLY if the -d option is passed to env import, otherwise the current value of the variable is kept. If a variable exists in the imported env, the variable in the current env will be set to the value of the one from the imported env. All the remaining variables are left untouched. As the size parameter of env import is positional but optional, let's add the possibility to use the sentinel '-' for when we don't want to give the size parameter (when the env is '\0' terminated) but we pass a list of variables at the end of the command. env import addr env import addr - env import addr size env import addr - foo1 foo2 env import addr size foo1 foo2 are all valid. env import -c addr env import -c addr - env import -c addr - foo1 foo2 are all invalid because they don't pass the size parameter required for checking, while the following are valid. env import addr size env import addr size foo1 foo2 Nothing's changed for the other parameters or the overall behaviour. One of its use case could be to load a secure environment from the signed U-Boot binary and load only a handful of variables from an other, unsecure, environment without completely losing control of U-Boot. Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Tested-by: Alex Kiernan <alex.kiernan@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'configs/ls1021aqds_nand_defconfig')
0 files changed, 0 insertions, 0 deletions