Welcome! Log In Create A New Profile

Advanced

Nanddump bug? Offset error?

Posted by JohnW 
Nanddump bug? Offset error?
January 04, 2015 09:52AM
As we all know on the Pogoplug V4, the original U-Boot envs are stored at address A5000 (dec 675840) in mtd0.

However when backing up mtd0 from Debian, the original envs are now located at A0000 (dec 655360). How come?

I did take a backup of mtd0 before upgrading U-Boot under the main Debian installation, this was done from Pogoplug OS.

If i compare the two nanddumps, they differ in size also - which is wierd.

Pogoplug OS dump: 2,06 MB (2 162 688 byte)
Debian dump: 2,00 MB (2 097 152 byte)
---

Bodhis dump of mtd0 looks the same as mine taken from Pogoplug OS.
http://archlinuxarm.org/forum/viewtopic.php?f=53&t=6147#p34646
---

I use this command in Debian:
root@pogo02:~# nanddump -nf /dev/mtd0.oob /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00200000...

Any ideas?

/John
Re: Nanddump bug? Offset error?
January 04, 2015 11:35AM
JohnW,

> As we all know on the Pogoplug V4, the original
> U-Boot envs are stored at address A5000 (dec
> 675840) in mtd0.

Not true.

>
> However when backing up mtd0 from Debian, the
> original envs are now located at A0000 (dec
> 655360). How come?
>

It is at A0000.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Nanddump bug? Offset error?
January 04, 2015 02:39PM
You are right Bodhi...
I've got the answer why the files turn up different. -o = Dump OOB data...

nanddump -nof mtd0 /dev/mtd0 = filesize 2162688 (don't fit when writing to mtd0), the original envs get pushed to A5000...
nandwrite /dev/mtd0 uboot.mtd0.pogo02.original.kwb
Image 2162688 bytes, NAND page 2048 bytes, OOB area 64 bytes, device size 2097152 bytes
nandwrite: error!: Input file does not fit into device
           error 0 (Success)
nandwrite: error!: Data was only partially written due to error
           error 0 (Success)

nanddump -nf mtd0 /dev/mtd0 = the right way of dumping mtd0....

Bodhi: Your dumps that you uploaded to Dropbox (https://www.dropbox.com/s/58vs4o47y4kjgs3/pogoplug_v4_mtd_original.tar.bz2) includes oob-data so they won't fit...

Also when dumping mtd0 i got a bunch of ECC-errors. After clearing/erasing mtd0, re-writing everything - the ECC are gone when dumping for the second time. Wierd.
Re: Nanddump bug? Offset error?
January 04, 2015 02:53PM
You can restore dumps with oob-data using "-o", my bad...
Re: Nanddump bug? Offset error?
January 05, 2015 05:15AM
JohnW,

Glad you've figured it out! Indeed, we always need the original nanddump command to restore it with nandwrite correctly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Nanddump bug? Offset error?
January 21, 2015 01:41PM
Just a big note!!!

When following Qui's blog on "hacking" the Pogoplugs you download nanddump.

This seems to be a old version of the program in which "-o" means "omit oob-data". In Debian this is the other way around.

If you're backing up a mtd-partition to write it to another Pogoplug you don't want the oob-data-version because it contains bad-block info etc, which is specific to the unit only.

Do when backing up from Pogoplug OS with Que's nanddump, use -o omit oob-data.
Under Debian -o means "Dump oob-data", so just use "-nf" not -"nof" here.

/John
===========================
2x PP Mobile with 8GB SanDisc Ultra SDHC Card
1x PP V4 with 2.5"-drive
Bodhis 2014.07-tld-1 U-Boot + 3.17.0-kirkwood-tld-1 rootfs (using DTF)
Re: Nanddump bug? Offset error?
January 21, 2015 01:51PM
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: