public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot]  Nand: Uboot-Environment at bad block
@ 2011-06-20 14:10 Arno Steffen
  2011-06-20 14:33 ` Wolfgang Denk
  2011-08-04 10:07 ` Daniel Gorsulowski
  0 siblings, 2 replies; 6+ messages in thread
From: Arno Steffen @ 2011-06-20 14:10 UTC (permalink / raw)
  To: u-boot

In one of my devices, uboot-environment is located at a bad block.
"save
Saving Environment to NAND...
Erasing Nand...
Skipping bad block at  0x000c0000

Writing to Nand... FAILED!"

In my memory mapping I have already reseverd 2blocks.
How can I setup uboot in a way, that it will look at c0000 or (in case
of bad block) at the next block e0000?

In my configs file I found somewhat like:
#define CONFIG_ENV_SIZE                 (128 << 10)     /* 128 KiB */
#define SMNAND_ENV_OFFSET               0xC0000 /* environment starts here */
#define CONFIG_SYS_ENV_SECT_SIZE        boot_flash_sec

in mem.c of my processor I found:
       f_sec = (128 << 10);    /* 128 KiB */
       /* env setup */
       boot_flash_base = base;
       boot_flash_off = f_off;
       boot_flash_sec = f_sec;

uboot is based on 2010.03 release.

Maybe someone can give me an advice?
Thanks
- Arno

PS:
Move the base address of environment is not an option, as in next
device the bad block might be on exact this location.
Environment itself is just 2kB, but a block is 128k.  Can I decrease
the environment to that size and still use access from linux (via
fw_printenv)?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-04 18:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20 14:10 [U-Boot] Nand: Uboot-Environment at bad block Arno Steffen
2011-06-20 14:33 ` Wolfgang Denk
2011-06-20 14:49   ` Arno Steffen
2011-06-20 14:58     ` Wolfgang Denk
2011-08-04 10:07 ` Daniel Gorsulowski
2011-08-04 18:02   ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox