diff options
author | Pali Rohár <pali@kernel.org> | 2022-08-27 20:49:20 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2022-09-13 06:38:08 +0200 |
commit | 109dde049740fe17a461471d7ff54a64fc58aab9 (patch) | |
tree | 54d4848ea3ec5bdb6d37c1e7cf12c3740e2f8a2b /board/CZ.NIC/turris_mox | |
parent | 7bb9ea47e1a47e00d4aef86d66293379be0b47b0 (diff) | |
download | u-boot-109dde049740fe17a461471d7ff54a64fc58aab9.zip u-boot-109dde049740fe17a461471d7ff54a64fc58aab9.tar.gz u-boot-109dde049740fe17a461471d7ff54a64fc58aab9.tar.bz2 |
arm: mvebu: turris_{omnia, mox}: Reset bootdelay env for rescue
When rescue mode was activated reset also bootdelay env variable to its
default value. This will ensure that reset button works and starts rescue
mode also in the case when user changed bootdelay env variable to -1 (which
has meaning to not start autoboot).
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/CZ.NIC/turris_mox')
-rw-r--r-- | board/CZ.NIC/turris_mox/turris_mox.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 3dbd68e..5e1cf328 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -440,8 +440,9 @@ static void handle_reset_button(void) env_set_default_vars(1, (char * const *)vars, 0); if (read_reset_button()) { - const char * const vars[2] = { + const char * const vars[3] = { "bootcmd", + "bootdelay", "distro_bootcmd", }; @@ -449,7 +450,7 @@ static void handle_reset_button(void) * Set the above envs to their default values, in case the user * managed to break them. */ - env_set_default_vars(2, (char * const *)vars, 0); + env_set_default_vars(3, (char * const *)vars, 0); /* Ensure bootcmd_rescue is used by distroboot */ env_set("boot_targets", "rescue"); |