This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3356: Kernel boot-up failure with "UBI init error 22 Error, no UBI device/partition selected!"

Part Number: AM3356

1. Our board uses TI's Sitara-am335x processor(Part No: AM3356BZCZD60). We are Currently trying to upgrade to new Micron 8Gb:x8 Flash-model (8SC Part No: MT29F8G08ABACAH4-IT:C)
with page size=4096 Bytes, Block size=256K (256*1024 Bytes).

 (Previously we were using Micron Flash with Part No: MT29F2G08ABAEAH4 with page size=2048 Bytes, Block size=128K (128*1024 Bytes).)

2. We could successfully write MLO, u-boot.img, images from u-boot (after making necessary changes in u-boot source code). 

3. When trying to boot ubi.img (which is the kernel, dtb, rotfs.ubifs consolidated image) from u-boot, we are getting below error

=> tftp $fileaddr ubi.img && nand erase 0x00380000 0x0fe40000 && nand write $fileaddr NAND.RBlob $filesize

nand write was successful

=> setenv bank1 'setenv bootargs console=ttyO0,115200n8 resetDefault=$reset root=ubi0:BANK1_ROOTFS rw rootfstype=ubifs ubi.mtd=7,4096; ubi part NAND.RBlob 4096; ubi read $fileaddr BANK1_FIT;ubi detach ;bootm $fileaddr'

run bank1

ubi0: attaching mtd1
UBI init error 22
Error, no UBI device/partition selected!
Wrong Image Format for bootm command
ERROR: can't get kernel image!

We have made the necessary changes in the dtb file, to provide support for the new page size and block size. Is there any changes that we have missed out in kernel source or in Uboot env commands, leading to the kernel bootup failure.

  • Hi Sreesyam,
    Some useful reference on NAND:
    [0]. u-boot/doc/README.nand
    [1]. linux/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
    [0] nand cmds @u-boot
    [1] kernel DT (including ECC scheme vs NAND OOB size)
    [2] booting kernel/FS from NAND
    [3] how to generate UBIFS for NAND

    You may need to adjust UBI parameters when generating UBIFS when a new NAND is used, and refer to "Table: Table of Parameters to use for Building UBI filesystem image" in [3] on UBI parameter example.