aboutsummaryrefslogtreecommitdiff
path: root/tools/mkimage.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-09 18:39:43 -0600
committerSimon Glass <sjg@chromium.org>2020-07-25 14:46:57 -0600
commit152b246298bd5f107f5e08ddddee40411aa74cb7 (patch)
tree4b7059f6c53f85b2c0e03b985be845bddd8e1e17 /tools/mkimage.c
parentb3295fd4e3d61a7ceabbad10a293db2dcd38b38b (diff)
downloadu-boot-152b246298bd5f107f5e08ddddee40411aa74cb7.zip
u-boot-152b246298bd5f107f5e08ddddee40411aa74cb7.tar.gz
u-boot-152b246298bd5f107f5e08ddddee40411aa74cb7.tar.bz2
mkimage: Allow updating the FIT timestamp
Normally the FIT timestamp is created the first time mkimage is run on a FIT, when converting the source .its to the binary .fit file. This corresponds to using the -f flag. But if the original input to mkimage is a binary file (already compiled) then the timestamp is assumed to have been set previously. Add a -t flag to allow setting the timestamp in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'tools/mkimage.c')
-rw-r--r--tools/mkimage.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 7cb666d..43078d0 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -145,7 +145,7 @@ static void process_args(int argc, char **argv)
int opt;
while ((opt = getopt(argc, argv,
- "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qsT:vVx")) != -1) {
+ "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) {
switch (opt) {
case 'a':
params.addr = strtoull(optarg, &ptr, 16);
@@ -269,6 +269,9 @@ static void process_args(int argc, char **argv)
case 's':
params.skipcpy = 1;
break;
+ case 't':
+ params.reset_timestamp = 1;
+ break;
case 'T':
if (strcmp(optarg, "list") == 0) {
show_valid_options(IH_TYPE);