df、mtd查看嵌入式系统的分区情况

命令:cat  proc/mtd

dev:    size   erasesize  name
mtd0: 01000000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00700000 00010000 "firmware"
mtd5: 00576664 00010000 "rootfs"
mtd6: 001a0000 00010000 "rootfs_data"
mtd7: 00010000 00010000 "preconfig"
mtd8: 00700000 00010000 "firmware2"

       通过以上命令 可以查看嵌入式系统的磁盘分区情况。 

 

基本概念:

    MTD(memory technology device内存技术设备)是用于访问memory设备(ROM、flash)的Linux的子系统。MTD的主要目的是为了使新的memory设备的驱动更加简单,为此它在硬件和上层之间提供了一个抽象的接口,并进行了一个层次划分,层次从上到下大致为:设备文件、MTD设备层、MTD原始设备层、硬件驱动层。MTD的所有源代码在/drivers/mtd子目录下。

 

命令:df

Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                    1664       284      1380  17% /
/dev/root                 4864      4864         0 100% /rom
tmpfs                    30100       252     29848   1% /tmp
/dev/mtdblock6            1664       284      1380  17% /overlay
overlayfs:/overlay        1664       284      1380  17% /
tmpfs                      512         0       512   0% /dev  

    该命令可用来查看文件系统的磁盘使用情况,如上面:mtd中的mtd5  rootfs即为嵌入式系统的文件系统分区。

猜你喜欢

转载自blog.csdn.net/qq_19004627/article/details/80106757