public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] reading ubi from a NAND for programming to other devices
@ 2017-10-12 19:51 Tim Harvey
  2018-01-26  9:24 ` Lukasz Majewski
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Harvey @ 2017-10-12 19:51 UTC (permalink / raw)
  To: u-boot

Greetings,

I'm looking to understand what methods are available for
reading/writing ubi/ubifs from an existing NAND flash in order to
duplicate the contents onto another device in U-Boot, Linux, and with
JTAG flashing for production.

Typically I create ubi's using ubinize then I can use U-Boot 'nand
erase' and 'nand write' or JTAG to write the ubi without issues.
However if I use U-Boot 'nand read' to read a ubi then write it back
using the same method I get 'ubi0 warning: ubi_io_read: error -74 (ECC
error)' and 'ubi0 error: ubi_io_read: error -74 (ECC error)' messages
from Linux when its mounted. I find I run into the same problem when
JTAG programming ubi's: no issues when using a ubi created via ubinize
but when flashing one that came from a U-Boot 'nand read' I see ubi
errors when mounting it.

Some testing shows me that I can't use U-Boot nand read/erase/write
once U-Boot has 'attached' the UBI (via the U-Boot 'ubi part' command)
which scans and re-sizes the volume.

If I on the other hand take a ubi from U-Boot 'nand read' and use
Linux ubiformat to flash that onto a new device I get no ubi
warnings/errors when its mounted. My understanding is that ubiformat
is simply preserving erase counters but there must be something else
its doing.

What's going on here and what can I do in U-Boot/JTAG to properly
write ubi that's been read from an existing system? I'm hoping there
is a method that doesn't require iterating over the individual volumes
within the ubi.

Best Regards,

Tim

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

end of thread, other threads:[~2018-01-26  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 19:51 [U-Boot] reading ubi from a NAND for programming to other devices Tim Harvey
2018-01-26  9:24 ` Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox