mtd与mtdblock节点的对应问题
在linux中,在flash驱动中对NOR flash进行分区,然后在makfile中创建设备节点如下:
flash中分别分了6个分区,假设分别依次地址连续为:
0.boot
1.kernel
2.jffs2
3.user1
4.user2
5.user3
在makfile中device下创建以下节点:
mtd0,c,90,0 mtd1,c,90,1 mtd2,c,90,2 \
mtd3,c,90,3 mtd4,c,90,4 mtd5,c,90,5 \
mtdblock0,b,31,0 mtdblock1,b,31,1 mtdblock2,b,31,2 \
mtdblock3,b,31,3 mtdblock4,b,31,4 mtdblock5,b,31,5 \
我知道mtdblock(x:0-5)对应的就是分区0-5,如内核启动参数为,root=/dev/mtdblock2
如果要对分区进行擦写操作,就需要mtd设备,如:
file=/dev/mtd4,我想的是这个mtd4对应的就是mtdblock4分区,就user2分区,
如果实现我的想法,我上面makfile创建节点的方法是不是有问题,
因为我在操作/dev/mtd4时,发现并不是user2分区