Skip to contentSkip to conversation

fastboot: Only call the bootm command if it is enabled

PATCH In review Samuel Holland 4 participants 4 messages Feb 20, 2023 – Jun 1, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fastboot: Only call the bootm command if it is enabled

This fixes an error with trying to link against do_bootm() when CONFIG_CMD_BOOTM is disabled.

---

 drivers/fastboot/fb_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fastboot/fb_common.c +1 -1
index 57b6182c46a..20aa80838ae 100644
@@ -135,7 +135,7 @@ void fastboot_boot(void)
 	s = env_get("fastboot_bootcmd");
 	if (s) {
 		run_command(s, CMD_FLAG_ENV);
-	} else {
+	} else if (IS_ENABLED(CONFIG_CMD_BOOTM)) {
 		static char boot_addr_start[20];
 		static char *const bootm_args[] = {
 			"bootm", boot_addr_start, NULL
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Samuel Holland

This fixes an error with trying to link against do_bootm() when CONFIG_CMD_BOOTM is disabled.

Quoted 20 lines

---

 drivers/fastboot/fb_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fastboot/fb_common.c +1 -1
index 57b6182c46a..20aa80838ae 100644
@@ -135,7 +135,7 @@ void fastboot_boot(void)
 	s = env_get("fastboot_bootcmd");
 	if (s) {
 		run_command(s, CMD_FLAG_ENV);
-	} else {
+	} else if (IS_ENABLED(CONFIG_CMD_BOOTM)) {
 		static char boot_addr_start[20];
 		static char *const bootm_args[] = {
 			"bootm", boot_addr_start, NULL
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#2 lore raw
In reply to Samuel Holland

Hi,

Quoted 14 lines · Samuel Holland

This fixes an error with trying to link against do_bootm() when CONFIG_CMD_BOOTM is disabled.

---

  drivers/fastboot/fb_common.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fastboot/fb_common.c +0 -0
index 57b6182c46a..20aa80838ae 100644

drivers/fastboot/fb_common.c void fastboot_boot(void) · line 141

Quoted 8 lines
drivers/fastboot/fb_common.c +1 -1
@@ -135,7 +135,7 @@ void fastboot_boot(void)
  	s = env_get("fastboot_bootcmd");
  	if (s) {
  		run_command(s, CMD_FLAG_ENV);
-	} else {
+	} else if (IS_ENABLED(CONFIG_CMD_BOOTM)) {
  		static char boot_addr_start[20];
  		static char *const bootm_args[] = {
  			"bootm", boot_addr_start, NULL

Thanks
Patrick