All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] U-boot-1.3.3-rc2 and 'tools/env/fw_printenv' Compilation Error
@ 2008-05-06 22:00 Grant Erickson
  0 siblings, 0 replies; only message in thread
From: Grant Erickson @ 2008-05-06 22:00 UTC (permalink / raw)
  To: u-boot

In the current GIT top-of-tree (1.3.3-rc2) should tools/env/fw_printenv
compile and link?

Invoking the following build lines:

% CROSS_COMPILE=ppc_4xx- PATH=${PATH}:/usr/local/eldk/4.1/usr/bin make -C
/tmp/u-boot/source/ O=/tmp/u-boot/build/ TOOLSUBDIRS=env kilauea_config

% CROSS_COMPILE=ppc_4xx- PATH=${PATH}:/usr/local/eldk/4.1/usr/bin make -C
/tmp/u-boot/source/ O=/tmp/u-boot/build/ TOOLSUBDIRS=env all

results in:

...
make[2]: Entering directory `/tmp/u-boot/source/tools/env'
ppc_4xx-gcc -Wall -DUSE_HOSTCC /tmp/u-boot/build/tools/env/crc32.c  fw_env.c
fw_env_main.c -o /tmp/u-boot/build/tools/env/fw_printenv
/tmp/u-boot/build/tools/env/crc32.c:17:22: error: watchdog.h: No such file
or directory
/tmp/u-boot/build/tools/env/crc32.c:156: error: conflicting types for
'crc32'
/usr/local/eldk/4.1/usr/../ppc_4xx/usr/include/zlib.h:1244: error: previous
declaration of 'crc32' was here
make[2]: *** [/tmp/u-boot/build/tools/env/fw_printenv] Error 1
...

The watchdog.h issue could* be solved with:

- CPPFLAGS := -Wall -DUSE_HOSTCC
+ CPPFLAGS := -Wall -DUSE_HOSTCC \
+           -idirafter $(SRCTREE)/include \
+           -idirafter $(OBJTREE)/include2 \
+           -idirafter $(OBJTREE)/include

However, it's not clear this is the "Right Thing?" to do if fw_printenv is
supposed to be standalone. Alternatively, this would also work:

--- u-boot-1.3.3-rc2/lib_generic/crc32.c    2008-05-02 08:46:36.000000000
-0700
+++ u-boot-1.3.3-rc2.N/lib_generic/crc32.c    2008-05-06 14:53:20.000000000
-0700
@@ -14,7 +14,9 @@
 #include <stdint.h>
 #endif
 
+#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
 #include <watchdog.h>
+#endif
 #include "zlib.h"
 
 #define local static
---

Any insights on intended direction with the multiple crc32() prototypes?

Regards,

Grant

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-06 22:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-06 22:00 [U-Boot-Users] U-boot-1.3.3-rc2 and 'tools/env/fw_printenv' Compilation Error Grant Erickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.