查看squashfs压缩信息
代码语言:javascript复制# 安装mksquashfs工具
apt install mtd-utils
# 查看压缩信息
unsquashfs -s root-glibc-toolchain4.7.2-1.1.squashfs
# 显示
Found a valid SQUASHFS 4:0 superblock on root-glibc-toolchain4.7.2-1.1.squashfs.
Creation or last append time Tue Feb 23 08:42:12 2021
Filesystem size 1582.11 Kbytes (1.55 Mbytes)
Compression xz
Block size 131072
Filesystem is exportable via NFS
Inodes are compressed
Data is compressed
Fragments are compressed
Always-use-fragments option is not specified
Xattrs are compressed
Duplicates are removed
Number of fragments 5
Number of inodes 313
Number of ids 2
可以看到压缩方式xz,blocksize131072
解压
unsquashfs root-glibc-toolchain4.7.2-1.1.squashfs 会解包到当前目录下的squashfs-root文件夹
代码语言:javascript复制unsquashfs root-glibc-toolchain4.7.2-1.1.squashf
打包
代码语言:javascript复制mksquashfs rootfs[输入文件加] rootfs.squashfs[输出文件名] -comp xz