bad image sequence number ubi_error even after flash_eraseall

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bad image sequence number ubi_error even after flash_eraseall

2,592 Views
mihaitaivascu
Contributor III

Hi all,    

  I was able to update the NAND succesfully using MFGtools on my imx6l phytec board.

    But when I try to boot the image I got the following issues:

 

booting 'nand'
ubi0 error: scan_peb: bad image sequence number 459621934 in PEB 832, expected 706885778
Erase counter header dump:
        magic          0x55424923
        version        1
        ec             1
        vid_hdr_offset 2048
        data_offset    4096
        image_seq      459621934
        hdr_crc        0x49c942ea
erase counter header hexdump:
00000000: 23494255 00000001 00000000 01000000                UBI#............
00000010: 00080000 00100000 2e46651b 00000000                .........eF.....
00000020: 00000000 00000000 00000000 00000000                ................
00000030: 00000000 00000000 00000000 ea42c949                ............I.B.
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd0, error -22
failed to attach: Invalid argument
could not open /dev/nand0.root.ubi.kernel: No such file or directory
Booting 'nand' failed: No such file or directory
booting 'nand' failed: No such file or directory
 What could be wrong?
  I have modified ucl2.xml script so it does flash_eraseall on all mtd partitions. The error persists. What should I investigate next? Is there an alternative to ubifs? Should I check for specific ubifs features in my barebox image?    
Thanks,
      Mihaita
  
  
Labels (1)
0 Kudos
3 Replies

1,816 Views
mihaitaivascu
Contributor III

So I am trying to manually do ubiformat and ubiattach from the barebox bootloader and I get the following:

type exit to get to the menu
barebox@Phytec phyCORE-i.MX6 Ultra Lite SOM:/
barebox@Phytec phyCORE-i.MX6 Ultra Lite SOM:/
barebox@Phytec phyCORE-i.MX6 Ultra Lite SOM:/
barebox@Phytec phyCORE-i.MX6 Ultra Lite SOM:/ ubiformat /dev/nand0.root
ubiformat: nand0.root (nand), size 531628032 bytes (507 MiB), 4056 eraseblocks of 131072 bytes (128 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 4055 -- 100 % complete
ubiformat: 3988 eraseblocks have valid erase counter, mean value is 0
ubiformat: 35 eraseblocks are supposedly empty
ubiformat: 4 bad eraseblocks found, numbers: 4052, 4053, 4054, 4055
ubiformat: warning!: 29 of 4052 eraseblocks contain non-ubifs data
ubiformat: warning!: use '-y' to force erasing
ubiformat: Invalid argument
barebox@Phytec phyCORE-i.MX6 Ultra Lite SOM:/ ubiattach /dev/nand0.root
ubi0 error: scan_peb: bad image sequence number -163685122 in PEB 832, expected 962560839
Erase counter header dump:
magic 0x55424923
version 1
ec 1
vid_hdr_offset 2048
data_offset 4096
image_seq -163685122
hdr_crc 0xd05fc800
erase counter header hexdump:
00000000: 23494255 00000001 00000000 01000000 UBI#............
00000010: 00080000 00100000 fe5c3ef6 00000000 .........>\.....
00000020: 00000000 00000000 00000000 00000000 ................
00000030: 00000000 00000000 00000000 00c85fd0 ............._..
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd0, error -22
failed to attach: Invalid argument

What could be the issue?

Best regards,

         Mihaita

0 Kudos

1,816 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Mihaita,

Is this issue persisting?

I would suggest looking for more insights directly with Phytec, which support this board and its BSP.

Regards,

0 Kudos

1,816 Views
mihaitaivascu
Contributor III

Hi,

    Yes, the issue was not been solved. Phytec cannot help or are not so eager to help, at least not for free.

Regards,

       Mihaita

0 Kudos