[U-Boot] [PATCH] bugfix: image header pointer change.

Baidu Boy liucai.lfn at gmail.com
Sat Nov 27 00:59:42 CET 2010


images.legacy_hdr_os should point to the new copied structure,
not the original structure which may be over written.

Signed-off-by: Baidu Boy <liucai.lfn at gmail.com>
---
 common/cmd_bootm.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 1a024f1..9ad5b19 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -896,10 +896,9 @@ static void *boot_get_kernel (cmd_tbl_t *cmdtp,
int flag, int argc, char * const
 		memmove (&images->legacy_hdr_os_copy, hdr, sizeof(image_header_t));

 		/* save pointer to image header */
-		images->legacy_hdr_os = hdr;
-
+		images->legacy_hdr_os = &images->legacy_hdr_os_copy;
 		images->legacy_hdr_valid = 1;
-		show_boot_progress (6);
+		show_boot_progress (6);
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
-- 
1.7.3.1.msysgit.0


More information about the U-Boot mailing list