All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard.weinberger@gmail.com>
To: Jupiter <jupiter.hce@gmail.com>
Cc: u-boot@lists.denx.de, linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: Issue with 'ubi part' ubi_io_read: error -74 (ECC error)
Date: Tue, 19 May 2020 13:17:10 +0200	[thread overview]
Message-ID: <CAFLxGvxp3+JuaEatmMg_tvMFonSVC-pwhiB_ikf6i_edAGPewA@mail.gmail.com> (raw)
In-Reply-To: <CAA=hcWQ8ZjjdzdTVtBas42L0_qbhJhayqogz_Gg5wgtDBVo+hg@mail.gmail.com>

On Sun, May 17, 2020 at 1:28 PM Jupiter <jupiter.hce@gmail.com> wrote:
>
> Sorry for a bit recalcitrant with the issue of calling 'ubi part"
> error -74 -EBADMSG, is it MTD issue or u-boot issue?
>
> I used Linux kernel 4.19 to flash UBIFS volume images ubi.img to
> imx6ull NAND using following command in Linux:
>
> flash_erase /dev/mtd2 0 0
> ubiformat /dev/mtd2 -f ubi.img
>
> The flashing image process went well, not errors, but in NAND booting
> (u-boot version 2018), running "ubi part" stuck following errors:
>
> ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 2
> 35:0, read 64 bytes
> ubi0 error: ubi_io_read: error -74 (ECC error) while reading 2048 bytes from PEB
>  235:2048, read 2048 bytes
>
> The document says "The -74 error code is -EBADMSG and means an ECC
> error. In other words, UBI tried to read some data from the flash, but
> the flash driver found that there is an uncorrectable ECC error, and
> returned -EBADMSG."
>
> My question for ubiformat, how does it write ECC to UBIFS volume
> partition when it flashed UBIFS image to NAND?

Neither UBI nor UBIFS care about ECC. The MTD stack does.
If you write something in Linux you cannot read back in u-boot a common
problem is that u-boot and Linux use different MTD settings (layout,
ECC, etc...).

-- 
Thanks,
//richard

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

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard.weinberger@gmail.com>
To: u-boot@lists.denx.de
Subject: Issue with 'ubi part' ubi_io_read: error -74 (ECC error)
Date: Tue, 19 May 2020 13:17:10 +0200	[thread overview]
Message-ID: <CAFLxGvxp3+JuaEatmMg_tvMFonSVC-pwhiB_ikf6i_edAGPewA@mail.gmail.com> (raw)
In-Reply-To: <CAA=hcWQ8ZjjdzdTVtBas42L0_qbhJhayqogz_Gg5wgtDBVo+hg@mail.gmail.com>

On Sun, May 17, 2020 at 1:28 PM Jupiter <jupiter.hce@gmail.com> wrote:
>
> Sorry for a bit recalcitrant with the issue of calling 'ubi part"
> error -74 -EBADMSG, is it MTD issue or u-boot issue?
>
> I used Linux kernel 4.19 to flash UBIFS volume images ubi.img to
> imx6ull NAND using following command in Linux:
>
> flash_erase /dev/mtd2 0 0
> ubiformat /dev/mtd2 -f ubi.img
>
> The flashing image process went well, not errors, but in NAND booting
> (u-boot version 2018), running "ubi part" stuck following errors:
>
> ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 2
> 35:0, read 64 bytes
> ubi0 error: ubi_io_read: error -74 (ECC error) while reading 2048 bytes from PEB
>  235:2048, read 2048 bytes
>
> The document says "The -74 error code is -EBADMSG and means an ECC
> error. In other words, UBI tried to read some data from the flash, but
> the flash driver found that there is an uncorrectable ECC error, and
> returned -EBADMSG."
>
> My question for ubiformat, how does it write ECC to UBIFS volume
> partition when it flashed UBIFS image to NAND?

Neither UBI nor UBIFS care about ECC. The MTD stack does.
If you write something in Linux you cannot read back in u-boot a common
problem is that u-boot and Linux use different MTD settings (layout,
ECC, etc...).

-- 
Thanks,
//richard

  reply	other threads:[~2020-05-19 11:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 11:27 Issue with 'ubi part' ubi_io_read: error -74 (ECC error) Jupiter
2020-05-17 11:27 ` Jupiter
2020-05-17 11:27 ` Jupiter
2020-05-19 11:17 ` Richard Weinberger [this message]
2020-05-19 11:17   ` Richard Weinberger
2020-05-19 12:06   ` Jupiter
2020-05-19 12:06     ` Jupiter
2020-05-22  4:03     ` Heiko Schocher
2020-05-22  4:03       ` Heiko Schocher
2020-05-22 12:19       ` Jupiter
2020-05-22 12:19         ` Jupiter

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=CAFLxGvxp3+JuaEatmMg_tvMFonSVC-pwhiB_ikf6i_edAGPewA@mail.gmail.com \
    --to=richard.weinberger@gmail.com \
    --cc=jupiter.hce@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=u-boot@lists.denx.de \
    /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 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.