From b9b50e89d317c58becd0e2d7fac2e21e3a81dd0a Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 10 Nov 2011 13:17:53 -0700 Subject: image: Implement IH_TYPE_KERNEL_NOLOAD The legacy uImage format includes an absolute load and entry-point address. When bootm operates on a kernel uImage in memory that isn't loaded at the address in the image's load address, U-Boot will copy the image to its address in the header. Some kernel images can actually be loaded and used at any arbitrary address. An example is an ARM Linux kernel zImage file. To represent this capability, IH_TYPE_KERNEL_NOLOAD is implemented, which operates just like IH_TYPE_KERNEL, except that the load address header is ignored, and U-Boot does not copy the image to its load address, but rather uses it in-place. This is useful when sharing a single (uImage-wrapped) zImage across multiple boards with different memory layouts; in this case, a specific load address need not be picked when creating the uImage, but instead is selected by the board-specific U-Boot environment used to load and boot that image. v2: Rename from IH_TYPE_KERNEL_ANYLOAD to IH_TYPE_KERNEL_NOLOAD. Signed-off-by: Stephen Warren Signed-off-by: Stefan Roese --- tools/default_image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/default_image.c b/tools/default_image.c index 6ea3b46..e9d0729 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -35,7 +35,8 @@ static image_header_t header; static int image_check_image_types(uint8_t type) { - if ((type > IH_TYPE_INVALID) && (type < IH_TYPE_FLATDT)) + if (((type > IH_TYPE_INVALID) && (type < IH_TYPE_FLATDT)) || + (type == IH_TYPE_KERNEL_NOLOAD)) return EXIT_SUCCESS; else return EXIT_FAILURE; -- cgit v1.1