Arguments when nanddump mtd partitions

Miquel Raynal miquel.raynal at bootlin.com
Mon Apr 29 02:39:49 PDT 2019


Hi Vesta,

Vesta <laguna-mc at mail.com> wrote on Sat, 13 Apr 2019 17:35:51 +0200:

> Hello,
> 
> what should be the proper arguments when make backup of mtd partitions?
> 
> nanddump -f /tmp/mtd0 /dev/mtd0
> or
> nanddump --noecc --omitoob -f /tmp/mtd0 /dev/mtd0
> 
> 
> # cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00060000 00004000 "u-boot"
> mtd1: 00020000 00004000 "u-bootenv"
> mtd2: 013e0000 00004000 "ROMIMAGE"
> mtd3: 00700000 00004000 "HALFIMAGE"
> mtd4: 01260000 00004000 "LINUX_ROOTFS"
> mtd5: 00200000 00004000 "HS_FW"
> ...
> 

I would say that it depends on your controller driver.

Ideally, you should read data+OOB with ECC enabled. Also enable the ECC
correction when writing back. But if you controller driver has no
proper support for it and you don't care about OOB (generally: in all
cases but JFFS2) you may want to just dump the data.

If for some reason you decide to dump the data in raw mode, then you
will need the OOB bytes and you will need to write them back in raw
mode as well.

Thanks,
Miquèl



More information about the linux-mtd mailing list