image-host.c 562 B

123456789101112131415161718192021222324252627
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Image code used by host tools (and not boards)
  4. *
  5. * (C) Copyright 2008 Semihalf
  6. *
  7. * (C) Copyright 2000-2006
  8. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  9. */
  10. #include <time.h>
  11. void memmove_wd(void *to, void *from, size_t len, ulong chunksz)
  12. {
  13. memmove(to, from, len);
  14. }
  15. void genimg_print_size(uint32_t size)
  16. {
  17. printf("%d Bytes = %.2f KiB = %.2f MiB\n", size, (double)size / 1.024e3,
  18. (double)size / 1.048576e6);
  19. }
  20. void genimg_print_time(time_t timestamp)
  21. {
  22. printf("%s", ctime(&timestamp));
  23. }