解压 使用squashfs工具创建的 xx.squashfs.img文件

1.从网站https://sourceforge.net/projects/squashfs/files/squashfs/ 下载 squashfs4.3.tar.gz 或者 squashfs4.2.tar.gz

2.解压 squashfs.tar.gz

3.cd squashfs.4.x

4.cd squashfs-tools

5.修改Makefile 去掉 XZ_SUPPORT 1 这一行首的 # 号,保存退出

6.make clean;make

7.没什么问题可以得到squashfs unsquashfs这两个工具

8.执行unsquashfs -h可以看到它支持的信息:

# ./unsquashfs -h
SYNTAX: ./unsquashfs [options] filesystem [directories or files to extract]
-v[ersion] print version, licence and copyright information
-d[est] unsquash to , default "squashfs-root"
-n[o-progress] don't display the progress bar
-no[-xattrs] don't extract xattrs in file system
-x[attrs] extract xattrs in file system (default)
-p[rocessors] use processors.  By default will use
number of processors available
-i[nfo] print files as they are unsquashed
-li[nfo] print files as they are unsquashed with file
attributes (like ls -l output)
-l[s] list filesystem, but don't unsquash
-ll[s] list filesystem with file attributes (like
ls -l output), but don't unsquash
-f[orce] if file already exists then overwrite
-s[tat] display filesystem superblock information
-e[f] list of directories or files to extract.
One per line
-da[ta-queue] Set data queue to Mbytes.  Default 256
Mbytes
-fr[ag-queue] Set fragment queue to Mbytes.  Default
256 Mbytes
-r[egex] treat extract names as POSIX regular expressions
rather than use the default shell wildcard
expansion (globbing)


Decompressors available:
gzip
xz


9.解压指令:

   例如文件rootfs-cpio.squashfs.img

   ./unsquashfs rootfs-cpio.squashfs.img

   执行完毕后会在当前目录下创建squashfs-root目录,东西都在里头


# ./unsquashfs /tmp/rootfs-cpio.squashfs.img
Parallel unsquashfs: Using 2 processors
149 inodes (221 blocks) to write

[==============================================================================================================================================================/] 221/221 100%
created 128 files
created 39 directories
created 19 symlinks
created 2 devices
created 0 fifos
root#

你可能感兴趣的:(linux,arm)