- 论坛徽章:
- 0
|
在做嵌入式linux开发,mips_linux已经挂载了squashfs根文件系统,由于squashfs是只读文件系统,所以要把flash的一个分区挂载为可读写的ext2文件系统(系统只支持ext2和jfs两种文件系统)但flash分区一直都挂载不上,打印信息如下:
# mount -t ext2 /dev/mtdblock2 /syscfg/
mtdblock_open
ok
mtdblock: read on "syscfg" at 0x400, size 0x200
mtdblock: read on "syscfg" at 0x600, size 0x200
mtdblock_release
ok
mount: mounting /dev/mtdblock2 on /syscfg/ failed: Invalid argument
#
flash分区表如下:
SPI flash was found at CS0, size 0x800000
Creating 3 MTD partitions on "flash_bank_1":
0x000000000000-0x000000300000 : "boot+cfg+linux"
0x000000300000-0x000000500000 : "root fs" (squashfs)
0x000000500000-0x000000800000 : "syscfg" (想挂载为ext2文件系统)
# cat /proc/partitions
major minor #blocks name
31 0 3072 mtdblock0
31 1 2048 mtdblock1
31 2 3072 mtdblock2
#
# cd /dev/
# ls -l
crwxrwxrwx 1 root root 4, 64 Jul 6 17:25 console
lrwxrwxrwx 1 root root 8 Jul 6 07:24 log -> /tmp/log
drwxr-xr-x 2 root root 3 Jul 6 07:24 misc
crwxrwxrwx 1 root root 90, 0 Jul 6 07:24 mtd0
crwxrwxrwx 1 root root 90, 2 Jul 6 07:24 mtd1
crwxrwxrwx 1 root root 90, 4 Jul 6 07:24 mtd2
crwxrwxrwx 1 root root 90, 6 Jul 6 07:24 mtd3
brwxrwxrwx 1 root root 31, 0 Jul 6 07:24 mtdblock0
brwxrwxrwx 1 root root 31, 1 Jul 6 07:24 mtdblock1
brwxrwxrwx 1 root root 31, 2 Jul 6 07:24 mtdblock2
brwxrwxrwx 1 root root 31, 3 Jul 6 07:24 mtdblock3
crwxrwxrwx 1 root root 1, 3 Jul 6 07:24 null
crwxrwxrwx 1 root root 108, 0 Jul 6 07:24 ppp
crwxrwxrwx 1 root root 5, 2 Jul 6 07:24 ptmx
drwxr-xr-x 2 root root 3 Jul 6 07:24 pts
crwxrwxrwx 1 root root 2, 0 Jul 6 07:24 ptyp0
crwxrwxrwx 1 root root 2, 1 Jul 6 07:24 ptyp1
crwxrwxrwx 1 root root 4, 64 Jul 6 07:24 ttyS0
crwxrwxrwx 1 root root 4, 65 Jul 6 07:24 ttyS1
crwxrwxrwx 1 root root 3, 0 Jul 6 07:24 ttyp0
crwxrwxrwx 1 root root 3, 1 Jul 6 07:24 ttyp1
crwxrwxrwx 1 root root 1, 9 Jul 6 07:24 urandom
drwxr-xr-x 2 root root 3 Jul 6 07:24 voip
#
请教各分高手,怎样才能成功以ext2格式挂载 flash的mtdblock2分区到/syscfg目录下呢???
thanks |
|