RVMTD驱动框架分析

RVMTD驱动框架分析_第1张图片

紫色部分是不同模块之间的转换函数。

实现代码 fs jffs2 supper.c

[root@arm-linux]#mount -t jffs2 /dev/mtdblock4 /media/userdata/
[  671.810735] =1= mount_mtd
[  671.810897] =2= mount_mtd
[  671.810928] =51= mount_mtd
[  671.811788] =52= mount_mtd
[  671.811858] =53= mount_mtd
[  671.811887] =1=mount_mtd_nr
[  671.811920] get_mtd_device num=4
[  671.811947] =2=get_mtd_device num=4
[  671.811976] =41=get_mtd_device num=4
[  671.812003] =1=__get_mtd_device
[  671.812027] =4=get_mtd_device err=0
[  671.812053] =5=get_mtd_device num=4
[  671.812082] =2=mount_mtd_nr
[  671.812108] =1=mount_mtd_aux
[  671.815272] =2=mount_mtd_aux
[  671.815306] =3=mount_mtd_aux
[  672.146965] =4=mount_mtd_aux
尚不知道实现代码位置
[root@arm-linux]#cat /proc/partitions 
major minor  #blocks  name

  31        0         28 mtdblock0
  31        1        192 mtdblock1
  31        2       6144 mtdblock2
  31        3       9216 mtdblock3
  31        4       1024 mtdblock4
 179        0   15558144 mmcblk0
 179        1   15554048 mmcblk0p1


mtdcore.c
[root@arm-linux]#cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00007000 00010000 "vendor"
mtd1: 00030000 00010000 "IDBlock"
mtd2: 00600000 00010000 "kernel"
mtd3: 00900000 00010000 "rootfs"
mtd4: 00100000 00010000 "parameters"


mtdchar.c
[root@arm-linux]#cat /proc/filesystems 
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   tmpfs
nodev   devtmpfs
nodev   debugfs
nodev   sockfs
nodev   pipefs
nodev   anon_inodefs
nodev   configfs
nodev   devpts
        squashfs
nodev   ramfs
        vfat
        msdos
        exfat
nodev   jffs2
nodev   mtd_inodefs
nodev   functionfs


你可能感兴趣的:(linux开发总结)