Squashfs(.sfs)是一套供Linux核心使用的GPL开源唯读压缩档案系统。Squashfs能够为档案系统内的档案、inode及目录结构进行压缩,并支援最大1024千位元组的区段,以提供更大的压缩比。Squashfs的设计是专门为一般的唯读档案系统的使用而设计,它可应用於数据备份,又或档系统资源紧绌的电脑上使用。标准版的Squashfs采用gzip的数据压缩。下面是对在Linux中的squashfs格式固件进行解包的过程。
高清播放机的固件解包、修改和封包过程现在成为一个系列,都是完全鼠标图形化操作过程。整个squashfs格式固件的解包、修改和封包过程,都是在Ubuntu10.04LTS的图形界面中点击移动鼠标完成的。实际过程做起来很简单,主要有以下几步:
Ubuntu10.04LTS下载
1、把要修改的squashfs格式固件install.img复制粘贴到“hdp中文”(或“hdp”)文件夹;
2、进到“hdp中文”(或“hdp”)文件夹,双击“解包squashfs”(或“open-squashfs”),自动生成解压文件夹squashfs-root;
3、打开解压文件夹squashfs-root,相当于进到播放机的根目录,在其中根据需要修改;
4、修改完解压文件夹squashfs-root后,回到“hdp中文”(或“hdp”)文件夹,双击“封包squashfs”(或“make-squashfs”),自动生成修改后的squashfs格式固件install.img。
准备
1、登录Ubuntu后,插上u盘,其中包含有要修改的squashfs格式固件install.img以及下载附件解压得到的“squashfs固件解包封包”文件夹。打开“squashfs固件解包封包”文件夹,把其中的“hdp”文件夹和“hdp中文”文件夹复制粘贴到“主文件夹”中。


2、进到“hdp中文”文件夹(在“hdp”文件夹中的解包、修改和封包过程也是一样的),双击“复制tools”,在显示的菜单中点击“在终端中运行”,接着在显示的终端命令窗口中,输入安装Ubuntu10.04LTS时设置的密码后回车,这样就把tools中的unsquashfs和mksquashfs复制到了Ubuntu系统的/usr/bin中了。
3、如果双击“复制tools”,没有显示“在终端中运行”的运行菜单,可能是前面解压复制文件时改变了文件属性,这时可以鼠标右击文件(夹),在属性窗口中重新设置执行权限。




解包
打开u盘,把要修改的squashfs格式固件install.img复制到“hdp中文”文件夹。然后回到“hdp中文”文件夹,双击“解包squashfs”,在显示的菜单中点击“运行”,自动生成两个解压文件夹install.img_FILES和squashfs-root。这样就可以在其中修改了。同时自动把修改前的install.img改为install.img_old。






总结:
欲知更多有关在Linux中的squashfs格式固件的内容,请点击在Linux中的squashfs格式固件修改和封包的过程。