Skip to contentSkip to conversation

common/fdt_support.c: fix compile error

PATCH Superseded Matthew McClintock 4 participants 6 messages Oct 12, 2010 – Oct 13, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/fdt_support.c: fix compile error

Fix build error introduced in beca5a5f5bf0d88125580e5e9c1730469cd50ab8

common/libcommon.a(fdt_support.o): In function `fdt_add_edid':
/local/hudson/jobs/mirrors-u-boot.git/workspace/common/fdt_support.c:1205: undefined reference to `fdt_increase_size'
make: *** [u-boot] Error 1

---
 common/fdt_support.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/fdt_support.c +1 -1
index 9b65a8a..cb0ad3b 100644
@@ -1190,7 +1190,7 @@ int fdt_alloc_phandle(void *blob)
 	return phandle + 1;
 }
 
-#if defined(CONFIG_VIDEO)
+#if defined(CONFIG_VIDEO) && defined(CONFIG_FDT_FIXUP_PARTITIONS)
 int fdt_add_edid(void *blob, const char *compat, unsigned char *edid_buf)
 {
 	int noff;
Signature · 1 line
1.6.6.1
#1 lore raw

PATCH 1/1 common/fdt_support.c: fix compile error

Quoted 16 lines · On Tue, 12 Oct 2010 17:25:59 -0500 Matthew McClintock <[email protected]> wrote:

Fix build error introduced in beca5a5f5bf0d88125580e5e9c1730469cd50ab8

common/libcommon.a(fdt_support.o): In function `fdt_add_edid':
/local/hudson/jobs/mirrors-u-boot.git/workspace/common/fdt_support.c:1205: undefined reference to `fdt_increase_size'
make: *** [u-boot] Error 1

---
 common/fdt_support.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/fdt_support.c +0 -0
index 9b65a8a..cb0ad3b 100644

common/fdt_support.c int fdt_alloc_phandle(void *blob) · line 1196

Quoted 8 lines
common/fdt_support.c +1 -1
@@ -1190,7 +1190,7 @@ int fdt_alloc_phandle(void *blob)
 	return phandle + 1;
 }
 
-#if defined(CONFIG_VIDEO)
+#if defined(CONFIG_VIDEO) && defined(CONFIG_FDT_FIXUP_PARTITIONS)
 int fdt_add_edid(void *blob, const char *compat, unsigned char *edid_buf)
 {
 	int noff;

What does this have to do with MTD partitions?

fdt_increase_size() should be moved out of that ifdef.

-Scott

#2 lore raw

PATCH v2 1/1 common/fdt_support.c: fix compile error

Fix build error introduced in beca5a5f5bf0d88125580e5e9c1730469cd50ab8

common/libcommon.a(fdt_support.o): In function `fdt_add_edid':
/local/hudson/jobs/mirrors-u-boot.git/workspace/common/fdt_support.c:1205: undefined reference to `fdt_increase_size'
make: *** [u-boot] Error 1

---
v2 - move fdt_increase_size out of CONFIG_FDT_FIXUP_PARTITIONS

  common/fdt_support.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
common/fdt_support.c +10 -10
index 9b65a8a..46e93a2 100644
@@ -701,16 +701,6 @@ int fdt_del_subnodes(const void *blob, int parent_offset)
 	return 0;
 }
 
-int fdt_increase_size(void *fdt, int add_len)
-{
-	int newlen;
-
-	newlen = fdt_totalsize(fdt) + add_len;
-
-	/* Open in place with a new len */
-	return fdt_open_into(fdt, fdt, newlen);
-}
-
 int fdt_del_partitions(void *blob, int parent_offset)
 {
 	const void *prop;
@@ -886,6 +876,16 @@ void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size)
 }
 #endif
 
+int fdt_increase_size(void *fdt, int add_len)
+{
+	int newlen;
+
+	newlen = fdt_totalsize(fdt) + add_len;
+
+	/* Open in place with a new len */
+	return fdt_open_into(fdt, fdt, newlen);
+}
+
 void fdt_del_node_and_alias(void *blob, const char *alias)
 {
 	int off = fdt_path_offset(blob, alias);
Signature · 1 line
1.6.6.1
#3 lore raw

PATCH v2 1/1 common/fdt_support.c: fix compile error

Hi Matthew,

Quoted 6 lines · On Tue, 12 Oct 2010 17:42:57 -0500 Matthew McClintock <[email protected]> wrote:

Fix build error introduced in beca5a5f5bf0d88125580e5e9c1730469cd50ab8

common/libcommon.a(fdt_support.o): In function `fdt_add_edid':
/local/hudson/jobs/mirrors-u-boot.git/workspace/common/fdt_support.c:1205:
undefined reference to `fdt_increase_size' make: *** [u-boot] Error 1

Quoted 6 lines

---
v2 - move fdt_increase_size out of CONFIG_FDT_FIXUP_PARTITIONS

  common/fdt_support.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

Thanks for fixing this. Unfortunately there is still a warning when compiling for boards defining CONFIG_FDT_FIXUP_PARTITIONS. I'll submit v3 patch to fix this.

Thanks again and sorry for the breakage.
Anatolij

#4 lore raw

PATCH v3 1/1 common/fdt_support.c: fix compile error

In reply to Matthew McClintock

From: Matthew McClintock <[email protected]>

Fix build error introduced in beca5a5f5bf0d88125580e5e9c1730469cd50ab8

common/libcommon.a(fdt_support.o): In function `fdt_add_edid':
/local/hudson/jobs/mirrors-u-boot.git/workspace/common/fdt_support.c:1205: undefined reference to `fdt_increase_size'
make: *** [u-boot] Error 1

---
v3:
- move fdt_increase_size() before conditionally compiled code which uses this function. This is needed to fix warnings while compiling for pdm360ng board.

 common/fdt_support.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
common/fdt_support.c +10 -10
index 9b65a8a..b8a3dc9 100644
@@ -667,6 +667,16 @@ int fdt_fixup_nor_flash_size(void *blob)
 }
 #endif
 
+int fdt_increase_size(void *fdt, int add_len)
+{
+	int newlen;
+
+	newlen = fdt_totalsize(fdt) + add_len;
+
+	/* Open in place with a new len */
+	return fdt_open_into(fdt, fdt, newlen);
+}
+
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
 #include <jffs2/load_kernel.h>
 #include <mtd_node.h>
@@ -701,16 +711,6 @@ int fdt_del_subnodes(const void *blob, int parent_offset)
 	return 0;
 }
 
-int fdt_increase_size(void *fdt, int add_len)
-{
-	int newlen;
-
-	newlen = fdt_totalsize(fdt) + add_len;
-
-	/* Open in place with a new len */
-	return fdt_open_into(fdt, fdt, newlen);
-}
-
 int fdt_del_partitions(void *blob, int parent_offset)
 {
 	const void *prop;
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH v3 1/1 common/fdt_support.c: fix compile error

Dear Anatolij Gustschin,

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

From: Matthew McClintock <[email protected]>

Fix build error introduced in beca5a5f5bf0d88125580e5e9c1730469cd50ab8

common/libcommon.a(fdt_support.o): In function `fdt_add_edid':
/local/hudson/jobs/mirrors-u-boot.git/workspace/common/fdt_support.c:1205: undefined reference to `fdt_increase_size'
make: *** [u-boot] Error 1

Quoted 8 lines

---
v3:
- move fdt_increase_size() before conditionally compiled code which uses this function. This is needed to fix warnings while compiling for pdm360ng board.

 common/fdt_support.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 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
You cannot propel yourself forward by patting yourself on the back.