[U-Boot] Nand: Uboot-Environment at bad block

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)?

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

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.

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

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

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
participants (4)
-
Arno Steffen
-
Daniel Gorsulowski
-
Scott Wood
-
Wolfgang Denk