[U-Boot] scan_peb ubi error sama5d36 nand flash v2019.01
Stefan Roese
sr at denx.de
Wed Mar 27 05:58:44 UTC 2019
Hi Dan,
On 26.03.19 17:40, Daniel Evans wrote:
> After an install of Nand flash using an SD card and linux script on a custom sama5d36 board, setup with the following partitions:
>
> $ cat /proc/mtd
> dev: size erasesize name
> mtd0: 00040000 00020000 "at91bootstrap"
> mtd1: 000c0000 00020000 "bootloader"
> mtd2: 00080000 00020000 "bootloader env"
> mtd3: 1fe80000 00020000 “rootfs”
>
> And Uboot settings for version v2019.01
>
> setenv loadImages "mtdparts default && ubi part rootfs && ubifsmount ubi0:rootfs && ubifsload 0x22000000 /boot/vmlinuz && ubifsload 0x21000000 /boot/sama5d3.dtb && bootz 0x22000000 - 0x21000000;”
> setenv kernelAddr 0x22000000
> setenv dtbAddr 0x21000000
> setenv bootcmd "run loadImages"
>
> I get the following Uboot error after the ubi part rootfs command:
>
> ubi0: attaching mtd4
> ubi0 error: scan_peb: bad image sequence number 115116184 in PEB 4080, expected 273711372
> Erase counter header dump:
> magic 0x55424923
> version 1
> ec 1
> vid_hdr_offset 2048
> data_offset 4096
> image_seq 115116184
> hdr_crc 0x8905e9e9
> erase counter header hexdump:
> ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
> UBI error: cannot attach mtd4
> UBI error: cannot initialize UBI, error -22
> UBI init error 22
> Please check, if the correct MTD partition is used (size big enough?)
From this error message, I suspect that your MTD partition might
not be the correct one in U-Boot (correct size). What does
"mtdparts" show in U-Boot?
> If I do a nand erase.chip then do my SD card install everything
> works. The error shows up if I try to do a second SD card
> install.
Please compare both mtdparts outputs here.
Thanks,
Stefan
More information about the U-Boot
mailing list