]>
Commit | Line | Data |
---|---|---|
1a459660 WD |
1 | de <net.h> |
2 | ||
3 | #if !defined(CONFIG_UPDATE_TFTP) | |
4 | #error "CONFIG_UPDATE_TFTP required" | |
5 | #endif | |
6 | ||
7 | static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | |
8 | { | |
9 | ulong addr = 0Un the root directory of the source tree for details. | |
7130a579 AP |
10 | */ |
11 | ||
12 | #include <common.h> | |
13 | #include <command.h> | |
ea5427e2 | 14 | #include <net.h> |
7130a579 AP |
15 | |
16 | #if !defined(CONFIG_UPDATE_TFTP) | |
17 | #error "CONFIG_UPDATE_TFTP required" | |
18 | #endif | |
19 | ||
7130a579 AP |
20 | static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
21 | { | |
22 | ulong addr = 0UL; | |
23 | ||
24 | if (argc > 2) | |
4c12eeb8 | 25 | return CMD_RET_USAGE; |
7130a579 AP |
26 | |
27 | if (argc == 2) | |
28 | addr = simple_strtoul(argv[1], NULL, 16); | |
29 | ||
30 | return update_tftp(addr); | |
31 | } | |
32 | ||
33 | U_BOOT_CMD(fitupd, 2, 0, do_fitupd, | |
34 | "update from FIT image", | |
35 | "[addr]\n" | |
36 | "\t- run update from FIT image at addr\n" | |
37 | "\t or from tftp 'updatefile'" | |
38 | ); |