summaryrefslogtreecommitdiff
path: root/boot/image-host.c
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2021-11-12 10:14:24 -0500
committerTom Rini <[email protected]>2021-11-12 10:14:24 -0500
commit515bf78ff975d474f895bf86b4e16eade51c8dbd (patch)
tree49114762efa8154f2a2f75d8718cf650e7f0fc09 /boot/image-host.c
parent1e72ad6b387c599f477f83cda67ab525c089a9b0 (diff)
parent6f84e809d9a373961d34f5b408bf44702b8c978c (diff)
Merge branch '2021-11-12-assorted-updates'
- A number of pxe related cleanups and related re-organization. - A few related pxe/sysboot/extlinux improvements - Remove some dead code. - Update Azure to use a newer Windows build environment - Add a .get_maintainer.conf file - A few minor TI SoC platform updates
Diffstat (limited to 'boot/image-host.c')
-rw-r--r--boot/image-host.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/boot/image-host.c b/boot/image-host.c
new file mode 100644
index 00000000000..20a9521948b
--- /dev/null
+++ b/boot/image-host.c
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Image code used by host tools (and not boards)
+ *
+ * (C) Copyright 2008 Semihalf
+ *
+ * (C) Copyright 2000-2006
+ * Wolfgang Denk, DENX Software Engineering, [email protected].
+ */
+
+#include <time.h>
+
+void memmove_wd(void *to, void *from, size_t len, ulong chunksz)
+{
+ memmove(to, from, len);
+}
+
+void genimg_print_size(uint32_t size)
+{
+ printf("%d Bytes = %.2f KiB = %.2f MiB\n", size, (double)size / 1.024e3,
+ (double)size / 1.048576e6);
+}
+
+void genimg_print_time(time_t timestamp)
+{
+ printf("%s", ctime(&timestamp));
+}