From 35e7b0f1790b5e620041348aec04c1e51d9d649b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 7 May 2013 06:12:03 +0000 Subject: sandbox: image: Add support for booting images in sandbox Much of the image code uses addresses as ulongs and pointers interchangeably, casting between the two forms as needed. This doesn't work with sandbox, which has a U-Boot RAM buffer which is separate from the host machine's memory. Adjust the cost so that translating from a U-Boot address to a pointer uses map_sysmem(). This allows bootm to work correctly on sandbox. Note that there are no exhaustive tests for this code on sandbox, so it is possible that some dark corners remain. Signed-off-by: Simon Glass Reviewed-by: Marek Vasut (v1) --- include/image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/image.h') diff --git a/include/image.h b/include/image.h index aa93d9eccc..df020ff135 100644 --- a/include/image.h +++ b/include/image.h @@ -352,7 +352,7 @@ void genimg_print_time(time_t timestamp); #define IMAGE_FORMAT_LEGACY 0x01 /* legacy image_header based format */ #define IMAGE_FORMAT_FIT 0x02 /* new, libfdt based format */ -int genimg_get_format(void *img_addr); +int genimg_get_format(const void *img_addr); int genimg_has_config(bootm_headers_t *images); ulong genimg_get_image(ulong img_addr); -- cgit v1.2.1