nand "BCH decoding failed" when using bch8_hw_romcode ecc mode

Tibault Damman tibault.damman at basalte.be
Mon Mar 21 01:04:59 PDT 2022


On 18/03/2022 12:59, Sascha Hauer wrote:
> Have a look at "md -s /dev/nand0.raw 0+2112", then you can see how the
> OOB data should look like and compare it with the data read in
> omap_gpmc_read_page_bch_rom_mode(). The ".raw" is important, I saw you
> printed 2112 bytes from a non raw device. I meant to print a single
> page, on a non raw device that would be 2048. 

Oh thank god, I'm not gonna lie, I was kinda worried when I saw no
non-data bytes.

> You might have to enable CONFIG_MTD_RAW_DEVICE to get the raw device.

Thanks, that's exactly why I couldn't find the raw device.

Linux writes:
> ...
> 000007f0: 0a363335 0a373335 0a383335 0a393335                536.537.538.539.
> 00000800: a060ffff 7286981b 604c42b1 002b5238                ..`....r.BL`8R+.
> 00000810: 9ed8f629 4709bc76 8b658d4d 606e000c                )...v..GM.e...n`
> 00000820: 0d54d92c 98ec3c7d 0048f800 4e9ee01e                ,.T.}<....H....N
> 00000830: 3b4d302e 72844fa4 ffff0099 ffffffff                .0M;.O.r........
                                  ^^
Barebox writes:
> ...
> 000007f0: 0a363335 0a373335 0a383335 0a393335                536.537.538.539.
> 00000800: a060ffff 7286981b 604c42b1 002b5238                ..`....r.BL`8R+.
> 00000810: 9ed8f629 4709bc76 8b658d4d 606e000c                )...v..GM.e...n`
> 00000820: 0d54d92c 98ec3c7d 0048f800 4e9ee01e                ,.T.}<....H....N
> 00000830: 3b4d302e 72844fa4 ffff6e99 ffffffff                .0M;.O.r.n......
                                  ^^

So, interestingly, there does appear to be a 1 byte difference as well...

I'll have a look at the code you mentioned.


Thanks again

Tibault



More information about the barebox mailing list