summaryrefslogtreecommitdiffstats
path: root/include/image.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-12-06 09:21:20 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-12-15 11:07:15 +0100
commitd9d9c41f776a4b4744592ab0fb64398bb8ff6636 (patch)
tree6cd4700a7095488951c9f208c30280f1cf06aa22 /include/image.h
parentcbf041c6301b2d7cca9089cbd88476bf97f0116a (diff)
downloadbarebox-d9d9c41f776a4b4744592ab0fb64398bb8ff6636.tar.gz
barebox-d9d9c41f776a4b4744592ab0fb64398bb8ff6636.tar.xz
move code now only used in mkimage to mkimage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/image.h')
-rw-r--r--include/image.h103
1 files changed, 0 insertions, 103 deletions
diff --git a/include/image.h b/include/image.h
index 97de88133f..35ff01b1c0 100644
--- a/include/image.h
+++ b/include/image.h
@@ -218,109 +218,6 @@ static inline const char *image_get_comp_name(uint8_t comp)
#define uimage_to_cpu(x) be32_to_cpu(x)
#define cpu_to_uimage(x) cpu_to_be32(x)
-static inline uint32_t image_get_header_size(void)
-{
- return sizeof(image_header_t);
-}
-
-#define image_get_hdr_u32(x) \
-static inline uint32_t image_get_##x(const image_header_t *hdr) \
-{ \
- return uimage_to_cpu(hdr->ih_##x); \
-}
-
-image_get_hdr_u32(magic); /* image_get_magic */
-image_get_hdr_u32(hcrc); /* image_get_hcrc */
-image_get_hdr_u32(time); /* image_get_time */
-image_get_hdr_u32(size); /* image_get_size */
-image_get_hdr_u32(load); /* image_get_load */
-image_get_hdr_u32(ep); /* image_get_ep */
-image_get_hdr_u32(dcrc); /* image_get_dcrc */
-
-#define image_get_hdr_u8(x) \
-static inline uint8_t image_get_##x(const image_header_t *hdr) \
-{ \
- return hdr->ih_##x; \
-}
-image_get_hdr_u8(os); /* image_get_os */
-image_get_hdr_u8(arch); /* image_get_arch */
-image_get_hdr_u8(type); /* image_get_type */
-image_get_hdr_u8(comp); /* image_get_comp */
-
-static inline char *image_get_name(const image_header_t *hdr)
-{
- return (char*)hdr->ih_name;
-}
-
-static inline uint32_t image_get_data_size(const image_header_t *hdr)
-{
- return image_get_size(hdr);
-}
-
-/**
- * image_get_data - get image payload start address
- * @hdr: image header
- *
- * image_get_data() returns address of the image payload. For single
- * component images it is image data start. For multi component
- * images it points to the null terminated table of sub-images sizes.
- *
- * returns:
- * image payload data start address
- */
-static inline ulong image_get_data(const image_header_t *hdr)
-{
- return ((ulong)hdr + image_get_header_size());
-}
-
-static inline uint32_t image_get_image_size(const image_header_t *hdr)
-{
- return (image_get_size(hdr) + image_get_header_size());
-}
-
-static inline ulong image_get_image_end(const image_header_t *hdr)
-{
- return ((ulong)hdr + image_get_image_size(hdr));
-}
-
-#define image_set_hdr_u32(x) \
-static inline void image_set_##x(image_header_t *hdr, uint32_t val) \
-{ \
- hdr->ih_##x = cpu_to_uimage(val); \
-}
-
-image_set_hdr_u32(magic); /* image_set_magic */
-image_set_hdr_u32(hcrc); /* image_set_hcrc */
-image_set_hdr_u32(time); /* image_set_time */
-image_set_hdr_u32(size); /* image_set_size */
-image_set_hdr_u32(load); /* image_set_load */
-image_set_hdr_u32(ep); /* image_set_ep */
-image_set_hdr_u32(dcrc); /* image_set_dcrc */
-
-#define image_set_hdr_u8(x) \
-static inline void image_set_##x(image_header_t *hdr, uint8_t val) \
-{ \
- hdr->ih_##x = val; \
-}
-
-image_set_hdr_u8(os); /* image_set_os */
-image_set_hdr_u8(arch); /* image_set_arch */
-image_set_hdr_u8(type); /* image_set_type */
-image_set_hdr_u8(comp); /* image_set_comp */
-
-static inline void image_set_name(image_header_t *hdr, const char *name)
-{
- strncpy(image_get_name(hdr), name, IH_NMLEN);
-}
-
-ulong image_multi_count(void *data);
-void image_multi_getimg(void *data, ulong idx,
- ulong *img_data, ulong *len);
-
-void image_print_size(uint32_t size);
-
-void image_print_contents(const image_header_t *hdr, void *data);
-
struct uimage_handle_data {
size_t offset; /* offset in the image */
ulong len;