diff options
author | Stephan Gerhold <stephan@gerhold.net> | 2021-07-14 10:56:25 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-07-23 18:53:46 -0400 |
commit | ccb8de2387c66b61bb8b974dea9018a8ab63d847 (patch) | |
tree | 991ef8f68fccdd241c78990290988786d60108b4 /board | |
parent | 1d667227ea512537b8453abeb49abbf19a1a18e8 (diff) | |
download | u-boot-ccb8de2387c66b61bb8b974dea9018a8ab63d847.zip u-boot-ccb8de2387c66b61bb8b974dea9018a8ab63d847.tar.gz u-boot-ccb8de2387c66b61bb8b974dea9018a8ab63d847.tar.bz2 |
board: dragonboard410c: Fix fastboot
At the moment pressing the volume down key does not actually launch
fastboot. This is because setting "bootdelay" to "-1" actually
disables autoboot and drops to the U-Boot console. It does not execute
the "bootcmd".
The correct value for "bootdelay" here would be "-2", which disables
the delay and key checking and would immediately execute the "bootcmd".
However, even better in this case is using "preboot" to trigger Fastboot.
The advantage is that running "fastboot continue" will actually continue
the autoboot process instead of ending up in the U-Boot shell.
Also make sure to unset "preboot" again immediately in case the user
saves the environment after triggering fastboot.
Cc: Ramon Fried <rfried.dev@gmail.com>
Fixes: aa043ee91a47 ("db410c: automatically launch fastboot")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/qualcomm/dragonboard410c/dragonboard410c.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index 3b71881..371b326 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -132,8 +132,7 @@ int misc_init_r(void) } if (dm_gpio_get_value(&resin)) { - env_set("bootdelay", "-1"); - env_set("bootcmd", "fastboot 0"); + env_set("preboot", "setenv preboot; fastboot 0"); printf("key_vol_down pressed - Starting fastboot.\n"); } |