当前位置: 技术问答>linux和unix
Linux 2.6.12的内核,mips CPU, /dev/目录下mtd字符设备只能挂载7个的问题。
来源: 互联网 发布时间:2017-03-20
本文导语: Linux 2.6.12的内核,mips CPU, /dev/目录下mtd字符设备只能挂载7个的问题。 nor flash分区数: # cat /proc/mtd dev: size erasesize name mtd0: 01800000 00020000 "rootfs" mtd1: 00280000 00020000 "vmlinux" mtd2: 00100000 00020000 "config...
Linux 2.6.12的内核,mips CPU, /dev/目录下mtd字符设备只能挂载7个的问题。
nor flash分区数:
# cat /proc/mtd
dev: size erasesize name
mtd0: 01800000 00020000 "rootfs"
mtd1: 00280000 00020000 "vmlinux"
mtd2: 00100000 00020000 "config1"
mtd3: 00100000 00020000 "config2"
mtd4: 00100000 00020000 "config3"
mtd5: 00100000 00020000 "config4"
mtd6: 00080000 00020000 "splash"
mtd7: 00000080 00020000 "mactype"
mtd8: 00040000 00020000 "feature"
# ls /dev/mtd* -al
crwxr-xr-x 1 nobody nobody 90, 0 Mar 2 2009 /dev/mtd0
crwxr-xr-x 1 nobody nobody 90, 2 Mar 2 2009 /dev/mtd1
crwxr-xr-x 1 nobody nobody 90, 4 Mar 2 2009 /dev/mtd2
crwxr-xr-x 1 nobody nobody 90, 6 Mar 2 2009 /dev/mtd3
crwxr-xr-x 1 nobody nobody 90, 8 Mar 2 2009 /dev/mtd4
crwxr-xr-x 1 nobody nobody 90, 10 Mar 2 2009 /dev/mtd5
crwxr-xr-x 1 nobody nobody 90, 12 Mar 2 2009 /dev/mtd6
brwxr-xr-x 1 nobody nobody 31, 0 Mar 2 2009 /dev/mtdblock0
brwxr-xr-x 1 nobody nobody 31, 1 Mar 2 2009 /dev/mtdblock1
brwxr-xr-x 1 nobody nobody 31, 2 Mar 2 2009 /dev/mtdblock2
brwxr-xr-x 1 nobody nobody 31, 3 Mar 2 2009 /dev/mtdblock3
brwxr-xr-x 1 nobody nobody 31, 4 Mar 2 2009 /dev/mtdblock4
brwxr-xr-x 1 nobody nobody 31, 5 Mar 2 2009 /dev/mtdblock5
brwxr-xr-x 1 nobody nobody 31, 6 Mar 2 2009 /dev/mtdblock6
crwxr-xr-x 1 nobody nobody 90, 1 Mar 2 2009 /dev/mtdr0
crwxr-xr-x 1 nobody nobody 90, 3 Mar 2 2009 /dev/mtdr1
crwxr-xr-x 1 nobody nobody 90, 5 Mar 2 2009 /dev/mtdr2
crwxr-xr-x 1 nobody nobody 90, 7 Mar 2 2009 /dev/mtdr3
crwxr-xr-x 1 nobody nobody 90, 9 Mar 2 2009 /dev/mtdr4
crwxr-xr-x 1 nobody nobody 90, 11 Mar 2 2009 /dev/mtdr5
crwxr-xr-x 1 nobody nobody 90, 13 Mar 2 2009 /dev/mtdr6
如何修改驱动?让后面的两个分区
mtd7: 00000080 00020000 "mactype"
mtd8: 00040000 00020000 "feature"
也在/dev/目录下出现设备名?
nor flash分区数:
# cat /proc/mtd
dev: size erasesize name
mtd0: 01800000 00020000 "rootfs"
mtd1: 00280000 00020000 "vmlinux"
mtd2: 00100000 00020000 "config1"
mtd3: 00100000 00020000 "config2"
mtd4: 00100000 00020000 "config3"
mtd5: 00100000 00020000 "config4"
mtd6: 00080000 00020000 "splash"
mtd7: 00000080 00020000 "mactype"
mtd8: 00040000 00020000 "feature"
# ls /dev/mtd* -al
crwxr-xr-x 1 nobody nobody 90, 0 Mar 2 2009 /dev/mtd0
crwxr-xr-x 1 nobody nobody 90, 2 Mar 2 2009 /dev/mtd1
crwxr-xr-x 1 nobody nobody 90, 4 Mar 2 2009 /dev/mtd2
crwxr-xr-x 1 nobody nobody 90, 6 Mar 2 2009 /dev/mtd3
crwxr-xr-x 1 nobody nobody 90, 8 Mar 2 2009 /dev/mtd4
crwxr-xr-x 1 nobody nobody 90, 10 Mar 2 2009 /dev/mtd5
crwxr-xr-x 1 nobody nobody 90, 12 Mar 2 2009 /dev/mtd6
brwxr-xr-x 1 nobody nobody 31, 0 Mar 2 2009 /dev/mtdblock0
brwxr-xr-x 1 nobody nobody 31, 1 Mar 2 2009 /dev/mtdblock1
brwxr-xr-x 1 nobody nobody 31, 2 Mar 2 2009 /dev/mtdblock2
brwxr-xr-x 1 nobody nobody 31, 3 Mar 2 2009 /dev/mtdblock3
brwxr-xr-x 1 nobody nobody 31, 4 Mar 2 2009 /dev/mtdblock4
brwxr-xr-x 1 nobody nobody 31, 5 Mar 2 2009 /dev/mtdblock5
brwxr-xr-x 1 nobody nobody 31, 6 Mar 2 2009 /dev/mtdblock6
crwxr-xr-x 1 nobody nobody 90, 1 Mar 2 2009 /dev/mtdr0
crwxr-xr-x 1 nobody nobody 90, 3 Mar 2 2009 /dev/mtdr1
crwxr-xr-x 1 nobody nobody 90, 5 Mar 2 2009 /dev/mtdr2
crwxr-xr-x 1 nobody nobody 90, 7 Mar 2 2009 /dev/mtdr3
crwxr-xr-x 1 nobody nobody 90, 9 Mar 2 2009 /dev/mtdr4
crwxr-xr-x 1 nobody nobody 90, 11 Mar 2 2009 /dev/mtdr5
crwxr-xr-x 1 nobody nobody 90, 13 Mar 2 2009 /dev/mtdr6
如何修改驱动?让后面的两个分区
mtd7: 00000080 00020000 "mactype"
mtd8: 00040000 00020000 "feature"
也在/dev/目录下出现设备名?
|
楼主用mkmod手动建立对应的mtd7,mtd8,如果可以用就是表示udev脚本没建立,如果不可以用检查分区源码配置,看源码应该不难的
如:
90, 14 /dev/mtd7
90, 16 /dev/mtd8
还有注意的地方,看看的你flash的实际容量跟分区的地址容量是不是一至
如:
90, 14 /dev/mtd7
90, 16 /dev/mtd8
还有注意的地方,看看的你flash的实际容量跟分区的地址容量是不是一至
|
这个说明是驱动udev脚本建立没有问题,因为只要/dev/mtd7是有效的udev脚本会建立的,因为你手动建立也没成功,
所以是驱动本身有问题
我还是怀疑mtd分区表的那个数组大小跟你的flash大小没对上,导致后面没有实际的flash分区引起的,或者你分区的
多少块分区没有正确的传给mtd驱动
看看别人碰到这问题没有
|
这个的前提是你mknod手动是成功的,再修正udev脚本