All of lore.kernel.org
 help / color / mirror / Atom feed
* Arguments when nanddump mtd partitions
@ 2019-04-13 15:35 Vesta
  2019-04-29  9:39 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Vesta @ 2019-04-13 15:35 UTC (permalink / raw)
  To: linux-mtd

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"
...

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Arguments when nanddump mtd partitions
  2019-04-13 15:35 Arguments when nanddump mtd partitions Vesta
@ 2019-04-29  9:39 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2019-04-29  9:39 UTC (permalink / raw)
  To: Vesta; +Cc: linux-mtd

Hi Vesta,

Vesta <laguna-mc@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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-29  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-13 15:35 Arguments when nanddump mtd partitions Vesta
2019-04-29  9:39 ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.