Skip to contentSkip to conversation

net/tftp: fix build if CMD_BOOTEFI is not set

PATCH Superseded Jörg Krause 2 participants 2 messages Sep 15, 2017 Networking

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/tftp: fix build if CMD_BOOTEFI is not set

Fixes:
net/tftp.c:811: undefined reference to `efi_set_bootdev'

---
 net/tftp.c | 4 ++++
 1 file changed, 4 insertions(+)
net/tftp.c +4 -0
index a5ed8c5d0a..4a9a5a5d05 100644
@@ -8,7 +8,9 @@
 
 #include <common.h>
 #include <command.h>
+#ifdef CONFIG_CMD_BOOTEFI
 #include <efi_loader.h>
+#endif
 #include <mapmem.h>
 #include <net.h>
 #include <net/tftp.h>
@@ -805,7 +807,9 @@ void tftp_start(enum proto_t protocol)
 		printf("Load address: 0x%lx\n", load_addr);
 		puts("Loading: *\b");
 		tftp_state = STATE_SEND_RRQ;
+#ifdef CONFIG_CMD_BOOTEFI
 		efi_set_bootdev("Net", "", tftp_filename);
+#endif
 	}
 
 	time_start = get_timer(0);
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 net/tftp: fix build if CMD_BOOTEFI is not set

Quoted 13 lines · Jörg Krause

Fixes:
net/tftp.c:811: undefined reference to `efi_set_bootdev'

---
 net/tftp.c | 4 ++++
 1 file changed, 4 insertions(+)
net/tftp.c +0 -0
index a5ed8c5d0a..4a9a5a5d05 100644

net/tftp.c line 13

Quoted 6 lines
net/tftp.c +2 -0
@@ -8,7 +8,9 @@
 
 #include <common.h>
 #include <command.h>
+#ifdef CONFIG_CMD_BOOTEFI
 #include <efi_loader.h>
+#endif

No need to change this.

Quoted 4 lines
net/tftp.c +0 -0
 #include <mapmem.h>
 #include <net.h>
 #include <net/tftp.h>

net/tftp.c void tftp_start(enum proto_t protocol)

Quoted 10 lines
net/tftp.c +2 -1
@@ -805,7 +807,9 @@ void tftp_start(enum proto_t protocol)
                printf("Load address: 0x%lx\n", load_addr);
                puts("Loading: *\b");
                tftp_state = STATE_SEND_RRQ;
+#ifdef CONFIG_CMD_BOOTEFI
                efi_set_bootdev("Net", "", tftp_filename);
+#endif
        }
 
        time_start = get_timer(0);
--

Regards,
Bin