1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 00:32:04 +02:00

net: add fastboot TCP support

Known limitations are
1. fastboot reboot doesn't work (answering OK but not rebooting)
2. flashing isn't supported (TCP transport only limitation)

The command syntax is
fastboot tcp

Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
Cc: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Simon Glass <sjg@chromium.org>
Сс: Joe Hershberger <joe.hershberger@ni.com>
Сс: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Dmitrii Merkurev
2023-04-12 19:49:30 +01:00
committed by Tom Rini
parent 08fb8da371
commit 443d319180
12 changed files with 230 additions and 35 deletions

View File

@@ -93,7 +93,8 @@
#include <net.h>
#include <net6.h>
#include <ndisc.h>
#include <net/fastboot.h>
#include <net/fastboot_udp.h>
#include <net/fastboot_tcp.h>
#include <net/tftp.h>
#include <net/ncsi.h>
#if defined(CONFIG_CMD_PCAP)
@@ -501,9 +502,14 @@ restart:
tftp_start_server();
break;
#endif
#ifdef CONFIG_UDP_FUNCTION_FASTBOOT
case FASTBOOT:
fastboot_start_server();
#if defined(CONFIG_UDP_FUNCTION_FASTBOOT)
case FASTBOOT_UDP:
fastboot_udp_start_server();
break;
#endif
#if defined(CONFIG_TCP_FUNCTION_FASTBOOT)
case FASTBOOT_TCP:
fastboot_tcp_start_server();
break;
#endif
#if defined(CONFIG_CMD_DHCP)
@@ -1498,7 +1504,8 @@ common:
/* Fall through */
case NETCONS:
case FASTBOOT:
case FASTBOOT_UDP:
case FASTBOOT_TCP:
case TFTPSRV:
if (IS_ENABLED(CONFIG_IPV6) && use_ip6) {
if (!memcmp(&net_link_local_ip6, &net_null_addr_ip6,