I've split this discussion into a thread of its own.

Summary of reported problems with solutions:

1) If the output of the fw_printenv and fw_setenv commands includes lines that look like this:

Pogoplug:/usr/bin$ fw_printenv
ENV_SIZE: 1fffc, env.crc: ffffffff actual crc: 619d86db
ENV_SIZE: 1fffc, env.crc: ffffffff actual crc: 619d86db

then you have an old version of fw_printenv. Delete /usr/bin/fw_printenv and fw_setenv and then re-run the uBoot installer.

2) If the output of the blparam look like this:

Pogoplug:/tmp$  /usr/local/cloudengines/bin/blparam
Too many bit errors @ 0xa0000 -- Can't correct!
PAGE DATA:
OOB:
Too many bit errors @ 0xa0800 -- Can't correct!
PAGE DATA:
MTD: /dev/mtd0
     type:          4
     flags:         0x400
     size:          1048576
     erase size:    131072
     write size:    2048
     oob size:      64
00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
... all lines are identical (8455 lines in total)
00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................

then the old uBoot environment is corrupted or deleted.

If you have a serial cable, you can interrupt the old uBoot and run 'saveenv'.

If you don't have a serial cable, you can replace the old uBoot with my new uBoot for mtd0

-- Jeff



Edited 2 time(s). Last edit at 08/22/2010 01:51PM by Jeff.
Hi Jeff,

First of all, thanks for all the job you've done on the Dockstar.

I have a problem using fw_set/printenv :

Pogoplug:/usr/bin$ fw_setenv serverip 192.168.254.200
ENV_SIZE: 1fffc, env.crc: ffffffff actual crc: 619d86db
ENV_SIZE: 1fffc, env.crc: ffffffff actual crc: 619d86db
Warning: Bad CRC, using default environment
Segmentation fault

Whatever i try, I got this error.

Pogoplug:/usr/bin$ 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

Here is the fw_env.config

Pogoplug:/usr/bin$ cat fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.

# MTD device name Device offset Env. size Flash sector size
/dev/mtd0 0xc0000 0x20000 0x20000

What i'm doing wrong ?


When I started, I used your script (from install_uboot_mtd3.sh) to install debian lenny. Nevertheless, I tried to install again your new uboot, and I got also some CRC errors.
Re: Use netconsole to interact with uBoot without needing a USB cable
August 12, 2010 08:18AM
It looks like you're using an old version of the fw_printenv utility. It also appears that the uBoot environment has either been erased or didn't get installed. I suggest deleting /usr/bin/fw_printenv and /usr/bin/fw_setenv. Then re-download and re-run the uBoot installer.

-- Jeff
Ok I'll try that, but where can I find sfw_setenv, because you provided fw_printenv (http://jeff.doozan.com/debian/uboot/fw_printenv), but I can not find an url into your script for fw_setenv ?

Thanks Jeff
Olivier Wrote:
-------------------------------------------------------
> Ok I'll try that, but where can I find sfw_setenv,
> because you provided fw_printenv
> (http://jeff.doozan.com/debian/uboot/fw_printenv),
> but I can not find an url into your script for
> fw_setenv ?
>
> Thanks Jeff

Sorry, I found into your scritp that a simplie "ln" will solve my question :)
I managed to have fw_setenv/fw_printenv working again by flashing back the original mtd0, erasing fw_* / blparam, then by installing uboot_mtd3 with your script.

Thank you
Sorry Jeff,

but now, even if setenf is working (I can read/write for mtd3 uboot), it seems that blparam is not able to write params for mtd0 uboot. So, chain boot from mtd0 to mtd3 isnt working.

As you suggested, I deleted blparam form /usr/local/cloudengines/bin and downloaded a fresh copy from you site, but it did not help. The blparam output show something like

Pogoplug:/tmp$  /usr/local/cloudengines/bin/blparam  'bootcmd=run bootcmd1'
Too many bit errors @ 0xa0000 -- Can't correct!
PAGE DATA:
OOB:
Too many bit errors @ 0xa0800 -- Can't correct!
PAGE DATA:
MTD: /dev/mtd0
     type:          4
     flags:         0x400
     size:          1048576
     erase size:    131072
     write size:    2048
     oob size:      64
00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
... all lines are identicals (8455 lines in total)
00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................

And the output also shows some
Too many bit errors @ 0xac800 -- Can't correct!
...
Too many bit errors @ 0xad000 -- Can't correct!
...
Re: Use netconsole to interact with uBoot without needing a USB cable
August 14, 2010 04:44AM
Olivier,

I am seeing the same errors when I run blparam as well. I am guessing the NAND flash area where blparam stores its data is either corrupted or can't be read somehow (since all the data are coming back as FF).

I also noticed the hardware MAC address on my dockstar changed. It used to be 00:10:75:xx:xx:xx, now it's 00:50:43:xx:xx:xx.

Very strange.
Re: Use netconsole to interact with uBoot without needing a USB cable
August 14, 2010 07:36AM
You've somehow erased the area where mtd0 stores its environment. If you have a serial cable, you can connect to the old uBoot and run 'saveenv' to re-write the environment area.

-- Jeff
I fixed the problem by writing a dump from someone else that did : nanddump -of "/tmp/uboot-mtd0.environment" -s 0xa0000 -l 0x20000 /dev/mtd0 to have a fresh dump.
Then, I just did a nandwrite -s 655360 /tmp/uboot-mtd0.environment, and blparam worked again.

For the mac, I think that it is not a real problem as it should be set thru blparam/fw_setenv and linux.

Olivier
Re: Use netconsole to interact with uBoot without needing a USB cable
August 14, 2010 02:04PM
Thanks Jeff and Olivier! Very good to know.

Still waiting for my header in the mail to use with the CA-42 cable.

Olivier, if you still have that file handy, would you mind sending me a copy to the address below? Thanks!

[redacted]



Edited 1 time(s). Last edit at 08/14/2010 03:56PM by gnowk.
Olivier, thank you so so much for the instructions and the file. Helped me a lot also. In one of the posts, you mentioned that MAC address problem could be solved with blparam/fw_setenv and linux . Could you help with restoring the original MAC adress please ? Because after the nandwrite my dockstar's MAC address has changed.
I uploaded the file here : http://dl.free.fr/hHdxMszoL . Dump I used to "restore" blparam.

Good luck
Re: Use netconsole to interact with uBoot without needing a USB cable
August 14, 2010 04:03PM
Thanks Olivier. Unfortunately, I got some I/O errors with nandwrite. Not sure if my NAND is bad somehow.

Pogoplug:/tmp$ md5sum /tmp/uboot.mtd0.environment
3b87d662662690eac0e7108aa03edcca  /tmp/uboot.mtd0.environment
Pogoplug:/tmp$ nandwrite -s 655360 /dev/mtd0 /tmp/uboot.mtd0.environment
Writing data to block a0000
pwrite: Input/output error
Data did not fit into device, due to bad blocks
: Illegal seek
Pogoplug:/tmp$

Did you have to pass in any other parameters to nandwrite?
Sorry I don't know, I had have no error when I issued the nandwrite command and right after, blparam has worked again.
I guess that blparam/fw_setvenv 'ethaddr=00:10:75:1A:BD:4E' (the one into uboot.env file) or whetever you want as mac address, should answer your question.
Olivier Wrote:
-------------------------------------------------------
> I guess that blparam/fw_setvenv
> 'ethaddr=00:10:75:1A:BD:4E' (the one into
> uboot.env file) or whetever you want as mac
> address, should answer your question.

Thank you very much. I have done this and I can see my original MAC address when I search for it now. But only when I boot into dockstar's own kernel.
When I boot into Plugbox linux kernel from usb, I see a different MAC address every time I reboot.
I have given the same command you told me in Plugbox and could see the effect when I run blparam but, somehow something overrides it. And MAC address changes every time. What could that be ?
Olivier- I used your uboot environment and the nandwrite seemed to work, but now my blparam is all 00 00 00 00 with some interspersed ff ff ff ff.

Does anyone have a known working nanddump of a dockstar /dev/mtd0? Just the environment, or the whole damn thing, either's fine by me. I'd love to just flash this back to stock then work from there.

Jeff- is it possible your /etc/fw_env.config has values that don't work on all dockstars? Because my fw_printenv looks just fine, but blparam is all screwed up. Linking some output from blparam, dmesg and fw_printenv.

http://pastie.org/1094230
Re: Environment CRC error with fw_set/printenv utilities
August 15, 2010 02:32PM
When you install uBoot to mtd3, you are creating a system with two bootloaders (Pogoplug on mtd0 and mine on mtd3).

Each bootloader has its own environment and separate command line utilities for altering that environment.

The Pogoplug bootloader is on mtd0. Its environment is saved to NAND at 0xa0000. The blparam utility will read and write to its environment.

The new bootloader is on mtd3. Its environment is saved to NAND at 0xc0000. The fw_print/setenv utilities will read and write to its environment. The fw_env.config utility is used by the fw_print/setenv commands.

-- Jeff



Edited 2 time(s). Last edit at 08/16/2010 07:05PM by Jeff.
Yes, then can someone please suggest how the heck I can restore my corrupted mtd0 blocks?
Re: Environment CRC error with fw_set/printenv utilities
August 15, 2010 05:21PM
Using a serial cable or netconsole, connect to the first uBoot and run 'saveenv'.
> When I boot into Plugbox linux kernel from usb, I
> And
> MAC address changes every time. What could that
> be ?

I had to set an environment variable in the mtd3 u-Boot to specify my MAC address. I think it was the same variable as in the mtd0 u-Boot, but don't have it in front of me to check.
john3voltas
Re: Environment CRC error with fw_set/printenv utilities
August 19, 2010 02:08AM
Just wanted to thank JeffD for his work on the Dock's.
And I'd say this thread is very educational.
Back at plguapps.com there's a bunch of guys having similar issues.
I bet we can fix them with these instructions.
Once again, thanks for the tips and feel free to drop by on #plugapps ;).
Cheers
john3voltas
Re: Environment CRC error with fw_set/printenv utilities
August 19, 2010 05:48AM
Hello,
Great thread.
I'm sorry but I am just too much of a noob when it comes to Linux AND plug devices.
Do I need a CA-42 cable (or similar) to use this fix?
Could someone please be so kind to resume this and make a fool-proof guide for fools like me?
Thanks in advance :)
Cheers
Re: Use netconsole to interact with uBoot without needing a USB cable
August 22, 2010 05:49AM
Olivier Wrote:
-------------------------------------------------------
> I uploaded the file here :
> http://dl.free.fr/hHdxMszoL . Dump I used to
> "restore" blparam.
>
> Good luck

Hi Olivier,
Is this dump from a Dockstar or from a Pogoplug?
I need to restore my mtd0 with OOB.
I have 2 Dockstars.
One is malfunctioning. It works on Pogoplug OS only.
The other one is Vanilla, still hasn't connected to the Internet and it should work with Pogoplug OS as well with any other OS as long as I chainload.
Could you please let me know the exact nanddump commands I need to use on the Vanilla Dockstar to dump an mtd0 with OOB so that I can then write it on the malfunctioning Dockstar?

I already tried on the Vanilla Dockstar:
nanddump -of "/tmp/uboot-mtd0.environment" -s 0xa0000 -l 0x20000 /dev/mtd0

And then, on the manlfunctioning Dockstar:
nandwrite -s 655360 /dev/mtd0 /tmp/uboot-mtd0.environment

Unfortunately the dump generated ecc errors and the write generated ecc errors too, and ultimately the write said that the writing had failed.
Since it failed, on the malfunctioning Dockstar i did this:

# Restore original uBoot
wget http://jeff.doozan.com/debian/uboot/uboot-original-mtd0.kwb
flash_erase /dev/mtd0 0 4
nandwrite /dev/mtd0 uboot-original-mtd0.kwb

I can still boot the malfunctioning unit to Pogoplug OS.
Can you put me on the right track here?
Thanks in advance.
Cheers
Re: Environment CRC error with fw_set/printenv utilities
August 25, 2010 11:33PM
I would appreciate if someone could someone post a

nanddump -of "/tmp/uboot-mtd0.environment" -s 0xa0000 -l 0x20000 /dev/mtd0

from a "normal" Pogoplug V2 (pink) to assist in an experiment to fix some blparam problems with my device. The file posted above is from a Dockstar and while I can write the file it does not seem to be exactly what I need.
Re: Environment CRC error with fw_set/printenv utilities
August 25, 2010 11:56PM
I think I may have it close to resolved. If someone with a Pogoplug V2 (pink) could post the output of blparam so I could compare it would be much appreciated.
I have Pogoplug V2(pink),
How do I post the output of blparam ?
Re: Environment CRC error with fw_set/printenv utilities
August 26, 2010 05:16PM
I would expect you could just copy/paste it into a post. Might be helpful to also format it as "code" using the last button on the little toolbar above the text entry area.

Like this

Thank you in advance.
clownfish Wrote:
-------------------------------------------------------
> I would expect you could just copy/paste it into a
> post. Might be helpful to also format it as
> "code" using the last button on the little toolbar
> above the text entry area.
>
>
> Like this
>
>
> Thank you in advance.

Do you mean this
nanddump -of "/tmp/uboot-mtd0.environment" -s 0xa0000 -l 0x20000 /dev/mtd0
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: