diff options
author | Simon Glass <sjg@chromium.org> | 2021-09-25 07:03:17 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-08 15:53:26 -0400 |
commit | 5d3248a688c2368be54aaa9407be30adfa994abc (patch) | |
tree | 5f91893da368e86ff51ec69efdf42f849e2b01eb /common/image-board.c | |
parent | 3d2a47f11c1e77e79aa4f04dc787b25054822267 (diff) |
image: Split host code out into its own file
To avoid having #ifdefs in a few functions which are completely different
in the board and host code, create a new image-host.c file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/image-board.c')
-rw-r--r-- | common/image-board.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/common/image-board.c b/common/image-board.c index 835751e07c7..898f0a2b7b6 100644 --- a/common/image-board.c +++ b/common/image-board.c @@ -15,6 +15,7 @@ #include <fpga.h> #include <image.h> #include <mapmem.h> +#include <rtc.h> #include <watchdog.h> #include <asm/cache.h> #include <asm/global_data.h> @@ -925,3 +926,19 @@ int image_setup_linux(bootm_headers_t *images) return 0; } #endif /* CONFIG_LMB */ + +void genimg_print_size(uint32_t size) +{ + printf("%d Bytes = ", size); + print_size(size, "\n"); +} + +void genimg_print_time(time_t timestamp) +{ + struct rtc_time tm; + + rtc_to_tm(timestamp, &tm); + printf("%4d-%02d-%02d %2d:%02d:%02d UTC\n", + tm.tm_year, tm.tm_mon, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec); +} |