From 749a8dcddcd540e8c0ba7e73f18a5bc4b907d800 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Fri, 15 May 2020 12:08:54 +0200 Subject: [PATCH] net: fix build without NFS or NFS download enabled Partial NFS download requires setting net_boot_file_{offset,size_limit} global variables, which are available only when CONFIG_CMD_NFS is set. Signed-off-by: Marek Szyprowski Change-Id: I74e2dbb56c2b41078d2e5506bdcba6458299d792 --- cmd/net.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/net.c b/cmd/net.c index 43ff1b0..bc025c5 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -185,8 +185,10 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, ulong addr; net_boot_file_name_explicit = false; +#if defined(CONFIG_CMD_NFS) net_boot_file_offset = 0; net_boot_file_size_limit = 0; +#endif /* pre-set load_addr */ s = env_get("loadaddr"); @@ -272,6 +274,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, return rcode; } +#if defined(CONFIG_CMD_NFS_DOWNLOAD) int netboot_nfs(unsigned long addr, const char *filename, unsigned long offset, unsigned long limit) { @@ -309,7 +312,7 @@ int netboot_nfs(unsigned long addr, const char *filename, bootstage_error(BOOTSTAGE_ID_NET_DONE_ERR); return rcode; } - +#endif #if defined(CONFIG_CMD_PING) static int do_ping(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -- 2.7.4