UBI/UBIFS error

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

UBI/UBIFS error

3,231 Views
pietercardoen
Contributor II

Dear

I have several questions regarding UBI. I'm getting following error when trying to attach to an UBI device (u-boot):

> ubi0: attaching mtd1
> UBI init error 22

I got this error after programming the board with (kernel, in user space):

# flash_erase /dev/mtd0 0 0
# ubiformat /dev/mtd0
# ubiattach -m 0
# ubimkvol /dev/ubi0 -N kernel -s 32MiB

# ubimkvol /dev/ubi0 -N rootfs -s 128MiB

However if I first apply

> nand erase.chip

in u-boot, the programming succeeds and I don't get an error in  u-boot.

What could cause this issue? Could this be related to the ECC?

Furthermore, how can I verify the ECC mode in kernel and in u-boot?

Best regards

Pieter Cardoen

Labels (2)
0 Kudos
3 Replies

1,742 Views
Yuri
NXP Employee
NXP Employee

Hello,

  It is needed to provide special NAND initialization for NXP BSP, using kobs-ng utility.

Please look at "NAND Flash" section of the MFG tool (in ucl2.xml file) how to perform

NAND initialization and system deployment.

IMX6_L4.1.15_1.0.0_MFG_TOOL 

 

Have a great day,

Yuri

 

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer

button. Thank you!

0 Kudos

1,742 Views
pietercardoen
Contributor II

Yuri

I am  using a different memory architecture on our target platform. We have 2 different memories:

NOR flash:

* Bootloader (u-boot)

NAND flash:

An UBI volume is created over the entire device

UBI

  |-> UBIFS: kernelA

  |-> UBIFS: kernelB

  |-> UBIFS: rootfsA

  |-> UBIFS: rootfsB

  |-> UBIFS: data

The bootloader boots correctly and tries to attach to the UBIFS partition kernelA and gives the error:

UBI init error 22

I think this has nothing to do with the kobs-ng command as this is only to flash bootloader & kernel on raw nand.

I think something is wrong related to ECC but I don't know how to debug this.

Thanks

Pieter

0 Kudos

1,743 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Can we say, that kobs-ng was never applied  ?

Strictly speaking it must be used. 

Regards,

Yuri.

0 Kudos