]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
[new uImage] Fix FDT header verification in PPC do_boot_linux() routine
authorMarian Balakowicz <m8@semihalf.com>
Tue, 8 Jan 2008 17:11:44 +0000 (18:11 +0100)
committerWolfgang Denk <wd@denx.de>
Thu, 7 Feb 2008 00:12:56 +0000 (01:12 +0100)
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
lib_ppc/ppc_linux.c

index 4e7734ccd3923c275147f17eb752cd1fed2f5598..671673fcb87afbb0e8adfc00da583a46783e02c0 100644 (file)
@@ -265,9 +265,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)