summaryrefslogtreecommitdiff
path: root/tools/fit_image.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-10 03:39:43 +0300
committerSimon Glass <sjg@chromium.org>2020-07-25 23:46:57 +0300
commit152b246298bd5f107f5e08ddddee40411aa74cb7 (patch)
tree4b7059f6c53f85b2c0e03b985be845bddd8e1e17 /tools/fit_image.c
parentb3295fd4e3d61a7ceabbad10a293db2dcd38b38b (diff)
downloadu-boot-152b246298bd5f107f5e08ddddee40411aa74cb7.tar.xz
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/fit_image.c')
-rw-r--r--tools/fit_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fit_image.c b/tools/fit_image.c
index a082d9386d..df310b53da 100644
--- a/tools/fit_image.c
+++ b/tools/fit_image.c
@@ -53,7 +53,7 @@ static int fit_add_file_data(struct image_tool_params *params, size_t size_inc,
}
/* for first image creation, add a timestamp at offset 0 i.e., root */
- if (params->datafile) {
+ if (params->datafile || params->reset_timestamp) {
time_t time = imagetool_get_source_date(params->cmdname,
sbuf.st_mtime);
ret = fit_set_timestamp(ptr, 0, time);