summaryrefslogtreecommitdiffstats
path: root/include/image.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-15 14:02:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2007-07-15 14:02:53 +0200
commit8881fb7984fb86469e0e66b88d8230be347e21f9 (patch)
treed8ebe4c3c5e8b2dd6f4be71dea425a60ea2d3c96 /include/image.h
parent665291e693efd1fd2955c6f8bfb89956711b0aef (diff)
downloadbarebox-8881fb7984fb86469e0e66b88d8230be347e21f9.tar.gz
barebox-8881fb7984fb86469e0e66b88d8230be347e21f9.tar.xz
use memmap() to save one memcpy call in bootm
Diffstat (limited to 'include/image.h')
-rw-r--r--include/image.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/image.h b/include/image.h
index 5d744beb6b..648e9d6bed 100644
--- a/include/image.h
+++ b/include/image.h
@@ -180,6 +180,13 @@ typedef struct image_header {
uint8_t ih_name[IH_NMLEN]; /* Image Name */
} image_header_t;
+struct image_handle {
+ image_header_t header;
+ void *data;
+#define IH_MALLOC 1
+ int flags;
+};
+
/* commamds/bootm.c */
void print_image_hdr (image_header_t *hdr);
@@ -187,12 +194,12 @@ void print_image_hdr (image_header_t *hdr);
* Load an image into memory. Returns a pointer to the loaded
* image.
*/
-image_header_t *map_image(const char *filename, int verify);
+struct image_handle *map_image(const char *filename, int verify);
/*
* Relocate an image to load_address by uncompressing
* or just copying.
*/
-int relocate_image(image_header_t *hdr, void *load_address);
+int relocate_image(struct image_handle *handle, void *load_address);
#endif /* __IMAGE_H__ */