From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Erickson Date: Tue, 06 May 2008 15:00:43 -0700 Subject: [U-Boot-Users] U-boot-1.3.3-rc2 and 'tools/env/fw_printenv' Compilation Error Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 #endif +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) #include +#endif #include "zlib.h" #define local static --- Any insights on intended direction with the multiple crc32() prototypes? Regards, Grant