Skip to contentSkip to conversation

ppc: cleanup compilererrors/warnings

PATCH New Heiko Schocher 3 participants 6 messages Mar 24, 2009 – Mar 29, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc: cleanup compilererrors/warnings

Hello Mike,

actual u-boot top of tree builds with warnings/errors for the following boards:

ads5121 cpci5200 mecp5200 v38b IAD210 MBX MBX860T NX823 RPXClassic debris PN62

following patch solves it for:

ads5121, cpci5200, mecp5200, NX823, debris and PN62

---

but for the remaining boards MAKEALL drops the error:
(example for v38b board)

Configuring for v38b board...
v38b.c: In function 'misc_init_r':
v38b.c:234: warning: implicit declaration of function 'eth_putenv_enetaddr' board/v38b/libv38b.a(v38b.o): In function `misc_init_r':
/home/hs/i2c/u-boot-i2c/board/v38b/v38b.c:234: undefined reference to `eth_putenv_enetaddr'
make: *** [u-boot] Fehler 1
ppc_82xx-size: './u-boot': No such file

I could not find "eth_putenv_enetaddr" in code ...

[hs at pollux u-boot-i2c]$ grep -lr eth_putenv_enetaddr . ./board/RPXClassic/RPXClassic.c
./board/mbx8xx/mbx8xx.c
./board/sandburst/karef/karef.c ./board/sandburst/metrobox/metrobox.c ./board/siemens/IAD210/IAD210.c
./board/v38b/v38b.c
./board/xpedite1k/xpedite1k.c
grep: ./include/asm-ppc/arch: Datei oder Verzeichnis nicht gefunden
grep: ./include/asm/arch: Datei oder Verzeichnis nicht gefunden

Mike can you help?

 board/RPXClassic/RPXClassic.c |    1 +
 board/etin/debris/debris.c    |    1 +
 board/mbx8xx/mbx8xx.c         |    1 +
 board/nx823/nx823.c           |    5 +++--
 board/pn62/pn62.c             |    1 +
 board/siemens/IAD210/IAD210.c |    1 +
 board/sixnet/sixnet.c         |    3 ---
 board/v38b/v38b.c             |    1 +
 common/cmd_elf.c              |    4 ++--
 cpu/mpc512x/cpu.c             |    1 +
 include/configs/MBX860T.h     |    1 +
 11 files changed, 13 insertions(+), 7 deletions(-)
board/RPXClassic/RPXClassic.c +1 -0
index 5aa713f..4409066 100644
@@ -30,6 +30,7 @@
 #include <i2c.h>
 #include <config.h>
 #include <mpc8xx.h>
+#include <net.h>
 
 /* ------------------------------------------------------------------------- */
 
board/etin/debris/debris.c +1 -0
index a971af3..33efe16 100644
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <mpc824x.h>
+#include <net.h>
 #include <pci.h>
 #include <i2c.h>
 #include <netdev.h>
board/mbx8xx/mbx8xx.c +1 -0
index a3bf1f7..138d883 100644
@@ -34,6 +34,7 @@
 #include <common.h>
 #include <commproc.h>
 #include <mpc8xx.h>
+#include <net.h>
 #include "dimm.h"
 #include "vpd.h"
 #include "csr.h"
board/nx823/nx823.c +2 -1
index 6ec29dc..15bb2d8 100644
@@ -27,6 +27,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <mpc8xx.h>
+#include <net.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -366,7 +367,7 @@ int misc_init_r (void)
 	char tmp[50];
 	uchar ethaddr[6];
 	bd_t *bd = gd->bd;
-	ulong my_sernum = bd->bi_sernum;
+	ulong *my_sernum = (unsigned long *)&bd->bi_sernum;
 
 	/* load unique serial number */
 	for (i = 0; i < 8; ++i)
board/pn62/pn62.c +1 -0
index 53d7e57..676f8d3 100644
@@ -22,6 +22,7 @@
 
 #include <common.h>
 #include <mpc824x.h>
+#include <net.h>
 #include <pci.h>
 #include <netdev.h>
 
board/siemens/IAD210/IAD210.c +1 -0
index 67e5c8f..ce861f1 100644
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <mpc8xx.h>
+#include <net.h>
 #include "atm.h"
 #include <i2c.h>
 
board/sixnet/sixnet.c +0 -3
index 4fcd84b..6e39b01 100644
@@ -260,9 +260,6 @@ int misc_init_r (void)
 {
 	volatile immap_t     *immap = (immap_t *)CONFIG_SYS_IMMR;
 	volatile memctl8xx_t *memctl = &immap->im_memctl;
-	char* s;
-	char* e;
-	int reg;
 	bd_t *bd = gd->bd;
 	uchar enetaddr[6];
 
board/v38b/v38b.c +1 -0
index 9e7c1d7..e2bf67c 100644
@@ -26,6 +26,7 @@
 
 #include <common.h>
 #include <mpc5xxx.h>
+#include <net.h>
 #include <asm/processor.h>
 
 
common/cmd_elf.c +2 -2
index 4a3fff1..83e7589 100644
@@ -131,11 +131,11 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 #if defined(CONFIG_WALNUT)
 	tmp = (char *) CONFIG_SYS_NVRAM_BASE_ADDR + 0x500;
-	eth_getenv_enetaddr("ethaddr", build_buf);
+	eth_getenv_enetaddr("ethaddr", (uchar *)build_buf);
 	memcpy(tmp, &build_buf[3], 3);
 #elif defined(CONFIG_SYS_VXWORKS_MAC_PTR)
 	tmp = (char *) CONFIG_SYS_VXWORKS_MAC_PTR;
-	eth_getenv_enetaddr("ethaddr", build_buf);
+	eth_getenv_enetaddr("ethaddr", (uchar *)build_buf);
 	memcpy(tmp, build_buf, 6);
 #else
 	puts ("## Ethernet MAC address not copied to NV RAM\n");
cpu/mpc512x/cpu.c +1 -0
index be532af..8021bc1 100644
@@ -30,6 +30,7 @@
 #include <common.h>
 #include <command.h>
 #include <mpc512x.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/processor.h>
 
include/configs/MBX860T.h +1 -0
index 0c28710..afe2383 100644
@@ -381,6 +381,7 @@
 */
 #define NR_8259_INTS	0
 
+#define CONFIG_CMD_NET
 /*
  * MPC8xx CPM Options
  */
Signature · 5 lines
1.6.0.6

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#1 lore raw

PATCH 1/1 ppc: cleanup compilererrors/warnings

Quoted 9 lines · On Tuesday 24 March 2009 06:52:38 Heiko Schocher wrote:

actual u-boot top of tree builds with warnings/errors for the following boards:

ads5121 cpci5200 mecp5200 v38b IAD210 MBX MBX860T NX823 RPXClassic debris PN62

following patch solves it for:

ads5121, cpci5200, mecp5200, NX823, debris and PN62

looks straight forward to me. but i dont know anything about ppc boards ... -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090324/9d122b01/attachment-0001.pgp

#2 lore raw

PATCH 1/1 ppc: cleanup compilererrors/warnings

Hello Mike,

Quoted 7 lines · Mike Frysinger
Quoted 6 lines · On Tuesday 24 March 2009 06:52:38 Heiko Schocher wrote:

actual u-boot top of tree builds with warnings/errors for the following boards:

ads5121 cpci5200 mecp5200 v38b IAD210 MBX MBX860T NX823 RPXClassic debris PN62

Quoted 6 lines
Quoted 3 lines

following patch solves it for:

ads5121, cpci5200, mecp5200, NX823, debris and PN62

looks straight forward to me. but i dont know anything about ppc boards ... -mike

Hmm... the compilererrors I solved seems OK to me too, but I don;t know where to find the missing function for example for the v38b board:

configuring for v38b board...
v38b.c: In function 'misc_init_r':
v38b.c:234: warning: implicit declaration of function 'eth_putenv_enetaddr' board/v38b/libv38b.a(v38b.o): In function `misc_init_r':
/home/hs/i2c/u-boot-i2c/board/v38b/v38b.c:234: undefined reference to `eth_putenv_enetaddr'
make: *** [u-boot] Fehler 1
ppc_82xx-size: './u-boot': No such file

because you introduced this function for example for the v38b board in commit "d8d21e699d7fcfb6ab11635110266dd09b7edc62" I thought you can help me ... maybe a

s/eth_putenv_enetaddr/eth_setenv_enetaddr

is OK?

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#3 lore raw

PATCH 1/1 ppc: cleanup compilererrors/warnings

Quoted 11 lines · On Wednesday 25 March 2009 02:37:54 Heiko Schocher wrote:

Hmm... the compilererrors I solved seems OK to me too, but I don;t know where to find the missing function for example for the v38b board:

configuring for v38b board...
v38b.c: In function 'misc_init_r':
v38b.c:234: warning: implicit declaration of function 'eth_putenv_enetaddr' board/v38b/libv38b.a(v38b.o): In function `misc_init_r':
/home/hs/i2c/u-boot-i2c/board/v38b/v38b.c:234: undefined reference to `eth_putenv_enetaddr' make: *** [u-boot] Fehler 1
ppc_82xx-size: './u-boot': No such file

Quoted 7 lines

because you introduced this function for example for the v38b board in commit "d8d21e699d7fcfb6ab11635110266dd09b7edc62" I thought you can help me ... maybe a

s/eth_putenv_enetaddr/eth_setenv_enetaddr

is OK?

ugh, yes. we we want "setenv", not "putenv". i thought i did a scan to make sure i didnt make that typo, but i guess i still missed a few :/. -mike

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090325/63d4bb40/attachment.pgp

#4 lore raw

PATCH 1/1 ppc: cleanup compilererrors/warnings

In reply to Heiko Schocher

Dear Heiko,

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

actual u-boot top of tree builds with warnings/errors for the following boards:

ads5121 cpci5200 mecp5200 v38b IAD210 MBX MBX860T NX823 RPXClassic debris PN62

following patch solves it for:

ads5121, cpci5200, mecp5200, NX823, debris and PN62

Hm... I did not observe build isses with these boards:

./MAKEALL ads5121 cpci5200 mecp5200 v38b IAD210 MBX MBX860T NX823 RPXClassic debris PN62 Configuring for ads5121 board...
text data bss dec hex filename
222216 12936 31028 266180 40fc4 /work/wd/tmp-ppc/u-boot
Configuring for cpci5200 board...
text data bss dec hex filename
183972 11652 217860 413484 64f2c /work/wd/tmp-ppc/u-boot
Configuring for mecp5200 board...
text data bss dec hex filename
167656 11064 218844 397564 610fc /work/wd/tmp-ppc/u-boot
Configuring for v38b board...
text data bss dec hex filename
219128 14296 280832 514256 7d8d0 /work/wd/tmp-ppc/u-boot
Configuring for IAD210 board...
text data bss dec hex filename
163156 7604 21892 192652 2f08c /work/wd/tmp-ppc/u-boot
Configuring for MBX board...
text data bss dec hex filename
101844 5972 17276 125092 1e8a4 /work/wd/tmp-ppc/u-boot
Configuring for MBX860T board...
text data bss dec hex filename
89244 5152 17432 111828 1b4d4 /work/wd/tmp-ppc/u-boot
Configuring for NX823 board...
text data bss dec hex filename
118856 7104 21140 147100 23e9c /work/wd/tmp-ppc/u-boot
Configuring for RPXClassic board...
text data bss dec hex filename
133384 26964 21052 181400 2c498 /work/wd/tmp-ppc/u-boot
Configuring for debris board...
text data bss dec hex filename
179776 11256 38868 229900 3820c /work/wd/tmp-ppc/u-boot
Configuring for PN62 board...
text data bss dec hex filename
128728 8176 18900 155804 2609c /work/wd/tmp-ppc/u-boot

Under which conditions do you see these errors?

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
Experience is what causes a person to make new  mistakes  instead  of
old ones.
#5 lore raw

PATCH 1/1 ppc: cleanup compilererrors/warnings

Dear Heiko,

Quoted 2 lines · In message <[email protected]> I wrote:

Hm... I did not observe build isses with these boards:

H. no big surprise *after* applying yoru patch.

Sorry for the confusion. Seems I'm not completely of sound mind and disposing memory any more. Or have I ever been? ;-)

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
Many Myths are based on truth
	-- Spock, "The Way to Eden",  stardate 5832.3