Skip to contentSkip to conversation

Fix problem with get/setdcr commands introduced by cfg patches

U-Boot-Users Stefan Roese 4 participants 7 messages Jul 6, 2007 – Jul 11, 2007 Networking

lore
Share & tools
lore
#0 lore raw

---
commit 981ee564aeea50072d23045b88918df73bb8dc37
tree 3a2d693997fad34fd049a56518dbb44195342392
parent e4dbe1b215f5c6c462e76909d240bd96472b84de
author Stefan Roese <[email protected]> Fri, 06 Jul 2007 09:43:55 +0200 committer Stefan Roese <[email protected]> Fri, 06 Jul 2007 09:43:55 +0200

 cpu/ppc4xx/dcr.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
cpu/ppc4xx/dcr.S +1 -1
index 7102364..554db1b 100644
@@ -22,7 +22,7 @@
  */
 #include <config.h>
 
-#if defined(CONFIG_4xx) && defined(CFG_CMD_SETGETDCR)
+#if defined(CONFIG_4xx) && ((CONFIG_COMMANDS & CFG_CMD_SETGETDCR) || defined(CONFIG_CMD_SETGETDCR))
 
 #include <ppc4xx.h>
#1 lore raw
Quoted 1 line · In message <[email protected]> you wrote:

Applied to u-boot-testing

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
It would be illogical to assume that all conditions remain stable
	-- Spock, "The Enterprise" Incident", stardate 5027.3
#2 lore raw
In reply to Stefan Roese

So, like, the other day Stefan Roese mumbled:

Quoted 9 lines
 cpu/ppc4xx/dcr.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
cpu/ppc4xx/dcr.S +0 -0
index 7102364..554db1b 100644

cpu/ppc4xx/dcr.S line 28

Quoted 8 lines
cpu/ppc4xx/dcr.S +1 -1
@@ -22,7 +22,7 @@
  */
 #include <config.h>
 
-#if defined(CONFIG_4xx) && defined(CFG_CMD_SETGETDCR)
+#if defined(CONFIG_4xx) && ((CONFIG_COMMANDS & CFG_CMD_SETGETDCR) || defined(CONFIG_CMD_SETGETD
 CR))
 
 #include <ppc4xx.h>

Sorry about that.

Hmmm... Something is fishy here if this is a problem...

While the above is a valid (temporary) "fix", I think rather than re-introducing this clause:

(CONFIG_COMMANDS & CFG_CMD_SETGETDCR)

a better (long term) solution is to try and figure out why CONFIG_CMD_SETGETDCR isn't available. The goal is to eliminate the CONFIG_COMMAND symbol, so we should be able to compile this file without it.

My guesses off the top of my head:

1) I blitzed CONFIG_CMD_SETGETDCR in the 4xx.h config file
2) The 4xx board config file isn't being included here
3) Interaction with a .S file
4) Some secondary #include effect making config_cmd_default.h be not included

Please let me know if I can further here.

HTH,
jdl

#3 lore raw
Quoted 7 lines · Jon Loeliger
Quoted 5 lines
(quoted diff) +1 -1
-#if defined(CONFIG_4xx) && defined(CFG_CMD_SETGETDCR)
+#if defined(CONFIG_4xx) && ((CONFIG_COMMANDS & CFG_CMD_SETGETDCR) ||

defined(CONFIG_CMD_SETGETD CR))

#include <ppc4xx.h>

Sorry about that.

No problem.

Quoted 11 lines

Hmmm... Something is fishy here if this is a problem...

While the above is a valid (temporary) "fix", I think rather than re-introducing this clause:

(CONFIG_COMMANDS & CFG_CMD_SETGETDCR)

a better (long term) solution is to try and figure out why CONFIG_CMD_SETGETDCR isn't available. The goal is to eliminate the CONFIG_COMMAND symbol, so we should be able to compile this file without it.

I have no problems with just using:

#if defined(CONFIG_4xx) && defined(CONFIG_CMD_SETGETDCR)

here. But we had:

#if defined(CONFIG_4xx) && defined(CFG_CMD_SETGETDCR)

So this couldn't work.

Quoted 9 lines

My guesses off the top of my head:

1) I blitzed CONFIG_CMD_SETGETDCR in the 4xx.h config file
2) The 4xx board config file isn't being included here
3) Interaction with a .S file
4) Some secondary #include effect making config_cmd_default.h be not included

Please let me know if I can further here.

Feel free to clean this up with your next patchset.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#4 lore raw

So, like, the other day Stefan Roese mumbled:

Quoted 8 lines

I have no problems with just using:

#if defined(CONFIG_4xx) && defined(CONFIG_CMD_SETGETDCR)

here. But we had:

#if defined(CONFIG_4xx) && defined(CFG_CMD_SETGETDCR)

D'oh. That's just my brain-damage and late night drinking. :-)

You are in a twisty maze of #defines all alike...

Quoted 1 line

So this couldn't work.

I'll bet not...

Quoted 1 line

Feel free to clean this up with your next patchset.

Will do!

jdl

#5 lore raw

[U-Boot-Users] Fix some compile problems introduced by the latest CFG_CMD_xxx cleanup

In reply to Stefan Roese

---
commit 21b5c73cf1edfe437ddd7df0c4829063600d03ea
tree 2bf23095eebda168b3e4c7e3f4ad7f686342614d
parent e9514751cfa5cce61ea699fa0d3eb37898a5eeb5
author Stefan Roese <[email protected]> Wed, 11 Jul 2007 12:12:25 +0200 committer Stefan Roese <[email protected]> Wed, 11 Jul 2007 12:12:25 +0200

 common/cmd_flash.c  |    2 +-
 common/cmd_nvedit.c |    5 ++---
 drivers/macb.c      |    2 +-
 net/nfs.c           |    3 +--
 net/sntp.c          |    3 +--
 5 files changed, 6 insertions(+), 9 deletions(-)
common/cmd_flash.c +1 -1
index db38f94..11c8857 100644
@@ -33,7 +33,7 @@
 
 #if defined(CONFIG_CMD_FLASH)
 
-#if (defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
 #include <jffs2/jffs2.h>
 
 /* parition handling routines */
common/cmd_nvedit.c +2 -3
index e313f2c..de5a514 100644
@@ -538,7 +538,7 @@ int getenv_r (char *name, char *buf, unsigned len)
 	return (-1);
 }
 
-#if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) || \
+#if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) \
     || (defined(CONFIG_CMD_ENV) && defined(CONFIG_CMD_FLASH)) \
     || (defined(CONFIG_CMD_ENV) && defined(CONFIG_CMD_NAND))
 int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -550,7 +550,6 @@ int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	return (saveenv() ? 1 : 0);
 }
 
-
 #endif
 
 
@@ -594,7 +593,7 @@ U_BOOT_CMD(
 	"    - delete environment variable 'name'\n"
 );
 
-#if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) || \
+#if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) \
     || (defined(CONFIG_CMD_ENV) && defined(CONFIG_CMD_FLASH)) \
     || (defined(CONFIG_CMD_ENV) && defined(CONFIG_CMD_NAND))
 U_BOOT_CMD(
drivers/macb.c +1 -1
index ffb5f74..bf7853a 100644
@@ -18,7 +18,7 @@
 #include <common.h>
 
 #if defined(CONFIG_MACB) \
-	&& (defined(CONFIG_CMD_NET) || defined(CONFIG_CMD_MII)))
+	&& (defined(CONFIG_CMD_NET) || defined(CONFIG_CMD_MII))
 
 /*
  * The u-boot networking stack is a little weird.  It seems like the
net/nfs.c +1 -2
index 30a897d..df2caac 100644
@@ -31,8 +31,7 @@
 
 /*#define NFS_DEBUG*/
 
-#if (defined(CONFIG_CMD_NET) \
-    && defined(CONFIG_CMD_NFS)
+#if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_NFS)
 
 #define HASHES_PER_LINE 65	/* Number of "loading" hashes per line	*/
 #define NFS_TIMEOUT 60
net/sntp.c +1 -2
index 0a7f478..95e7542 100644
@@ -12,8 +12,7 @@
 
 #include "sntp.h"
 
-#if (defined(CONFIG_CMD_NET) \
-    && defined(CONFIG_CMD_SNTP)
+#if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_SNTP)
 
 #define SNTP_TIMEOUT 10