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

* [U-Boot] Nand: Uboot-Environment at bad block
  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-08-04 10:07 ` Daniel Gorsulowski
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2011-06-20 14:33 UTC (permalink / raw)
  To: u-boot

Dear Arno Steffen,

In message <BANLkTimtNJ5Au4uPp2D7q8hZkbk3x5RERA@mail.gmail.com> you wrote:
> 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

Why are you reposting the same message just 8 hours after the initial
posting?

Don't do that!!!

Read http://catb.org/esr/faqs/smart-questions.html to understand why
this will not help you getting any answer any sooner, on contrary.


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
I think it's a new feature. Don't tell anyone it was an accident. :-)
  -- Larry Wall on s/foo/bar/eieio in <10911@jpl-devvax.JPL.NASA.GOV>

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

* [U-Boot] Nand: Uboot-Environment at bad block
  2011-06-20 14:33 ` Wolfgang Denk
@ 2011-06-20 14:49   ` Arno Steffen
  2011-06-20 14:58     ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Arno Steffen @ 2011-06-20 14:49 UTC (permalink / raw)
  To: u-boot

I am very sorry, apologize me! My fault.
I haven't seen my mail in the mailing archive, so I thought it was
just saved as draft or forget to write [uboot] in subject.

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

* [U-Boot] Nand: Uboot-Environment at bad block
  2011-06-20 14:49   ` Arno Steffen
@ 2011-06-20 14:58     ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2011-06-20 14:58 UTC (permalink / raw)
  To: u-boot

Dear Arno Steffen,

In message <BANLkTim_Mt2s1N6U==h2v0LYj6uBWbfWPA@mail.gmail.com> you wrote:
> I am very sorry, apologize me! My fault.
> I haven't seen my mail in the mailing archive, so I thought it was
> just saved as draft or forget to write [uboot] in subject.

Where did you look?

DENX:	http://lists.denx.de/pipermail/u-boot/2011-June/094640.html
marc:	http://marc.info/?l=u-boot&m=130855216329409&w=2
Gmane:	http://article.gmane.org/gmane.comp.boot-loaders.u-boot/101775

Seems your message has been corrcectly archived everywhere...

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
"I like your game but we have to change the rules."

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

* [U-Boot] Nand: Uboot-Environment at bad block
  2011-06-20 14:10 [U-Boot] Nand: Uboot-Environment at bad block Arno Steffen
  2011-06-20 14:33 ` Wolfgang Denk
@ 2011-08-04 10:07 ` Daniel Gorsulowski
  2011-08-04 18:02   ` Scott Wood
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Gorsulowski @ 2011-08-04 10:07 UTC (permalink / raw)
  To: u-boot

Arno Steffen wrote:
> 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?
> 
...
> 
> Maybe someone can give me an advice?
> Thanks
> - Arno
> 
...

Hello!

Is there a solution to this problem?
I was going to ask exactly the same question, but then I found this topic.

My board config (ARM platform) is
  #define CONFIG_ENV_IS_IN_NAND		1
  #define CONFIG_ENV_OFFSET		0xC0000
  #define CONFIG_ENV_SIZE		0x20000

Now there is a board with a bad block exactly at 0xC0000
  => nand bad

  Device 0 bad blocks:
    000c0000
    02f40000
    ...

If I try to write the environment, i get
  Saving Environment to NAND...
  Erasing Nand...
  Skipping bad block at  0x000c0000

  Writing to Nand... FAILED!

Any hints?

Kind regards
Daniel

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

* [U-Boot] Nand: Uboot-Environment at bad block
  2011-08-04 10:07 ` Daniel Gorsulowski
@ 2011-08-04 18:02   ` Scott Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2011-08-04 18:02 UTC (permalink / raw)
  To: u-boot

On 08/04/2011 05:07 AM, Daniel Gorsulowski wrote:
> Arno Steffen wrote:
>> 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?

Use CONFIG_ENV_RANGE.

-Scott

^ 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