public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eugen.Hristev at microchip.com <Eugen.Hristev@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] scan_peb ubi error sama5d36 nand flash v2019.01
Date: Wed, 27 Mar 2019 07:01:21 +0000	[thread overview]
Message-ID: <8d791e4d-de3e-bc06-0b5c-f1ff20b2996a@microchip.com> (raw)
In-Reply-To: <60C8E5C6-F5E7-44AC-8C6E-E838716BDCC8@gmail.com>



On 26.03.2019 18: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?)
> 
> 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.
> 
> Of note is the fact that I do not see this issue if I use an old version 
> of uboot (2014).
> 
> Any insight?

It looks like the MTD partitioning has changed as expected in u-boot 
2019 vs 2014, and maybe you need to use mtd5 instead of mtd4 ?
Check the layout and see if it's as expected...

About our current flash layout:

http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d3XplainedMainPage#NAND_Flash_demo_Memory_map

maybe mtdparts default is not doing the proper thing ?

> 
> Dan
> 
> 

      parent reply	other threads:[~2019-03-27  7:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  1:13 [U-Boot] no DTB with nand SPL on sama5d3 Daniel Evans
2019-01-16 13:02 ` Eugen.Hristev at microchip.com
2019-01-16 19:05   ` Daniel Evans
2019-01-17  9:01     ` Eugen.Hristev at microchip.com
2019-01-17  9:05       ` Simon Goldschmidt
2019-01-17  9:09         ` Eugen.Hristev at microchip.com
2019-01-17 18:38           ` Daniel Evans
2019-01-17 21:34           ` Daniel Evans
2019-01-20 15:23             ` Ben Whitten
2019-01-21  8:06               ` Eugen.Hristev at microchip.com
2019-01-21 20:51                 ` Daniel Evans
2019-03-26 16:40                   ` [U-Boot] scan_peb ubi error sama5d36 nand flash v2019.01 Daniel Evans
2019-03-27  5:58                     ` Stefan Roese
2019-03-27  7:01                     ` Eugen.Hristev at microchip.com [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=8d791e4d-de3e-bc06-0b5c-f1ff20b2996a@microchip.com \
    --to=eugen.hristev@microchip.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox