diff options
author | Michael Walle <michael@walle.cc> | 2022-08-17 22:38:03 +0300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2022-08-23 13:40:00 +0300 |
commit | aa088beac3aca0dd9b40f60b0b1e5ab1c6bae471 (patch) | |
tree | da2301642ea5125cc825405c263b443f11dc86cd /board/buffalo | |
parent | 18794c192a755147c9f3f86915a6a52cbd9f4017 (diff) | |
download | u-boot-aa088beac3aca0dd9b40f60b0b1e5ab1c6bae471.tar.xz |
board: lsxl: make last resort recovery more reliable
If something is wrong with the environment, we cannot rely on a proper
u-boot operation anymore. In fact, it is possible, that we never reach
misc_init_r() with a broken environment.
Also don't enable the netconsole by environment settings. This way the
user don't have to reconfigure the environment. Instead the network
console is only enabled when the push button is pressed during boot.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/buffalo')
-rw-r--r-- | board/buffalo/lsxl/lsxl.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index eca7da2f6d..7fab5fbe44 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -42,6 +42,8 @@ DECLARE_GLOBAL_DATA_PTR; +static bool force_rescue_mode; + int board_early_init_f(void) { /* @@ -247,14 +249,22 @@ static void check_push_button(void) if (i >= 100) erase_environment(); else if (i >= 10) - rescue_mode(); + force_rescue_mode = true; +} + +int board_early_init_r(void) +{ + check_push_button(); + + return 0; } int misc_init_r(void) { check_power_switch(); check_enetaddr(); - check_push_button(); + if (force_rescue_mode) + rescue_mode(); return 0; } |