[U-Boot] FDT include file problems
Jerry Van Baren
gvb.uboot at gmail.com
Mon Oct 20 12:17:23 CEST 2008
Wolfgang Denk wrote:
> Dear Jerry Van Baren,
>
> In message <20081020031023.GA18173 at cideas.com> you wrote:
>>> ...
>>> In file included from /home/wd/git/u-boot/include/libfdt_env.h:33,
>>> from fdt.c:51:
>>> /usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel header; include <endian.h> instead!
> ...
>
>> Does this work better?
>
> Not really:
[snip]
>> diff --git a/include/libfdt_env.h b/include/libfdt_env.h
>> index 671c3a8..728a248 100644
>> --- a/include/libfdt_env.h
>> +++ b/include/libfdt_env.h
>> @@ -33,10 +33,17 @@
>> #include <asm/byteorder.h>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> This has not changed?
Oops, I was rushing too much. I missed changing this to endian.h.
[snip]
> If I change the code to include <asm/byteorder.h> only for the U-Boot
> code but use <endian.h>, I get warnings:
>
> ../include/libfdt.h:162: warning: implicit declaration of function '__swab32'
>
> and finally a "undefined reference to `__swab32'" error. Seems
> __swab32 and __swab64 are defined only in linux/byteorder/swab.h
>
> Best regards,
>
> Wolfgang Denk
...and if I were not rushing so much, I would have found that myself
instead of looking stupid. :-(
Google hasn't been very helpful for answering the question of how to
handle endian issues in userland (non-kernel) code. Hmmm. Grrr. Maybe
I'm not asking it the right question.
Maybe we need to make our own copy of linux/byteorder/swab.h in u-boot?
That doesn't seem right.
Best regards,
gvb
More information about the U-Boot
mailing list