net/tftp: fix build if CMD_BOOTEFI is not set
PATCH 1/1 net/tftp: fix build if CMD_BOOTEFI is not set
Fixes:net/tftp.c:811: undefined reference to `efi_set_bootdev'
Signed-off-by Jörg Krause <[email protected]>
--- net/tftp.c | 4 ++++ 1 file changed, 4 insertions(+)
net/tftp.c +4 -0
@@ -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
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'Signed-off-by Jörg Krause <[email protected]>--- net/tftp.c | 4 ++++ 1 file changed, 4 insertions(+)net/tftp.c +0
-0
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