提交 ccb8de23 编写于 作者: S Stephan Gerhold 提交者: Tom Rini

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: aa043ee9 ("db410c: automatically launch fastboot")
Signed-off-by: NStephan Gerhold <stephan@gerhold.net>
Reviewed-by: NRamon Fried <rfried.dev@gmail.com>
上级 1d667227
......@@ -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");
}
......
......@@ -10,6 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_FIT=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_MISC_INIT_R=y
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册