fit_common.h 892 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2014
  4. */
  5. #ifndef _FIT_COMMON_H_
  6. #define _FIT_COMMON_H_
  7. #include "imagetool.h"
  8. #include "mkimage.h"
  9. #include <image.h>
  10. int fit_verify_header(unsigned char *ptr, int image_size,
  11. struct image_tool_params *params);
  12. int fit_check_image_types(uint8_t type);
  13. /**
  14. * Map an FDT into memory, optionally increasing its size
  15. *
  16. * @cmdname: Tool name (for displaying with error messages)
  17. * @fname: Filename containing FDT
  18. * @size_inc: Amount to increase size by (0 = leave it alone)
  19. * @blobp: Returns pointer to FDT blob
  20. * @sbuf: File status information is stored here
  21. * @delete_on_error: true to delete the file if we get an error
  22. * @return 0 if OK, -1 on error.
  23. */
  24. int mmap_fdt(const char *cmdname, const char *fname, size_t size_inc,
  25. void **blobp, struct stat *sbuf, bool delete_on_error);
  26. #endif /* _FIT_COMMON_H_ */