diff options
author | Edmund Henniges <eh@emlix.com> | 2020-05-14 20:21:57 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-08-19 07:36:15 +0200 |
commit | 376517ed0857ce0c83d64f6f878f59b50e348295 (patch) | |
tree | 2ea2b59866f2039529a42f77ed310f0e777b5ecf /common | |
parent | 9400bd8be8d0088ad95b1ce0510782b3436ca666 (diff) | |
download | barebox-376517ed0857ce0c83d64f6f878f59b50e348295.tar.gz barebox-376517ed0857ce0c83d64f6f878f59b50e348295.tar.xz |
fastboot net: implement fastboot over UDP
This implements the UDP variant of the fastboot protocol. The only way to
start the service for now is to compile with CONFIG_FASTBOOT_NET_ON_BOOT.
The service will bind to the network interface that provides the IPv4
gateway.
Sending an OKAY packet before performing a restart is necessary since
contrary to USB the host will not notice when a UDP server disappears.
Signed-off-by: Edmund Henniges <eh@emlix.com>
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/fastboot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/fastboot.c b/common/fastboot.c index 2e84a6f073..3628d4dfb5 100644 --- a/common/fastboot.c +++ b/common/fastboot.c @@ -245,6 +245,7 @@ static char *fastboot_msg[] = { [FASTBOOT_MSG_FAIL] = "FAIL", [FASTBOOT_MSG_INFO] = "INFO", [FASTBOOT_MSG_DATA] = "DATA", + [FASTBOOT_MSG_NONE] = "", }; int fastboot_tx_print(struct fastboot *fb, enum fastboot_msg_type type, @@ -273,6 +274,7 @@ int fastboot_tx_print(struct fastboot *fb, enum fastboot_msg_type type, case FASTBOOT_MSG_INFO: pr_info("%pV\n", &vaf); break; + case FASTBOOT_MSG_NONE: case FASTBOOT_MSG_DATA: break; } @@ -287,6 +289,7 @@ int fastboot_tx_print(struct fastboot *fb, enum fastboot_msg_type type, static void cb_reboot(struct fastboot *fb, const char *cmd) { + fastboot_tx_print(fb, FASTBOOT_MSG_OKAY, ""); restart_machine(); } |