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.

请教一下,nand flash 更换为256M后,rootfs 分区卷大小为何没有相应更改?



ubi制作过程:
 1
 mkdir boot
 cp uImage tci6614-evm.dtb boot/  /*把内核和设备树copy到这里*/
 ./mkfs.ubifs -r boot -F -o tci6614-boot.ubifs.img -m 2048 -e 126976 -c 41
 2
 制作rootfs的 ubi-img 
 mkdir rootfs /*把rootfs文件内容copy到这里*/
 ./mkfs.ubifs -r rootfs -F -o tci6614-rootfs.ubifs.img -m 2048 -e 126976 -c 214
 3
 编辑ubinize.cfg 内容,一共分为2个卷:boot和 rootfs 
[boot]
mode=ubi
image=tci6614-boot.ubifs.img
vol_type=dynamic
vol_id=0
vol_name=boot
vol_size=10MiB
[rootfs]
mode=ubi
image=tci6614-rootfs.ubifs.img
vol_id=1
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
 ./ubinize -o tci6614-evm-ubifs.ubi -m 2048 -p 128KiB -s 2048 -O 2048 ubinize.cfg
 
rootfs 卷 作为根目录挂载点
当nand 大小为128M时,内核启动相关打印如下:
Generic platform RAM MTD, (c) 2004 Simtec Electronics
ONFI flash detected
ONFI param page 0 valid
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xa1 (Micron MT29F1G08ABBDAHC)
Bad block table found at page 65472, version 0x02
Bad block table found at page 65408, version 0x02
nand_read_bbt: bad block at 0x0000003e0000
Creating 3 MTD partitions on "davinci_nand.0":         ----------------- nand分了三个分区 u-boot, params, ubifs; ubifs又分为2个卷:[boot] 和[rootfs]
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000180000 : "params"
0x000000180000-0x000008000000 : "ubifs"
davinci_nand davinci_nand.0: controller rev. 2.5
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       0
UBI: attached mtd2 to ubi0
UBI: MTD device name:            "ubifs"
UBI: MTD device size:            126 MiB -----------------ubifs 分区 大小为126M
UBI: number of good PEBs:        1007
UBI: number of bad PEBs:         5
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     2
UBI: available PEBs:             17
UBI: total number of reserved PEBs: 990
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 1/0
UBI: image sequence number:  1842436994
UBI: background thread "ubi_bgt0d" started, PID 337
m25p80 spi0.0: n25q032 (4096 Kbytes)
Creating 2 MTD partitions on "m25p80":
0x000000000000-0x000000080000 : "u-boot-spl"
0x000000080000-0x000000400000 : "test" 
....
UBIFS: parse sync
UBIFS: start fixing up free space
UBIFS: free space fixup complete
UBIFS: mounted UBI device 0, volume 1, name "rootfs"   ----------------------- 其中rootfs 卷 大小为102M
UBIFS: file system size:   107421696 bytes (104904 KiB, 102 MiB, 846 LEBs)
UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 168K
当nand 设备大小为256M时,内核启动相关打印如下:
Generic platform RAM MTD, (c) 2004 Simtec Electronics
ONFI flash detected
ONFI param page 0 valid
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xaa (Micron MT29F2G08ABD)
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
Creating 3 MTD partitions on "davinci_nand.0":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000180000 : "params"
0x000000180000-0x000010000000 : "ubifs"
davinci_nand davinci_nand.0: controller rev. 2.5
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       2
UBI: attached mtd2 to ubi0
UBI: MTD device name:            "ubifs"
UBI: MTD device size:            254 MiB    -----------------ubifs 分区 大小为254M
UBI: number of good PEBs:        2032
UBI: number of bad PEBs:         4
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     2
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 2032
UBI: number of PEBs reserved for bad PEB handling: 20
UBI: max/mean erase counter: 1/0
UBI: image sequence number:  933843460
UBI: background thread "ubi_bgt0d" started, PID 337
m25p80 spi0.0: n25q032 (4096 Kbytes)
Creating 2 MTD partitions on "m25p80":
0x000000000000-0x000000080000 : "u-boot-spl"
0x000000080000-0x000000400000 : "test"
.....
UBIFS: parse sync
UBIFS: start fixing up free space
RIO: discover master port 0, RIO0 mport
UBIFS: free space fixup complete
UBIFS: mounted UBI device 0, volume 1, name "rootfs"
UBIFS: file system size:   107421696 bytes (104904 KiB, 102 MiB, 846 LEBs)----------------------不明白rootfs 卷 大小为啥 还是 为102M?
UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 168K