fastboot: fix fastboot_set_reboot_flag()
PATCH 1/1 fastboot: fix fastboot_set_reboot_flag()
In case CONFIG_FASTBOOT_FLASH_MMC_DEV == 0, compile-time condition is not met and fastboot_set_reboot_flag() fails.
--- drivers/fastboot/fb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fastboot/fb_common.c +1 -1
@@ -91,7 +91,7 @@ void fastboot_okay(const char *reason, char *response)*/ int __weak fastboot_set_reboot_flag (enum fastboot_reboot_reason reason) { -#if CONFIG_IS_ENABLED (FASTBOOT_FLASH_MMC_DEV ) +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV static const char *const boot_cmds[] = { [FASTBOOT_REBOOT_REASON_BOOTLOADER ] ="bootonce-bootloader" , [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",
Signature · 1 line
2.27.0
Quoted 15 lines · Roman Stratiienko
In case
CONFIG_FASTBOOT_FLASH_MMC_DEV== 0, compile-time condition is not met andfastboot_set_reboot_flag()fails.Fixes a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag")Signed-off-by Roman Stratiienko <[email protected]>--- drivers/fastboot/fb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/fastboot/fb_common.c +0
-0
drivers/fastboot/fb_common.c void fastboot_okay(const char *reason, char *response) · line 97
Quoted 8 lines
drivers/fastboot/fb_common.c +1
-1@@ -91,7 +91,7 @@ void fastboot_okay(const char *reason, char *response)*/ int __weak fastboot_set_reboot_flag (enum fastboot_reboot_reason reason) { -#if CONFIG_IS_ENABLED (FASTBOOT_FLASH_MMC_DEV ) +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV static const char *const boot_cmds[] = { [FASTBOOT_REBOOT_REASON_BOOTLOADER ] ="bootonce-bootloader" , [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",
Mattijs Korpershoek
Tested-byHi Roman,
Thank you for your patch.
Quoted 10 lines · Sean Anderson
Quoted 9 lines · Roman Stratiienko
In case
CONFIG_FASTBOOT_FLASH_MMC_DEV== 0, compile-time condition is not met andfastboot_set_reboot_flag()fails.Fixes a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag")Signed-off-by Roman Stratiienko <[email protected]>--- drivers/fastboot/fb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
drivers/fastboot/fb_common.c +0
-0drivers/fastboot/fb_common.c void fastboot_okay(const char *reason, char *response) · line 97
Quoted 8 lines
drivers/fastboot/fb_common.c +1
-1@@ -91,7 +91,7 @@ void fastboot_okay(const char *reason, char *response)*/ int __weak fastboot_set_reboot_flag (enum fastboot_reboot_reason reason) { -#if CONFIG_IS_ENABLED (FASTBOOT_FLASH_MMC_DEV ) +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV static const char *const boot_cmds[] = { [FASTBOOT_REBOOT_REASON_BOOTLOADER ] ="bootonce-bootloader" , [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",Reviewed-by Sean Anderson <[email protected]>
I'm using this in the (out of tree) U-Boot for khadas VIM3L/VIM3 boards:
https://gitlab.com/baylibre/amlogic/atv/u-boot/-/tree/u-boot/v2021.07/integ
Quoted 7 lines · Roman Stratiienko
In case
CONFIG_FASTBOOT_FLASH_MMC_DEV== 0, compile-time condition is not met andfastboot_set_reboot_flag()fails.Fixes a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag")Signed-off-by Roman Stratiienko <[email protected]>Reviewed-by Sean Anderson <[email protected]>Tested-by Mattijs Korpershoek <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom