]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Fix serious pointer bug with bootm and reserve map.
authorGerald Van Baren <vanbaren@cideas.com>
Fri, 20 Apr 2007 03:14:39 +0000 (23:14 -0400)
committerGerald Van Baren <vanbaren@cideas.com>
Fri, 20 Apr 2007 03:14:39 +0000 (23:14 -0400)
What was suppose to be a stack variable was declared as a pointer,
  overwriting random memory.
Also moved the libfdt.a requirement into the main Makefile.  That is
  The U-Boot Way.

Makefile
board/mpc8360emds/config.mk
common/fdt_support.c

index 9a27bc2f86432d57479dfb12763d96e6c9f589d2..94cda54c731f19e08bb04c207ca7beb8d85e8020 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -219,6 +219,7 @@ LIBS += $(shell if [ -d post/cpu/$(CPU) ]; then echo \
 LIBS += $(shell if [ -d post/board/$(BOARDDIR) ]; then echo \
        "post/board/$(BOARDDIR)/libpost$(BOARD).a"; fi)
 LIBS += common/libcommon.a
+LIBS += libfdt/libfdt.a
 LIBS += $(BOARDLIBS)
 
 LIBS := $(addprefix $(obj),$(LIBS))
index 5801a5f178448952cd5373b8e2865f042aa7e785..9ace8860cfdb742f712ab2b7db87aa3ea7fb367b 100644 (file)
@@ -26,8 +26,3 @@
 #
 
 TEXT_BASE = 0xFE000000
-
-#
-# Additional board-specific libraries
-#
-BOARDLIBS = libfdt/libfdt.a
index 91b729f37a0c77eff313eff8158926f88dfa61d4..69099c4275ccb925cce7b7c69afc5ab4f76cfe6f 100644 (file)
@@ -56,7 +56,7 @@ int fdt_chosen(void *fdt, ulong initrd_start, ulong initrd_end, int force)
        }
 
        if (initrd_start && initrd_end) {
-               struct fdt_reserve_entry *re;
+               struct fdt_reserve_entry re;
                int  used;
                int  total;
                int  j;
@@ -77,7 +77,7 @@ int fdt_chosen(void *fdt, ulong initrd_start, ulong initrd_end, int force)
                 */
                for (j = 0; j < used; j++) {
                        err = fdt_get_reservemap(fdt, j, &re);
-                       if (re->address == initrd_start) {
+                       if (re.address == initrd_start) {
                                break;
                        }
                }