Skip to contentSkip to conversation

Fix where the #ifdef CFG_BOOTMAPSZ is placed.

PATCH New Jerry Van Baren 1 participant 1 message Aug 15, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix where the #ifdef CFG_BOOTMAPSZ is placed.

Commit 073e1b509980cefe6f53c2d7fbbcd135df1e3924 "Fix initrd/dtb interaction" put the new code outside of the #if defined(CONFIG_OF_LIBFDT) when it should have gone inside of the conditional. As a result, it broke non-LIBFDT board builds.

Also added a missing "not." to the comment.

---

Fix the bug noted by Stefan Roese (introduced by the patch from Andy).

 common/cmd_bootm.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
common/cmd_bootm.c +3 -2
index 8249dce..df1d038 100644
@@ -924,16 +924,17 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
 		initrd_end = 0;
 	}
 
+#if defined(CONFIG_OF_LIBFDT)
+
 #ifdef CFG_BOOTMAPSZ
 	/*
 	 * The blob must be within CFG_BOOTMAPSZ,
-	 * so we flag it to be copied if it is
+	 * so we flag it to be copied if it is not.
 	 */
 	if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
 		of_data = of_flat_tree;
 #endif
 
-#if defined(CONFIG_OF_LIBFDT)
 	/* move of_flat_tree if needed */
 	if (of_data) {
 		int err;
Signature · 1 line
1.4.4.4