查看当前内核支持的文件系统
c
cat /proc/filesystems | grep "squashfs
打包bin:
c
mksquashfs system system.bin -comp xz
-comp: COMPRESSION 压缩格式,gzip,lzo ,xz
-b: BLOCK_SIZE 块大小,默认128KB
烧录bin:
c
flashcp -v system.bin /dev/mtd5
挂载bin:
c
mount -t squashfs /dev/mtdblock5 /system
mount //查看文件系统挂载情况
c
/dev/mtdblock5 on /system type squashfs (ro,relatime)
//norflash mtd镜像打包
c
dd if=/dev/mtd0 of=/tmp/mtd0
dd if=/dev/mtd1 of=/tmp/mtd1
dd if=/dev/mtd2 of=/tmp/mtd2
dd if=/dev/mtd3 of=/tmp/mtd3
cd tmp/
cat mtd0 mtd1 mtd2 mtd3 > flash.bin
rm mtd0 mtd1 mtd2 mtd3
或者:
cat /dev/mtd0 /dev/mtd1 /dev/mtd2 /dev/mtd3 > flash.bin