]> git.ipfire.org Git - thirdparty/u-boot.git/blame - cmd/fitupd.c
test: Only descend into test/ when CONFIG_UNIT_TEST is enabled
[thirdparty/u-boot.git] / cmd / fitupd.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
1aaab00d
WD
2/*
3 * (C) Copyright 2011
4 * Andreas Pretzsch, carpe noctem engineering, apr@cn-eng.de
7130a579
AP
5 */
6
7#include <common.h>
8#include <command.h>
ea5427e2 9#include <net.h>
7130a579
AP
10
11#if !defined(CONFIG_UPDATE_TFTP)
12#error "CONFIG_UPDATE_TFTP required"
13#endif
14
7130a579
AP
15static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
16{
17 ulong addr = 0UL;
18
19 if (argc > 2)
4c12eeb8 20 return CMD_RET_USAGE;
7130a579
AP
21
22 if (argc == 2)
23 addr = simple_strtoul(argv[1], NULL, 16);
24
c7ff5528 25 return update_tftp(addr, NULL, NULL);
7130a579
AP
26}
27
28U_BOOT_CMD(fitupd, 2, 0, do_fitupd,
29 "update from FIT image",
30 "[addr]\n"
31 "\t- run update from FIT image at addr\n"
32 "\t or from tftp 'updatefile'"
33);