* [U-Boot] problem building fw_printenv
@ 2009-12-10 0:38 twebb
2009-12-10 20:18 ` twebb
0 siblings, 1 reply; 8+ messages in thread
From: twebb @ 2009-12-10 0:38 UTC (permalink / raw)
To: u-boot
I'm having problems building fw_printenv. I'm sure it's simple but
I'm just not getting it.
I'm working with u-boot 2009.01-rc1. I have the environment variable
CROSS_COMPILE set, and then execute "make env" from the top of the
u-boot source tree. Capture is below. I don't had "stdint.h"
anywhere in my environment. Any ideas what I have wrong?
Thanks,
twebb
jb at jb:u-boot-arm$
jb at jb:u-boot-arm$ echo $CROSS_COMPILE
arm-eabi-
jb at jb:u-boot-arm$
jb at jb:u-boot-arm$ make env
make -C tools/env all MTD_VERSION= || exit 1
make[1]: Entering directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
arm-eabi-gcc -Wall -DUSE_HOSTCC
-I/home/jb/work-1130/boot/u-boot-arm/include crc32.c fw_env.c
fw_env_main.c -o fw_printenv
crc32.c:14:20: error: stdint.h: No such file or directory
crc32.c:81: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'crc_table'
crc32.c:157: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'crc32'
crc32.c:206: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'crc32_wd'
fw_env.c:27:19: error: errno.h: No such file or directory
fw_env.c:28:19: error: fcntl.h: No such file or directory
...
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] problem building fw_printenv
2009-12-10 0:38 [U-Boot] problem building fw_printenv twebb
@ 2009-12-10 20:18 ` twebb
2009-12-10 20:34 ` Jerry Van Baren
0 siblings, 1 reply; 8+ messages in thread
From: twebb @ 2009-12-10 20:18 UTC (permalink / raw)
To: u-boot
> I'm having problems building fw_printenv. ?I'm sure it's simple but
> I'm just not getting it.
>
> I'm working with u-boot 2009.01-rc1. ?I have the environment variable
> CROSS_COMPILE set, and then execute "make env" from the top of the
> u-boot source tree. ?Capture is below. ?I don't had "stdint.h"
> anywhere in my environment. ?Any ideas what I have wrong?
>
> Thanks,
> twebb
>
>
> jb at jb:u-boot-arm$
> jb at jb:u-boot-arm$ echo $CROSS_COMPILE
> arm-eabi-
> jb at jb:u-boot-arm$
> jb at jb:u-boot-arm$ make env
> make -C tools/env all MTD_VERSION= || exit 1
> make[1]: Entering directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
> arm-eabi-gcc -Wall -DUSE_HOSTCC
> -I/home/jb/work-1130/boot/u-boot-arm/include crc32.c ?fw_env.c
> fw_env_main.c -o fw_printenv
> crc32.c:14:20: error: stdint.h: No such file or directory
> crc32.c:81: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'crc_table'
> crc32.c:157: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'crc32'
> crc32.c:206: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'crc32_wd'
> fw_env.c:27:19: error: errno.h: No such file or directory
> fw_env.c:28:19: error: fcntl.h: No such file or directory
> ...
>
Does anyone have any ideas on this? I'm still stuck. Though I feel
certain it's some sort of environment problem, I can't figure it out.
Any suggestions would be appreciated.
twebb
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] problem building fw_printenv
2009-12-10 20:18 ` twebb
@ 2009-12-10 20:34 ` Jerry Van Baren
2009-12-10 20:39 ` Scott Wood
0 siblings, 1 reply; 8+ messages in thread
From: Jerry Van Baren @ 2009-12-10 20:34 UTC (permalink / raw)
To: u-boot
twebb wrote:
>> I'm having problems building fw_printenv. I'm sure it's simple but
>> I'm just not getting it.
>>
>> I'm working with u-boot 2009.01-rc1. I have the environment variable
>> CROSS_COMPILE set, and then execute "make env" from the top of the
>> u-boot source tree. Capture is below. I don't had "stdint.h"
>> anywhere in my environment. Any ideas what I have wrong?
>>
>> Thanks,
>> twebb
>>
>>
>> jb at jb:u-boot-arm$
>> jb at jb:u-boot-arm$ echo $CROSS_COMPILE
>> arm-eabi-
>> jb at jb:u-boot-arm$
>> jb at jb:u-boot-arm$ make env
>> make -C tools/env all MTD_VERSION= || exit 1
>> make[1]: Entering directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
>> arm-eabi-gcc -Wall -DUSE_HOSTCC
This appears to be cross-compiling the tools that run on the host (i.e.
native). Odd.
>> -I/home/jb/work-1130/boot/u-boot-arm/include crc32.c fw_env.c
>> fw_env_main.c -o fw_printenv
>> crc32.c:14:20: error: stdint.h: No such file or directory
>> crc32.c:81: error: expected '=', ',', ';', 'asm' or '__attribute__'
>> before 'crc_table'
>> crc32.c:157: error: expected '=', ',', ';', 'asm' or '__attribute__'
>> before 'crc32'
>> crc32.c:206: error: expected '=', ',', ';', 'asm' or '__attribute__'
>> before 'crc32_wd'
>> fw_env.c:27:19: error: errno.h: No such file or directory
>> fw_env.c:28:19: error: fcntl.h: No such file or directory
>> ...
>>
>
> Does anyone have any ideas on this? I'm still stuck. Though I feel
> certain it's some sort of environment problem, I can't figure it out.
> Any suggestions would be appreciated.
>
> twebb
Download a stdint.h and put it somewhere in your include path?
http://en.wikipedia.org/wiki/Stdint.h#Downloads
I'm not sure why you don't have stdint.h, I would expect it to be
supplied by your host gcc installation.
gvb
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] problem building fw_printenv
2009-12-10 20:34 ` Jerry Van Baren
@ 2009-12-10 20:39 ` Scott Wood
2009-12-10 21:20 ` twebb
0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2009-12-10 20:39 UTC (permalink / raw)
To: u-boot
Jerry Van Baren wrote:
> Download a stdint.h and put it somewhere in your include path?
>
> http://en.wikipedia.org/wiki/Stdint.h#Downloads
>
> I'm not sure why you don't have stdint.h, I would expect it to be
> supplied by your host gcc installation.
I think it comes from the libc, so it wouldn't be present if someone
just installed binutils+gcc for standalone development.
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] problem building fw_printenv
2009-12-10 20:39 ` Scott Wood
@ 2009-12-10 21:20 ` twebb
2009-12-10 23:29 ` Wolfgang Denk
2010-01-18 10:31 ` Kári Davíðsson
0 siblings, 2 replies; 8+ messages in thread
From: twebb @ 2009-12-10 21:20 UTC (permalink / raw)
To: u-boot
>
> I think it comes from the libc, so it wouldn't be present if someone just
> installed binutils+gcc for standalone development.
>
Great, that was the clue. I was compiling using cross-compile tools
from android that don't use a standard libc. When I changed to using
Codesourcery tools, I got farther...
jb at jb:u-boot-arm$ make env ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
make -C tools/env all MTD_VERSION= || exit 1
make[1]: Entering directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
arm-none-linux-gnueabi-gcc -Wall -DUSE_HOSTCC
-I/home/jb/work-1130/boot/u-boot-arm/include crc32.c fw_env.c
fw_env_main.c -o fw_printenv
fw_env.c:43:27: error: mtd/mtd-user.h: No such file or directory
So then, I have this problem with mtd-user.h not being found. If I
define MTD_VERSION=old, it then uses mtd.h and gets further but
encounters another error within mtd.h.
jb at jb:u-boot-arm$ make env ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
make -C tools/env all MTD_VERSION=old || exit 1
make[1]: Entering directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
arm-none-linux-gnueabi-gcc -Wall -DUSE_HOSTCC
-I/home/jb/work-1130/boot/u-boot-arm/include -DMTD_OLD crc32.c
fw_env.c fw_env_main.c -o fw_printenv
In file included from fw_env.c:40:
/home/jb/work-1130/boot/u-boot-arm/include/linux/mtd/mtd.h:143: error:
expecteddeclaration specifiers or '...' before 'phys_addr_t'
make[1]: *** [fw_printenv] Error 1
make[1]: Leaving directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
make: *** [env] Error 1
Seems like I shouldn't have to define MTD_VERSION=old in the first
place, but without it no mtd-user.h file. Any more suggestions?
Thanks,
twebb
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] problem building fw_printenv
2009-12-10 21:20 ` twebb
@ 2009-12-10 23:29 ` Wolfgang Denk
2009-12-10 23:45 ` Scott Wood
2010-01-18 10:31 ` Kári Davíðsson
1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2009-12-10 23:29 UTC (permalink / raw)
To: u-boot
Dear twebb,
In message <dbdb2ea60912101320u5ce0d93asf8f748a05c29c414@mail.gmail.com> you wrote:
> >
> > I think it comes from the libc, so it wouldn't be present if someone just
> > installed binutils+gcc for standalone development.
> >
> Great, that was the clue. I was compiling using cross-compile tools
> from android that don't use a standard libc. When I changed to using
> Codesourcery tools, I got farther...
I'm tempted to try a malapropism on Tom Christiansen's quote: "The
use of Android crippleware systems is a sin that carries with it its
own punishment." ;-)
> fw_env.c:43:27: error: mtd/mtd-user.h: No such file or directory
>
> So then, I have this problem with mtd-user.h not being found. If I
> define MTD_VERSION=old, it then uses mtd.h and gets further but
> encounters another error within mtd.h.
There will probably more problems to follow...
> Seems like I shouldn't have to define MTD_VERSION=old in the first
> place, but without it no mtd-user.h file. Any more suggestions?
Try a sane build environment?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you use modules, you pay the price. Sane embedded solutions
running in "tight" environments don't use modules :-)
-- Benjamin Herrenschmidt in <1258234866.2140.451.camel@pasglop>
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot] problem building fw_printenv
2009-12-10 23:29 ` Wolfgang Denk
@ 2009-12-10 23:45 ` Scott Wood
0 siblings, 0 replies; 8+ messages in thread
From: Scott Wood @ 2009-12-10 23:45 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
>> fw_env.c:43:27: error: mtd/mtd-user.h: No such file or directory
>>
>> So then, I have this problem with mtd-user.h not being found. If I
>> define MTD_VERSION=old, it then uses mtd.h and gets further but
>> encounters another error within mtd.h.
>
> There will probably more problems to follow...
>
>> Seems like I shouldn't have to define MTD_VERSION=old in the first
>> place, but without it no mtd-user.h file. Any more suggestions?
>
> Try a sane build environment?
I have the same problems building this. We need to define phys_addr_t
somewhere if we're going to include u-boot internal headers in a user tool.
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] problem building fw_printenv
2009-12-10 21:20 ` twebb
2009-12-10 23:29 ` Wolfgang Denk
@ 2010-01-18 10:31 ` Kári Davíðsson
1 sibling, 0 replies; 8+ messages in thread
From: Kári Davíðsson @ 2010-01-18 10:31 UTC (permalink / raw)
To: u-boot
I did not see real solution on the list, so i will post mine :)
The trick (for me) was to install the mtd-utils headers into the build environment.
I.e. install the contents of mtd-utils/include/mtd into $(your_buildenv)/usr/include/mtd.
I had to to this manually, since make install of mtd-utils does not install the headers.
You will find mtd-utils e.g. at ftp://ftp.infradead.org/pub/mtd-utils/.
There is probably a git also for the mtd-utils.
I am using mtd-utils_1.0.0 and should upgrade but for now 1.0.0 will have to do.
Hope this helps others that will run into the problem and do not have "sane" build env.
rg
kd
On 12/10/2009 09:20 PM, twebb wrote:
>>
>> I think it comes from the libc, so it wouldn't be present if someone just
>> installed binutils+gcc for standalone development.
>>
> Great, that was the clue. I was compiling using cross-compile tools
> from android that don't use a standard libc. When I changed to using
> Codesourcery tools, I got farther...
>
> jb at jb:u-boot-arm$ make env ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
> make -C tools/env all MTD_VERSION= || exit 1
> make[1]: Entering directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
> arm-none-linux-gnueabi-gcc -Wall -DUSE_HOSTCC
> -I/home/jb/work-1130/boot/u-boot-arm/include crc32.c fw_env.c
> fw_env_main.c -o fw_printenv
> fw_env.c:43:27: error: mtd/mtd-user.h: No such file or directory
>
> So then, I have this problem with mtd-user.h not being found. If I
> define MTD_VERSION=old, it then uses mtd.h and gets further but
> encounters another error within mtd.h.
>
> jb at jb:u-boot-arm$ make env ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
> make -C tools/env all MTD_VERSION=old || exit 1
> make[1]: Entering directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
> arm-none-linux-gnueabi-gcc -Wall -DUSE_HOSTCC
> -I/home/jb/work-1130/boot/u-boot-arm/include -DMTD_OLD crc32.c
> fw_env.c fw_env_main.c -o fw_printenv
> In file included from fw_env.c:40:
> /home/jb/work-1130/boot/u-boot-arm/include/linux/mtd/mtd.h:143: error:
> expecteddeclaration specifiers or '...' before 'phys_addr_t'
> make[1]: *** [fw_printenv] Error 1
> make[1]: Leaving directory `/home/jb/work-1130/boot/u-boot-arm/tools/env'
> make: *** [env] Error 1
>
> Seems like I shouldn't have to define MTD_VERSION=old in the first
> place, but without it no mtd-user.h file. Any more suggestions?
>
> Thanks,
> twebb
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-01-18 10:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-10 0:38 [U-Boot] problem building fw_printenv twebb
2009-12-10 20:18 ` twebb
2009-12-10 20:34 ` Jerry Van Baren
2009-12-10 20:39 ` Scott Wood
2009-12-10 21:20 ` twebb
2009-12-10 23:29 ` Wolfgang Denk
2009-12-10 23:45 ` Scott Wood
2010-01-18 10:31 ` Kári Davíðsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox