image_header.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* Copyright (C) 2019 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _IMAGE_HEADER_H_
  13. #define _IMAGE_HEADER_H_
  14. #include <stdint.h>
  15. /*
  16. * Legacy format image header,
  17. * all data in network byte order (aka natural aka bigendian).
  18. */
  19. #define IH_MAGIC 0x27051956 /* Image Magic Number */
  20. #define IH_NMLEN 32 /* Image Name Length */
  21. typedef struct image_header
  22. {
  23. uint32_t ih_magic; /* Image Header Magic Number */
  24. uint32_t ih_hcrc; /* Image Header CRC Checksum */
  25. uint32_t ih_time; /* Image Creation Timestamp */
  26. uint32_t ih_size; /* Image Data Size */
  27. uint32_t ih_load; /* Data Load Address */
  28. uint32_t ih_ep; /* Entry Point Address */
  29. uint32_t ih_dcrc; /* Image Data CRC Checksum */
  30. uint8_t ih_os; /* Operating System */
  31. uint8_t ih_arch; /* CPU architecture */
  32. uint8_t ih_type; /* Image Type */
  33. uint8_t ih_comp; /* Compression Type */
  34. uint8_t ih_name[IH_NMLEN]; /* Image Name */
  35. } image_header_t;
  36. #endif