Skip to contentSkip to conversation

Fix build issue on ARM

PATCH New Kumar Gala 2 participants 2 messages Mar 5, 2008 – Mar 25, 2008

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 Fix build issue on ARM

ARM platforms don't have a bd->bi_memsize so use bd->bi_dram[0].size instead.

---

Let's see if this fixes the issue on ARM.

 common/image.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
common/image.c +7 -1
index 9e446fa..4e0e96d 100644
@@ -140,8 +140,10 @@ ulong getenv_bootm_low(void)
 		return tmp;
 	}
 
-#ifdef CFG_SDRAM_BASE
+#if defined(CFG_SDRAM_BASE)
 	return CFG_SDRAM_BASE;
+#elif defined(CONFIG_ARM)
+	return gd->bd->bi_dram[0].start;
 #else
 	return 0;
 #endif
@@ -155,7 +157,11 @@ ulong getenv_bootm_size(void)
 		return tmp;
 	}
 
+#if defined(CONFIG_ARM)
+	return gd->bd->bi_dram[0].size;
+#else
 	return gd->bd->bi_memsize;
+#endif
 }
 
 void memmove_wd (void *to, void *from, size_t len, ulong chunksz)
Signature · 1 line
1.5.4.1
#1 lore raw

PATCH 1/1 Fix build issue on ARM

Quoted 15 lines · In message <[email protected]> you wrote:

ARM platforms don't have a bd->bi_memsize so use bd->bi_dram[0].size instead.

---

Let's see if this fixes the issue on ARM.

 common/image.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
common/image.c +0 -0
index 9e446fa..4e0e96d 100644

common/image.c ulong getenv_bootm_low(void) · line 146

Quoted 8 lines
common/image.c +3 -1
@@ -140,8 +140,10 @@ ulong getenv_bootm_low(void)
 		return tmp;
 	}
 
-#ifdef CFG_SDRAM_BASE
+#if defined(CFG_SDRAM_BASE)
 	return CFG_SDRAM_BASE;
+#elif defined(CONFIG_ARM)
+	return gd->bd->bi_dram[0].start;

But this part of the patch is not mentioned in the description, and I don't think it's necessary (nor necessarily correct).

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There's another way to survive.  Mutual trust -- and help.
	-- Kirk, "Day of the Dove", stardate unknown