* [U-Boot] Compilation error for fw_printenv
@ 2009-09-17 9:32 Rahanesh
2009-09-17 12:07 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: Rahanesh @ 2009-09-17 9:32 UTC (permalink / raw)
To: u-boot
Hi All,
While trying to compile fw_printenv under tools/env directory of u-boot
i am getting the following error:
fw_env.c:34:27: error: linux/mtd/mtd.h: No such file or directory
fw_env.c: In function fw_printenv:
fw_env.c: In function flash_io:
fw_env.c:390: error: erase_info_t undeclared (first use in this function)
fw_env.c:390: error: (Each undeclared identifier is reported only once
fw_env.c:390: error: for each function it appears in.)
fw_env.c:390: error: expected before erase
fw_env.c:421: error: erase undeclared (first use in this function)
fw_env.c:423: error: MEMUNLOCK undeclared (first use in this function)
fw_env.c:462: error: MEMERASE undeclared (first use in this function)
fw_env.c:519: error: MEMLOCK undeclared (first use in this function)
make: *** [fw_printenv] Error 1
How can i solve this? I a very new to Linux Environment.
Thanks
Rahanesh
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Compilation error for fw_printenv
2009-09-17 9:32 [U-Boot] Compilation error for fw_printenv Rahanesh
@ 2009-09-17 12:07 ` Wolfgang Denk
2009-09-17 12:34 ` Rahanesh
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2009-09-17 12:07 UTC (permalink / raw)
To: u-boot
Dear Rahanesh,
In message <4AB20222.3050803@tataelxsi.co.in> you wrote:
> Hi All,
>
> While trying to compile fw_printenv under tools/env directory of u-boot
> i am getting the following error:
>
> fw_env.c:34:27: error: linux/mtd/mtd.h: No such file or directory
> fw_env.c: In function fw_printenv:
> fw_env.c: In function flash_io:
> fw_env.c:390: error: erase_info_t undeclared (first use in this function)
> fw_env.c:390: error: (Each undeclared identifier is reported only once
> fw_env.c:390: error: for each function it appears in.)
> fw_env.c:390: error: expected before erase
> fw_env.c:421: error: erase undeclared (first use in this function)
> fw_env.c:423: error: MEMUNLOCK undeclared (first use in this function)
> fw_env.c:462: error: MEMERASE undeclared (first use in this function)
> fw_env.c:519: error: MEMLOCK undeclared (first use in this function)
> make: *** [fw_printenv] Error 1
>
> How can i solve this? I a very new to Linux Environment.
Obviously your cross tool chain does not provide the (needed)
linux/mtd/mtd.h header file. Either use a more complete tool chain
(we use the ELDK), or manually add this file to your cross tool
chain's headers.
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
"355/113 -- Not the famous irrational number PI, but an incredible
simulation!"
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Compilation error for fw_printenv
2009-09-17 12:07 ` Wolfgang Denk
@ 2009-09-17 12:34 ` Rahanesh
0 siblings, 0 replies; 3+ messages in thread
From: Rahanesh @ 2009-09-17 12:34 UTC (permalink / raw)
To: u-boot
Dear Wolfgang.
>
> Obviously your cross tool chain does not provide the (needed)
> linux/mtd/mtd.h header file. Either use a more complete tool chain
> (we use the ELDK), or manually add this file to your cross tool
> chain's headers.
>
>
>
After cross compiling now i get the following behaviour.
After issuing a fw_printenv it said
* Bad data CRC, Using default environment... *and printed out
few environment variables.*
*
Then i did a *fw_setenv bootdelay 6*. It showed some messgaes
of erasing flash. But it actually erased my uboot itself.
What might be the issue? Any issue with the config file?
MTD device name Device offset Env. size Flash
sector size Number of sectors
/dev/mtd0 0x0000
0x1000 0x10000
What does Device Offset mean?
/dev/mtd0 has both uboot as well as environment variables. Environment
variables lie at bottom of /dev/mtd0. Is that the meaning of device offset?
#define CFG_ENV_ADDR 0xAD03F000 (Flash starts at 0xAD000000)
#define CFG_ENV_SIZE 0x1000
#define CFG_ENV_SECT_SIZE 0x10000
These are the macros that i found in include/configs/board.h
Please help
Thanks
Rahanesh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-17 12:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 9:32 [U-Boot] Compilation error for fw_printenv Rahanesh
2009-09-17 12:07 ` Wolfgang Denk
2009-09-17 12:34 ` Rahanesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox