diff mbox series

[U-Boot,RFC,v2,08/20] net: fastboot: Support building without MMC

Message ID 1525077174-6211-9-git-send-email-alex.kiernan@gmail.com
State RFC
Delegated to: Lukasz Majewski
Headers show
Series Add fastboot UDP support | expand

Commit Message

Alex Kiernan April 30, 2018, 8:32 a.m. UTC
If the fastboot flash/erase commands are disabled, remove that support
so we still build correctly.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

Changes in v2: None

 net/fastboot.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Joe Hershberger May 3, 2018, 8:39 p.m. UTC | #1
On Mon, Apr 30, 2018 at 3:32 AM, Alex Kiernan <alex.kiernan@gmail.com> wrote:
> If the fastboot flash/erase commands are disabled, remove that support
> so we still build correctly.
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Jocelyn Bohr May 4, 2018, 6:06 a.m. UTC | #2
On Thu, May 3, 2018 at 1:40 PM Joe Hershberger <joe.hershberger@ni.com>
wrote:

> On Mon, Apr 30, 2018 at 3:32 AM, Alex Kiernan <alex.kiernan@gmail.com>
> wrote:
> > If the fastboot flash/erase commands are disabled, remove that support
> > so we still build correctly.
> >
> > Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>

Reviewed-by: Jocelyn Bohr <bohr@google.com>
diff mbox series

Patch

diff --git a/net/fastboot.c b/net/fastboot.c
index 32cb581..87c12e5 100644
--- a/net/fastboot.c
+++ b/net/fastboot.c
@@ -59,8 +59,10 @@  static int fastboot_our_port;
 
 static void fb_getvar(char *);
 static void fb_download(char *, unsigned int, char *);
+#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)
 static void fb_flash(char *);
 static void fb_erase(char *);
+#endif
 static void fb_continue(char *);
 static void fb_reboot(char *);
 static void boot_downloaded_image(void);
@@ -169,10 +171,12 @@  static void fastboot_send(struct fastboot_header fb_header, char *fastboot_data,
 			fb_getvar(response);
 		} else if (!strcmp("download", cmd_string)) {
 			fb_download(fastboot_data, fastboot_data_len, response);
+#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)
 		} else if (!strcmp("flash", cmd_string)) {
 			fb_flash(response);
 		} else if (!strcmp("erase", cmd_string)) {
 			fb_erase(response);
+#endif
 		} else if (!strcmp("boot", cmd_string)) {
 			write_fb_response("OKAY", "", response);
 		} else if (!strcmp("continue", cmd_string)) {
@@ -367,6 +371,7 @@  static void fb_download(char *fastboot_data, unsigned int fastboot_data_len,
 	}
 }
 
+#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)
 /**
  * Writes the previously downloaded image to the partition indicated by
  * cmd_parameter. Writes to response.
@@ -389,6 +394,7 @@  static void fb_erase(char *response)
 {
 	fb_mmc_erase(cmd_parameter, response);
 }
+#endif
 
 /**
  * Continues normal boot process by running "bootcmd". Writes