Welcome! Log In Create A New Profile

Advanced

Problem with /etc/fw_env.config? Or?

Posted by sdmann 
sdmann
Problem with /etc/fw_env.config? Or?
October 28, 2010 04:50PM
I've installed uboot into mtd0 on a pinkpogo with ./install_uboot_mtd0.sh. Rebooting does the right thing, but I cannot seem to use the fw_* utils. For instance:

# fw_printenv
Too few good blocks within range
#

So, I ran ./install_uboot_mtd0.sh again (everything inside ++++++++++):


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# ./install_uboot_mtd0.sh



!!!!!! DANGER DANGER DANGER DANGER DANGER DANGER !!!!!!

If you lose power to your device while running this script,
it could be left in an unusable state.

This script will replace the bootloader on /dev/mtd0.

This installer will only work on the following devices:
Seagate GoFlex Net
Seagate Dockstar
Pogoplug Pink
Do not run this installer on any other device.

By typing ok, you agree to assume all liabilities and risks
associated with running this installer.

If you agree, type 'ok' and press ENTER to continue: ok
# checking for /usr/sbin/nandwrite...
# checking for /usr/sbin/nanddump...
# checking for /usr/sbin/flash_erase...
# checking for /usr/sbin/fw_printenv...
# checking for /etc/fw_env.config...

# Validating existing uBoot...
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
Connecting to jeff.doozan.com (69.163.187.226:80)
valid-uboot.md5 100% |*******************************| 643 --:--:-- ETA
## Valid uBoot detected: [pinkpogo jeff-2010-10-23-current]
## The newest uBoot is already installed on mtd0.


You are already running the latest uBoot.
Would you like to reset the uBoot environment? [N/y] y

# Installing uBoot environment
Connecting to jeff.doozan.com (69.163.187.226:80)
uboot.environment.md 100% |*******************************| 52 --:--:-- ETA
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000
MTD Erase failure: Input/output error
Writing data to block 6 at offset 0xc0000
Bad block at c0000, 1 block(s) from c0000 will be skipped
Writing data to block 7 at offset 0xe0000
pwrite: Input/output error
Erasing failed write from 000e0000-000fffff
Data was only partially written due to error
: Input/output error

# Verifying uBoot environment
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x000c0000 and ending at 0x000e0000...
Connecting to jeff.doozan.com (69.163.187.226:80)
uboot.environment.md 100% |*******************************| 52 --:--:-- ETA
## VERIFICATION FAILED!
## uBoot environment was not properly written to mtd0. Please re-run this installer.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

So, does my pogo really have bad blocks? Another reboot does the right thing (i.e., it boots from the attached usb drive). So, how do I get fw_printenv to work?

Thanks.
-Scott
Re: Problem with /etc/fw_env.config? Or?
October 28, 2010 05:38PM
Quote

MTD Erase failure: Input/output error
Writing data to block 6 at offset 0xc0000
Bad block at c0000, 1 block(s) from c0000 will be skipped

That looks like a bad block to me. Luckily the default uBoot has enough built-in environment variables to do a pretty good job of booting. If you're just looking to boot from USB, you can just let it use the built-in environment. If you really want to be able to modify the environment, you'll need to compile your own version of uBoot and tell it to save the environment at a different location on your NAND.

-- Jeff
sdmann
Re: Problem with /etc/fw_env.config? Or?
October 28, 2010 06:28PM
Thanks, Jeff. I do need to modify the environment, so I'll dig into building my own u-boot.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: