ls1046 ubifs ..?

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

ls1046 ubifs ..?

827 Views
hongyuanz
Contributor IV

nand_rootfs : how ls1046a make ubifs  ..?

cat /proc/mtd
dev: size erasesize name
mtd0: 01000000 00020000 "nand_dtb"
mtd1: 03000000 00020000 "nand_kernel"
mtd2: 0c000000 00020000 "nand_rootfs"
mtd3: 04000000 00040000 "1550000.spi"

0 Kudos
3 Replies

822 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following procedure to make ubifs.

root@localhost:~# zcat /proc/config.gz | grep CONFIG_MTD_UBI=y

CONFIG_MTD_UBI=y

root@localhost:~# flash_erase  /dev/mtd2 0 0

root@localhost:~# ubiattach /dev/ubi_ctrl -m 2

UBI device number 0, total 1788 LEBs (454066176 bytes, 433.0 MiB), available 1748 LEBs (443908096 bytes, 423.3 MiB), LEB size 253952 bytes (248.0 KiB)

root@localhost:~# cat /sys/class/ubi/ubi0/max_vol_count

128

root@localhost:~# ubimkvol /dev/ubi0 -N ubi_rootfs -S 128

Volume ID 0, size 128 LEBs (32505856 bytes, 31.0 MiB), LEB size 253952 bytes (248.0 KiB), dynamic, name "ubi_rootfs", alignment 1

root@localhost:~# mkdir -p mnt;mount -t ubifs ubi0_0 mnt

root@localhost:~# umount -l ubi0_0

0 Kudos

820 Views
hongyuanz
Contributor IV

root@localhost:~# zcat /proc/config.gz | grep CONFIG_MTD_UBI=y
CONFIG_MTD_UBI=y
root@localhost:~# flash_erase /dev/mtd2 0 0
Erasing 128 Kibyte @ bf60000 -- 99 % complete flash_erase: Skipping bad block at 0bf80000
flash_erase: Skipping bad block at 0bfa0000
flash_erase: Skipping bad block at 0bfc0000
flash_erase: Skipping bad block at 0bfe0000
Erasing 128 Kibyte @ bfe0000 -- 100 % complete
root@localhost:~# ubiattach /dev/ubi_ctrl -m 2
UBI device number 0, total 1532 LEBs (194527232 bytes, 185.5 MiB), available 1492 LEBs (189448192 bytes, 180.6 MiB), LEB size 126976 bytes (124.0 KiB)
root@localhost:~# cat /sys/class/ubi/ubi0/max_vol_count
128
root@localhost:~#
root@localhost:~#
root@localhost:~#
root@localhost:~#
root@localhost:~#
root@localhost:~#
root@localhost:~# ubimkvol /dev/ubi0 -N ubi_rootfs -S 128
Volume ID 0, size 128 LEBs (16252928 bytes, 15.5 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "ubi_rootfs", alignment 1
root@localhost:~# mkdir -p mnt;mount -t ubifs ubi0_0 mnt
[ 3108.109353] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 4096 bytes from PEB 516:4096, read 4096 bytes
[ 3108.120214] UBIFS error (ubi0:0 pid 978): ubifs_check_node: bad CRC: calculated 0x8503ef89, read 0x112892cd
[ 3108.129985] UBIFS error (ubi0:0 pid 978): ubifs_check_node: bad node at LEB 0:0
[ 3108.137310] magic 0x6101831
[ 3108.140981] crc 0x112892cd
[ 3108.144739] node_type 6 (superblock node)
[ 3108.149276] group_type 0 (no node group)
[ 3108.153638] sqnum 2
[ 3108.156608] len 4096
[ 3108.159842] key_hash 0 (R5)
[ 3108.163248] key_fmt 0 (simple)
[ 3108.167001] flags 0x8
[ 3108.170136] big_lpt 0
[ 3108.173108] space_fixup 0
[ 3108.176078] min_io_size 2048
[ 3108.179311] leb_size 126976
[ 3108.182717] leb_cnt 128
[ 3108.185852] max_leb_cnt 128
[ 3108.188998] max_bud_bytes 380928
[ 3108.192404] log_lebs 3
[ 3108.195378] lpt_lebs 2
[ 3108.198340] orph_lebs 2
[ 3108.201312] jhead_cnt 1
[ 3108.204283] fanout 8
[ 3108.207254] lsave_cnt 256
[ 3108.210389] default_compr 1
[ 3108.213361] rp_size 749158
[ 3108.216766] rp_uid 0
[ 3108.219736] rp_gid 0
[ 3108.222713] fmt_version 5
[ 3108.225673] time_gran 1000000000
[ 3108.229429] UUID 671F0FA3-D259-4766-9B58-A97394DE129C
[ 3108.235537] UBIFS error (ubi0:0 pid 978): ubifs_read_node: expected node type 6
mount: /root/mnt: mount(2) system call failed: Structure needs cleaning.
root@localhost:~#

0 Kudos

768 Views
yipingwang
NXP TechSupport
NXP TechSupport

I verified the above procedure, there is no problem on LS1046ARDB.

Please check configuration/hardware problem on your target board.

0 Kudos