Jerome Forissier | 1ff0036 | 2024-10-16 12:04:03 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* Copyright (C) 2024 Linaro Ltd. */ |
| 3 | |
| 4 | #include <command.h> |
| 5 | #include <net.h> |
| 6 | |
| 7 | #if defined(CONFIG_CMD_DHCP) |
Jerome Forissier | 9708350 | 2024-11-07 12:27:57 +0100 | [diff] [blame] | 8 | U_BOOT_CMD(dhcp, 3, 1, do_dhcp, |
| 9 | "boot image via network using DHCP/TFTP protocol", |
| 10 | "[loadAddress] [[hostIPaddr:]bootfilename]"); |
Jerome Forissier | 1ff0036 | 2024-10-16 12:04:03 +0200 | [diff] [blame] | 11 | #endif |
Jerome Forissier | 6a78e96 | 2024-10-16 12:04:05 +0200 | [diff] [blame] | 12 | |
Jerome Forissier | 8f29e00 | 2024-10-16 12:04:06 +0200 | [diff] [blame] | 13 | #if defined(CONFIG_CMD_PING) |
Jerome Forissier | 9708350 | 2024-11-07 12:27:57 +0100 | [diff] [blame] | 14 | U_BOOT_CMD(ping, 2, 1, do_ping, "send ICMP ECHO_REQUEST to network host", |
| 15 | "pingAddress"); |
Jerome Forissier | 8f29e00 | 2024-10-16 12:04:06 +0200 | [diff] [blame] | 16 | #endif |
| 17 | |
Jerome Forissier | 6a78e96 | 2024-10-16 12:04:05 +0200 | [diff] [blame] | 18 | #if defined(CONFIG_CMD_TFTPBOOT) |
Jerome Forissier | 9708350 | 2024-11-07 12:27:57 +0100 | [diff] [blame] | 19 | U_BOOT_CMD(tftpboot, 3, 0, do_tftpb, |
| 20 | "boot image via network using TFTP protocol\n", |
| 21 | "[loadAddress] [[hostIPaddr:]bootfilename]"); |
Jerome Forissier | 6a78e96 | 2024-10-16 12:04:05 +0200 | [diff] [blame] | 22 | #endif |
Jerome Forissier | bc4d882 | 2024-10-16 12:04:07 +0200 | [diff] [blame] | 23 | |
| 24 | #if defined(CONFIG_CMD_DNS) |
Jerome Forissier | 9708350 | 2024-11-07 12:27:57 +0100 | [diff] [blame] | 25 | U_BOOT_CMD(dns, 3, 1, do_dns, "lookup the IP of a hostname", |
| 26 | "hostname [envvar]"); |
Jerome Forissier | bc4d882 | 2024-10-16 12:04:07 +0200 | [diff] [blame] | 27 | #endif |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 28 | |
| 29 | #if defined(CONFIG_CMD_WGET) |
Jerome Forissier | 8fa383d | 2025-03-05 15:26:42 +0100 | [diff] [blame^] | 30 | U_BOOT_CMD(wget, 4, 1, do_wget, |
| 31 | "boot image via network using HTTP/HTTPS protocol" |
| 32 | #if defined(CONFIG_WGET_CACERT) |
| 33 | "\nwget cacert - configure wget root certificates" |
| 34 | #endif |
| 35 | , |
Jerome Forissier | 1e14542 | 2024-11-14 15:20:40 +0100 | [diff] [blame] | 36 | "[loadAddress] url\n" |
Jerome Forissier | 8fa383d | 2025-03-05 15:26:42 +0100 | [diff] [blame^] | 37 | "wget [loadAddress] [host:]path\n" |
| 38 | " - load file" |
| 39 | #if defined(CONFIG_WGET_CACERT) |
| 40 | "\nwget cacert <address> <length>\n" |
| 41 | " - provide CA certificates (0 0 to remove current)" |
| 42 | "\nwget cacert none|optional|required\n" |
| 43 | " - set server certificate verification mode (default: optional)" |
| 44 | #endif |
Jerome Forissier | 1e14542 | 2024-11-14 15:20:40 +0100 | [diff] [blame] | 45 | ); |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 46 | #endif |