技术标签: linux内核问题
quashfs是以linux 内核源码补丁的形式发布,附带mksquashfs工具,用于创建squash文件系统。squashfs可以将整个文件系统或者某个单一的目录压缩在一起, 存放在某个设备, 某个分区或者普通的文件中. 如果你将其压缩到一个设备中, 那么你可以将其直接mount起来使用; 而如果它仅仅是个文件,你可以将其当为一个loopback 设备使用. squashfs文件系统的设计令人欣喜. For archiving purposes, 它可以让你更加灵活的使用, 而且它比.tar.gz文档有更快的响应速度。
以下是squash文件系统的特点:
· 数据(data),节点(inode)和目录(directories)都被压缩。
· 保存了全部的32位UID/GIDS和文件的创建时间. (注: cramfs是8位,没有创建时间)。
· 支持多达4G的文件系统. (cramfs是16M)。
· 节点和目录都是高度压缩, 而且都是存储在字节边界(packed on byte boundaries); 所有压缩的节点长度平均在8个字节左右.(具体的长度根据文件的类型是不同的. 比如, 普通文件,目录,符号链接,块设备和字符设备的节点的大小就不一样)。
· squashfs可以允许块大小(block size)达32Kb(1.x)和64kb(2.x), 这样可以达到比4K块大小更大的压缩率。
· squashfs 2引进了碎片块(fragment blocks)的概念: 一种将许多比块size 小的文件存储在一个块中, 以达到更大的压缩率。
· 重复的文件会被检测并删除掉。
· 同时支持big和little endian架构. SQ可以将文件系统MOUNT到不同的字节顺序(byte-order)的机器上面
1.重新打包和编译Linux内核, 使之支持SQ.
2.编译mksquashfs工具.
3.使用mksquashf创建压缩文件系统.
4.试用: mount suqash文件系统到一个临时目录.
5.如果需要的话,更改/etc/fstab 或者起始脚本, 以使linux操作系统自动加载新的 squashfs 文件系统.
mksquashfs rootfs_station ${
ZRT_ENV_TMP_STATION_ROOTFS_FILE_PATH} -comp xz
rootfs_station这个目录下是我们的文件系统,把他已xz的压缩方式,制作成squashfs,输出到**${ZRT_ENV_TMP_STATION_ROOTFS_FILE_PATH}**
使用:
mount -t squashfs /dev/mtdblock5 /system
首先要保证内核支持squashfs
https://blog.csdn.net/qq_38350702/article/details/106497628
https://manpages.debian.org/testing/squashfs-tools/mksquashfs.1.en.html
mksquashfs SOURCE [SOURCE2 …] DESTINATION [OPTIONS]
OPTIONS
Filesystem build options
-comp COMPRESSION
select COMPRESSION compression. Compressors available: gzip (default), lzo, xz.
-b BLOCK_SIZE
set data block to BLOCK_SIZE. Default 131072 bytes.
-no-exports
don’t make the filesystem exportable via NFS.
-no-sparse
don’t detect sparse files.
-no-xattrs
don’t store extended attributes.
-xattrs
store extended attributes (default).
-noI
do not compress inode table.
-noD
do not compress data blocks.
-noF
do not compress fragment blocks.
-noX
do not compress extended attributes.
-no-fragments
do not use fragments.
-always-use-fragments
use fragment blocks for files larger than block size.
-no-duplicates
do not perform duplicate checking.
-all-root
make all files owned by root.
-force-uid uid
set all file uids to uid.
-force-gid gid
set all file gids to gid.
-nopad
do not pad filesystem to a multiple of 4K.
-keep-as-directory
if one source directory is specified, create a root directory containing that directory, rather than the contents of the directory.
Filesystem filter options
-p PSEUDO_DEFINITION
Add pseudo file definition.
-pf PSEUDO_FILE
Add list of pseudo file definitions.
-sort SORT_FILE
sort files according to priorities in SORT_FILE. One file or dir with priority per line. Priority -32768 to 32767, default priority 0.
-ef EXCLUDE_FILE
list of exclude dirs/files. One per line.
-wildcards
Allow extended shell wildcards (globbing) to be used in exclude dirs/files
-regex
Allow POSIX regular expressions to be used in exclude dirs/files.
Filesystem append options
-noappend
do not append to existing filesystem.
-root-becomes NAME
when appending source files/directories, make the original root become a subdirectory in the new root called NAME, rather than adding the new source items to the original root.
Mksquashfs runtime options:
-version
print version, licence and copyright message.
-recover NAME
recover filesystem data using recovery file NAME.
-no-recovery
don’t generate a recovery file.
-info
print files written to filesystem.
-no-progress
don’t display the progress bar.
-processors NUMBER
Use NUMBER processors. By default will use number of processors available.
-read-queue SIZE
Set input queue to SIZE Mbytes. Default 64 Mbytes.
-write-queue SIZE
Set output queue to SIZE Mbytes. Default 512 Mbytes.
-fragment-queue SIZE
Set fragment queue to SIZE Mbytes. Default 64 Mbytes.
Miscellaneous options
-root-owned
alternative name for -all-root.
-noInodeCompression
alternative name for -noI.
-noDataCompression
alternative name for -noD.
-noFragmentCompression
alternative name for -noF.
-noXattrCompression
alternative name for -noX.
Compressors available and compressor specific options
gzip (no options) (default)
lzo (no options)
xz
-Xbcj filter1,filter2,…,filterN
Compress using filter1,filter2,…,filterN in turn (in addition to no filter), and choose the best compression. Available filters: x86, arm, armthumb, powerpc, sparc, ia64.
-Xdict-size DICT_SIZE
Use DICT_SIZE as the XZ dictionary size. The dictionary size can be specified as a percentage of the block size, or as an absolute value. The dictionary size must be less than or equal to the block size and 8192 bytes or larger. It must also be storable in the xz header as either 2^n or as 2n+2(n+1). Example dict-sizes are 75%, 50%, 37.5%, 25%, or 32K, 16K, 8K etc.
1、什么是UUIDUUID简介通用唯一识别码(英语:Universally Unique Identifier,简称UUID)是一种软件建构的标准,亦为自由软件基金会组织在分散式计算环境领域的一部份。UUID的目的,是让分散式系统中的所有元素,都能有唯一的辨识信息,而不需要通过中央控制端来做辨识信息的指定。如此一来,每个人都可以创建不与其它人冲突的UUID。在这样的情况下,就不需考虑数据库...
功能:将文件压缩成zip,或者rar的压缩包。后缀名可以自定义。使用方法:首先实例化,然后传参。两个参数。第一个关于你文件地址的一个Array。第二个是要你要保存的压缩包文件的绝对地址。使用例子:复制代码 代码如下:$zipfiles =array(“/root/pooy/test1.txt”,”/root/pooy/test2.txt”);$z = new PHPZip();//$randoms...
--收货SELECT loc.location_id, loc.location_code, loc.descriptionFROM hr_locations_all loc, hr_locations_all_tl lotwhere loc.ship_to_site_flag = 'Y'and sysdate < nvl(trunc(loc.inactive_date), sysdate ...
cat 命令(文本输出命令)通常查找出错误日志 cat error.log | grep 'nick' , 这时候我们要输出当前这个日志的前后几行:显示file文件里匹配nick那行以及上下5行cat error.log | grep -C 5 'nick'显示nick及前5行cat error.log | grep -B 5 'nick' 显示nick及后5行cat error.log | grep -A 5 'nick'less 命令(分页查看文件内容)分页
本文章原创于www.yafeilinux.com 转载请注明出处。数据库几乎是每个较大的软件所必须应用的,而在Qt中也使用QtSql模块实现了对数据库的完美支持。我们在Qt Creator的帮助中查找QtSql Module,其内容如下图:可以看到这个模块是一组类的集合,使用这个模块我们需要加入头文件#include ,而在工程文件中需要加入一行代码:QT += sql
https://docs.unrealengine.com/latest/CHN/Engine/Basics/SourceControl/Perforce/index.html下载Preforce核心引擎和可视化界面解决编码问题权限管理下载Preforce核心引擎和可视化界面 https://www.perforce.com/解决编码问题主要问题就是要解决编码问题 Preforce核心
通用:VTK VTK (the visualization toolkit)是一款免费开源的用于三维计算机图形学、图像处理以及可视化的软件包。包含了C++类库并且提供对Tcl/Tk, Java 和Python等解释性语言的支持.ITK ITK是一个开源、跨平台的,提供了大量的图像处理功能的软件工具。可用于多维图像的分割与配准。FSL FSL是一个用于分析fMRI,MRI和DTI大脑成像数据的综合软件库。SPM SPM(s...
基于C/S架构和B/S架构的系列问题探讨在对此类问题进行研究之间,我们首先应该了解的是,何为B/S架构?何为C/S架构?一、C/S架构1、C/S架构的定义:客户端-服务器(Client/Server)架构,是一种软件体系结构,通过将任务合理分配到Client端和Server端,降低了系统的通讯开销,需要安装 客户端才可进行管理操作。客户端和服务器端的程序不同,用户的程序主要在客户端,服务器...
在flink的官方文档中看到,无论是source还是sink都称之为flink的Connectors点击overview然后就可以看到它所有的cnnectors从上边的图片中我们发现,这些组件不是都作为source和sink,有的可以作为source,有的可以作为sink,有的同时当做source和sink。我们点击Redis(sink)可以看到flink提供了一个接口把数据发送的redis中。这个sink可以使用三种不同的方法与redis不同的环境进行通信。1、Single Redis Se
为什么80%的码农都做不了架构师?>>> ...
AFN一、什么是AFN全称是AFNetworking,是对NSURLConnection的一层封装虽然运行效率没有ASI高,但是使用比ASI简单在iOS开发中,使用比较广泛AFN的github地址https://github.com/pokeb/AFNetworking/AFNetworking二、AFN结构NSURLConnection
☞☞☞点击查看更多优秀Python博客☜☜☜ Hello大家好,我是你们的朋友JamesBin,相信很多同学已经对哔哩哔哩网站非常熟悉了,网站里有非常多的资源,是一个大宝藏。希望可以推荐一些Python相关的视频教程,这里给大家介绍几个不错的。因为公众号不支持外链点击,所以你需要复制链接在浏览器中打开访问,手机上建议先收藏。B站上的Python学习资源▍ 01 小甲鱼的零基础入...