linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Vesta <laguna-mc@mail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Arguments when nanddump mtd partitions
Date: Mon, 29 Apr 2019 11:39:49 +0200	[thread overview]
Message-ID: <20190429113949.0213e769@xps13> (raw)
In-Reply-To: <trinity-5c9b9190-9eab-4324-be77-989be8846f42-1555169751470@3c-app-mailcom-lxa02>

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/

      reply	other threads:[~2019-04-29  9:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-13 15:35 Arguments when nanddump mtd partitions Vesta
2019-04-29  9:39 ` Miquel Raynal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190429113949.0213e769@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=laguna-mc@mail.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).