Tyler T
fw_setenv and saveenv don't work?
August 11, 2010 10:08PM
I can 'setenv' parameters in Jeff's new mtd3 u-Boot, and even 'saveenv', but my changes are gone after a reboot.

Also, fw_setenv from within the stock PogoPlug OS throws errors:

-sh-3.2# ./fw_setenv testparam testvalue
ENV_SIZE: 1fffc, env.crc: ce899e0b  actual crc: ce899e0b
ENV_SIZE: 1fffc, env.crc: ce899e0b  ac[   54.290000] nand_write: Attempt to writ
e not page aligned data
tual crc: ce899e0b
Unlocking flash...
Done
Erasing old environment...
Done
Writing environment to /dev/mtd0...
CRC write error on /dev/mtd0: Invalid argument
Error: can't write fw_env to flash
-sh-3.2# ./fw_printenv
ENV_SIZE: 1fffc, env.crc: ffffffff  actual crc: 619d86db
ENV_SIZE: 1fffc, env.crc: ffffffff  actual crc: 619d86db
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=
${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200

After a reboot, 'fw_printenv' shows my new testparam and testvalue. But 'printenv' from within u-Boot does not!

Thoughts?
Re: fw_setenv and saveenv don't work?
August 12, 2010 08:24AM
It looks like you're using an old version of the fw_printenv utility. I would start with deleting /usr/bin/fw_printenv and /usr/bin/fw_setenv and /etc/fw_env.config Then re-download and re-run the uBoot installer and try again.

Quote

[ 54.290000] nand_write: Attempt to write not page aligned data
CRC write error on /dev/mtd0: Invalid argument
Error: can't write fw_env to flash

This error is interesting. I'm not sure why it thinks it's not page aligned. You're using a Dockstar, right? I wonder if you have some bad blocks between 0xc0000 and 0xe0000 (the area where uBoot saves its environment)

-- Jeff



Edited 1 time(s). Last edit at 08/12/2010 08:31AM by Jeff.
Tyler T
Re: fw_setenv and saveenv don't work?
August 12, 2010 09:46PM
Yes, this is a Dockstar. Good news, upgrading u-Boot worked (apparently I needed the new new Jeff u-Boot ;) ). The new fw-setenv works too.
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: