public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Grant Erickson <gerickson@nuovations.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] U-boot-1.3.3-rc2 and 'tools/env/fw_printenv' Compilation Error
Date: Tue, 06 May 2008 15:00:43 -0700	[thread overview]
Message-ID: <C446231B.F05C%gerickson@nuovations.com> (raw)

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

                 reply	other threads:[~2008-05-06 22:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C446231B.F05C%gerickson@nuovations.com \
    --to=gerickson@nuovations.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox