→ alongalone: flash的size是以block為單位啊.. 10/22 07:33
從df得到的rootfs的大小來看block size應該也是1K
從dmesg來換算也是如此
[ 0.710000] Creating 5 MTD partitions on "spi0.0":
[ 0.720000] 0x000000000000-0x000000020000 : "u-boot"
[ 0.720000] 0x000000020000-0x00000012ed38 : "kernel"
[ 0.730000] mtd: partition "kernel" must either start or end on erase
block boundary or be smaller than an erase block -- forcing read-only
[ 0.740000] 0x00000012ed38-0x0000007f0000 : "rootfs"
[ 0.750000] mtd: partition "rootfs" must either start or end on erase
block boundary or be smaller than an erase block -- forcing read-only
[ 0.760000] mtd: device 2 (rootfs) set to be root filesystem
[ 0.770000] 1 squashfs-split partitions found on MTD device rootfs
[ 0.770000] 0x000000300000-0x0000007f0000 : "rootfs_data"
[ 0.780000] 0x0000007f0000-0x000000800000 : "art"
[ 0.790000] 0x000000020000-0x0000007f0000 : "firmware"
※ 編輯: hl4 (61.219.255.69), 10/22/2014 09:44:46
→ alongalone: 我的想法是1860要吃掉2個block,所以看到就是2048 10/22 11:21
→ alongalone: 如果有什麼地方沒考慮到的,在麻煩你指點..:) 10/22 11:22
千萬別這麼說,我在embedded linux完全是新手,能得到意見或是討論我就很高興了:D
不太懂1860被吃掉兩個block之後,為什麼會變多為2048
真的這樣變的話,不就占用到其他的分割區了嗎?
另外,有沒有什麼方法能讓我驗證這個想法呢,謝謝
推 drag: 請問erase block大小?1024K? 10/22 13:38
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00010000 "u-boot"
mtd1: 0010ed38 00010000 "kernel"
mtd2: 006c12c8 00010000 "rootfs"
mtd3: 004f0000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 007d0000 00010000 "firmware"
erasesize 應該是 64K
※ 編輯: hl4 (61.219.255.69), 10/22/2014 16:35:08
→ alongalone: 我發現我誤會了,原來你上面那些都是block為單位了. 10/22 21:15
→ alongalone: 你的file system是哪種格式的啊 10/22 21:15
→ alongalone: 有沒有可能是你的rootfs image超過partition size了 10/22 22:49
rootfs是 overlayfs,其下包含/rom (SquashFS) 和rootfs_data (JFFS2)
我不知道你說的有沒有可能發生,不過也不知道怎麼確認是不是這麼回事
※ 編輯: hl4 (61.219.255.69), 10/23/2014 09:27:53