[U-Boot-Users] [PATCH 09/13] [new uImage] Fix FDT header verification in PPC do_boot_linux() routine

Marian Balakowicz m8 at semihalf.com
Fri Jan 11 15:29:55 CET 2008


Signed-off-by: Marian Balakowicz <m8 at semihalf.com>
---

 lib_ppc/ppc_linux.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/lib_ppc/ppc_linux.c b/lib_ppc/ppc_linux.c
index 1013f9e..732f1f3 100644
--- a/lib_ppc/ppc_linux.c
+++ b/lib_ppc/ppc_linux.c
@@ -264,9 +264,9 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
 		of_flat_tree = (char *) simple_strtoul(argv[3], NULL, 16);
 		hdr = (image_header_t *)of_flat_tree;
 #if defined(CONFIG_OF_FLAT_TREE)
-		if (*((ulong *)(of_flat_tree + image_get_header_size())) != OF_DT_HEADER) {
+		if (*((ulong *)(of_flat_tree)) == OF_DT_HEADER) {
 #elif defined(CONFIG_OF_LIBFDT)
-		if (fdt_check_header(of_flat_tree + image_get_header_size()) != 0) {
+		if (fdt_check_header(of_flat_tree) == 0) {
 #endif
 #ifndef CFG_NO_FLASH
 			if (addr2info((ulong)of_flat_tree) != NULL)





More information about the U-Boot mailing list