I am using Yocto Zeus with 5.4 kernel and u-boot 2020.04.
I build the ubi image, and the only message I see from ubinize is:
ubinize: volume size was not specified in section "ubifs", assume minimum to fit image.
In U-Boot:
=> ubi part nandrootfs
ubi0: attaching mtd7
ubi0: scanning is finished
ubi0: volume table was restored
ubi0: volume 0 ("imx6ull14x14evk-rootfs") re-sized from 290 to 1916 LEBs
ubi0: attached mtd7 (name "nandrootfs", size 490 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
ubi0: good PEBs: 1956, bad PEBs: 4, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 159654406
ubi0: available PEBs: 0, total reserved PEBs: 1956, PEBs reserved for bad PEB handling: 36
I know the device has 4 blocks marked bad.
Layout:
=> ubi info layout
Volume information dump:
vol_id 0
reserved_pebs 1916
alignment 1
data_pad 0
vol_type 3
name_len 22
usable_leb_size 253952
used_ebs 1916
used_bytes 486572032
last_eb_bytes 253952
corrupted 0
upd_marker 0
skip_check 0
name imx6ull14x14evk-rootfs
Volume information dump:
vol_id 2147479551
reserved_pebs 2
alignment 1
data_pad 0
vol_type 3
name_len 13
usable_leb_size 253952
used_ebs 2
used_bytes 507904
last_eb_bytes 2
corrupted 0
upd_marker 0
skip_check 0
name layout volume
Mount result:
=> ubifsmount ubi0:imx6ull14x14evk-rootfs
UBIFS error (ubi0:0 pid 0): ubifs_read_node: bad node type (255 but expected 6)
UBIFS error (ubi0:0 pid 0): ubifs_read_node: bad node at LEB 0:0, LEB mapping status 0
Not a node, first 24 bytes:Error reading superblock on volume 'ubi0:imx6ull14x14evk-rootfs' errno=-22!
ubifsmount - mount UBIFS volume
Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
Kernel:
[ 2.495649] ubi0: default fastmap pool size: 95
[ 2.500225] ubi0: default fastmap WL pool size: 47
[ 2.505216] ubi0: attaching mtd6
[ 3.056892] ubi0: scanning is finished
[ 3.072096] ubi0 warning: ubi_eba_init: cannot reserve enough PEBs for bad PEB handling, reserved 34, need 36
[ 3.085277] ubi0: attached mtd6 (name "nandrootfs", size 490 MiB)
[ 3.091421] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[ 3.098413] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
[ 3.105337] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
[ 3.112327] ubi0: good PEBs: 1956, bad PEBs: 4, corrupted PEBs: 0
[ 3.118481] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[ 3.125852] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 159654406
[ 3.134966] ubi0: available PEBs: 0, total reserved PEBs: 1956, PEBs reserved for bad PEB handling: 34
[ 3.144319] ubi0: background thread "ubi_bgt0d" started, PID 114
...
[ 3.343148] (driver?)
[ 3.349749] 1f06 501760 mtdblock6
[ 3.349755] (driver?)
[ 3.356337] No filesystem could mount root, tried:
[ 3.356341] ubifs
[ 3.361228]
[ 3.364747] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 3.373038] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
Solved! Go to Solution.
I found the following useful information on ubifs:
http://www.linux-mtd.infradead.org/faq/ubifs.html#L_mkfubifs
In order to create the ubifs successfully you need parameters set for the NAND. I was able to boot from SD card and inspect my NAND with:
mtdinfo /dev/mtd0 -u
I was then able to set the following ubifs parameters in my conf/machine/${MACHINE} file:
MKUBIFS_ARGS = "-m 4096 -e 253952 -c 1932"
UBINIZE_ARGS = "-p 256KiB -m 4096"
I found the following useful information on ubifs:
http://www.linux-mtd.infradead.org/faq/ubifs.html#L_mkfubifs
In order to create the ubifs successfully you need parameters set for the NAND. I was able to boot from SD card and inspect my NAND with:
mtdinfo /dev/mtd0 -u
I was then able to set the following ubifs parameters in my conf/machine/${MACHINE} file:
MKUBIFS_ARGS = "-m 4096 -e 253952 -c 1932"
UBINIZE_ARGS = "-p 256KiB -m 4096"
Hi John
for that issue one can recheck nand programming procedure, for example
https://variwiki.com/index.php?title=Yocto_NAND_Flash_Burning
Best regards
igor