mkimage.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * (C) Copyright 2000-2004
  3. * DENX Software Engineering
  4. * Wolfgang Denk, wd@denx.de
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef _MKIIMAGE_H_
  9. #define _MKIIMAGE_H_
  10. #include "os_support.h"
  11. #include <errno.h>
  12. #include <fcntl.h>
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include <string.h>
  16. #include <sys/stat.h>
  17. #include <time.h>
  18. #include <unistd.h>
  19. #include <u-boot/sha1.h>
  20. #include "fdt_host.h"
  21. #include "imagetool.h"
  22. #undef MKIMAGE_DEBUG
  23. #ifdef MKIMAGE_DEBUG
  24. #define debug(fmt,args...) printf (fmt ,##args)
  25. #else
  26. #define debug(fmt,args...)
  27. #endif /* MKIMAGE_DEBUG */
  28. static inline void *map_sysmem(ulong paddr, unsigned long len)
  29. {
  30. return (void *)(uintptr_t)paddr;
  31. }
  32. static inline ulong map_to_sysmem(void *ptr)
  33. {
  34. return (ulong)(uintptr_t)ptr;
  35. }
  36. #define MKIMAGE_TMPFILE_SUFFIX ".tmp"
  37. #define MKIMAGE_MAX_TMPFILE_LEN 256
  38. #define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
  39. #define MKIMAGE_MAX_DTC_CMDLINE_LEN 512
  40. #define MKIMAGE_DTC "dtc" /* assume dtc is in $PATH */
  41. #endif /* _MKIIMAGE_H_ */