From: "Kári Davíðsson" <kari.davidsson@marel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] problem building fw_printenv
Date: Mon, 18 Jan 2010 10:31:27 +0000 [thread overview]
Message-ID: <4B54387F.7060901@marel.com> (raw)
In-Reply-To: <dbdb2ea60912101320u5ce0d93asf8f748a05c29c414@mail.gmail.com>
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
>
prev parent reply other threads:[~2010-01-18 10:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=4B54387F.7060901@marel.com \
--to=kari.davidsson@marel.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