[U-Boot-Users] fw_printenv

David Byron dbyron at hheld.com
Tue Sep 12 00:11:36 CEST 2006


I'm trying to build fw_printenv from the head of git and I'm running into
trouble.  I think there are some basic things I don't understand.

I want to run fw_printenv on my target, so I define CROSS_COMPILE to arm-linux-.
So far so good.

I see that defining USE_HOSTCC keeps crc32.c from including common.h which is
important, but the name of the preprocessor symbol seems a bit strange since I'm
cross compiling.

Even when I define USE_HOSTCC, I'm still running into errors.

Isn't it important to point the compiler to my kernel's include directory,
recognizing that the kernel on my development machine is likely different than
the kernel on my target?

When I did that (and changed fw_env.c to #include <mtd/mtd-user.h> since it's a
userspace program), I still get one more error....that arm-linux-gcc can't find
zlib.h.  Instead of depending on the cross compiler to be able to find zlib.h,
why not just use the copy in u-boot's include directory?  After that change,
fw_printenv compiles and links for me, and when I configure it properly, both
reading and writing work fine on my target.

I also made some other small changes to

- not build .depend when cleaning
- remove .depend when cleaning
- to hard code TOPDIR to ../.. since the Makefile lives in tools/env.

Here's a patch with the changes I've made.  Do they make sense?

Thanks for your comments.

-DB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fw_printenv.patch
Type: application/octet-stream
Size: 1433 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060911/a594e34f/attachment.obj 


More information about the U-Boot mailing list