blob: e811473b47e9ca19bf65a37bea2bd99fa88a421f [file] [log] [blame]
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02001de <net.h>
2
3#if !defined(CONFIG_UPDATE_TFTP)
4#error "CONFIG_UPDATE_TFTP required"
5#endif
6
7static 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.
Andreas Pretzschfcc69ff2011-07-16 05:51:00 +000010 */
11
12#include <common.h>
13#include <command.h>
Simon Glassd1892ac2013-05-15 06:23:54 +000014#include <net.h>
Andreas Pretzschfcc69ff2011-07-16 05:51:00 +000015
16#if !defined(CONFIG_UPDATE_TFTP)
17#error "CONFIG_UPDATE_TFTP required"
18#endif
19
Andreas Pretzschfcc69ff2011-07-16 05:51:00 +000020static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
21{
22 ulong addr = 0UL;
23
24 if (argc > 2)
Simon Glassa06dfc72011-12-10 08:44:01 +000025 return CMD_RET_USAGE;
Andreas Pretzschfcc69ff2011-07-16 05:51:00 +000026
27 if (argc == 2)
28 addr = simple_strtoul(argv[1], NULL, 16);
29
30 return update_tftp(addr);
31}
32
33U_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);