[U-Boot] [PATCH V3] bugfix: image header pointer change.
Baidu Boy
liucai.lfn at gmail.com
Sun Nov 28 02:33:09 CET 2010
This patch is to avoid potential issue when we still use the pointer
images->legacy_hdr_os after the kernel un-compressed.
in function boot_get_kernel():
we should let the images->legacy_hdr_os point to the new copied image header,
not the original image header in uImage which may be over-written in
the kernel un-compressed process. This is a potential problem.
Signed-off-by: Baidu Boy <liucai.lfn at gmail.com>
---
changes for V2:
- Avoid unrelated syntax changes
changes for V3:
- Add some description for this patch.
common/cmd_bootm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 1a024f1..8f9e5f1 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -896,7 +896,7 @@ 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);
--
1.7.3.1.msysgit.0
More information about the U-Boot
mailing list