bootm: Tidy up use of autostart env var

This has different semantics in different places. Go with the bootm method
and put it in a common function so that the behaviour is consistent in
U-Boot. Update the docs.

To be clear, this changes the way that 'bootelf' and standalone boot
work. Before, if autostart was set to "fred" or "YES", for example, they
would consider that a "yes". This may change behaviour for some boards,
but the only in-tree boards which mention autostart use "no" to disable
it, which will still work.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
Simon Glass
2021-10-21 21:08:52 -06:00
committed by Tom Rini
parent 1d192d5bcc
commit 7839865272
6 changed files with 18 additions and 11 deletions

5
env/common.c vendored
View File

@@ -235,6 +235,11 @@ int env_get_yesno(const char *var)
1 : 0;
}
bool env_get_autostart(void)
{
return env_get_yesno("autostart") == 1;
}
/*
* Look up the variable from the default environment
*/