jffs2制作时工作记录

mkfs.jffs2 -n -l -s 0x1000 -e 0x40000 -p 0x400000 -d rootfs_jffs2/ -o jffs2.img

mkfs.jffs2 -n -l -s 0x0100 -e 0x10000 -p 0x400000 -d rootfs_jffs2/ -o jffs2.img //页256B  块64K

mkfs.jffs2 -n -l -s 0x0100 -e 0x8000 -p 0x400000 -d rootfs_jffs2/ -o jffs2.img //页256B  块32K

mkfs.jffs2 -n -l -s 0x1000 -e 0x10000 -p 0x400000 -d rootfs_jffs2/ -o jffs2.img //页4KB   块64K

mkfs.jffs2 -n -l -s 0x1000 -e 0x8000 -p 0x400000 -d rootfs_jffs2/ -o jffs2.img //页4KB   块32K

mkfs.jffs2 -n -l -s 0x1000 -e 0x1000 -p 0x400000 -d rootfs_jffs2/ -o jffs2.img //页4KB   块4K

mkfs.jffs2 -n -l -s 0x1000 -e 0x4000 -p 0x400000 -d rootfs_jffs2/ -o jffs2.img //页4KB   块16K

mkfs.jffs2 -l -e 0x10000 -p 0x500000 -d rootfs_jffs2/ -o jffs2.img //页4KB   块64KB //目前测试成功

mkfs.jffs2 -l -e 0x20000 -p 0x500000 -d rootfs_jffs2/ -o jffs2.img //页4KB   块128KB

mkfs.jffs2 -l -s 0x100 -e 0x10000 -p 0x500000 -d rootfs_jffs2/ -o jffs2.img //页256   块64KB

mkfs.jffs2 -l -e 0x10000 -p 0xb00000 -d rootfs_jffs2/ -o whyjffs2.img //页4KB   块64KB      //spi flash 16M  这里rootfs给了11M, 测试成功

sumtool -e 0x10000 -p -i whyjffs2.img -o whyjffs2-sum.img //略微使文件系统加速

说明:

页大小0x1000   4k

块大小0x40000  256k

jffs2分区总空间0x400000即4M

当然生成的jffs2.img并没有一下子分配4M,还是实际大小0xc0000

mkfs.jffs2使用方法

选项含义(man a mkfs.jffs2)

mkfs.jffs2: Usage: mkfs.jffs2 [OPTIONS]

Make a JFFS2 file system image from an existing directory tree

Options:

-p, --pad[=SIZE]       用16進制來表示所要輸出檔案的大小,也就是root.jffs2的size。

很重要的是, 為了不浪費flash空間, 這個值最好符合flash driver所規劃的區塊大小。

如果不足则使用0xff来填充补满。

-r, -d, --root=DIR      指定要做成image的源資料夾.(默认:当前文件夹)

-s, --pagesize=SIZE     节点页大小(默认: 4KiB)

-e, --eraseblock=SIZE   设定擦除块的大小为(默认: 64KiB)

-c, --cleanmarker=SIZE Size of cleanmarker (default 12)

-m, --compr-mode=MODE   Select compression mode (default: priortiry)

-x, --disable-compressor=COMPRESSOR_NAME

Disable a compressor

-X, --enable-compressor=COMPRESSOR_NAME

Enable a compressor

-y, --compressor-priority=PRIORITY:COMPRESSOR_NAME

Set the priority of a compressor

-L, --list-compressors Show the list of the avaiable compressors

-t, --test-compression Call decompress and compare with the original (for test)

-n, --no-cleanmarkers   指明不添加清楚标记(nand flash 有自己的校检块,存放相关的信息。)

如果挂载后会出现类似:

CLEANMARKER node found at 0x0042c000 has totlen 0xc != normal 0x0

的警告,则加上-n 就会消失。

-o, --output=FILE       指定輸出image檔案的文件名.(default: stdout)

-l, --little-endian     指定使用小端格式

-b, --big-endian        指定使用大端格式

-D, --devtable=FILE     Use the named FILE as a device table file

-f, --faketime          Change all file times to ‘0‘ for regression testing

-q, --squash            Squash permissions and owners making all files be owned by root

-U, --squash-uids       将所有文件的拥有者设为root用户

-P, --squash-perms      Squash permissions on all files

--with-xattr        stuff all xattr entries into image

--with-selinux      stuff only SELinux Labels into jffs2 image

--with-posix-acl    stuff only POSIX ACL entries into jffs2 image

-h, --help              显示这些文字

-v, --verbose           Verbose operation

-V, --version           显示版本

-i, --incremental=FILE Parse FILE and generate appendage output for it

时间: 2024-08-11 03:08:27

jffs2制作时工作记录的相关文章

201404-20151119工作记录

20140417-20151119 工作记录 =======================改科室BUG20140416 入职2014041720140418 下午忘了打卡 周五======================= =======================2014042120140422201404232014042420140425======================== ========================材料分析 20140428201404292014

Datax与hadoop2.x兼容部署与实际项目应用工作记录分享

一.概述 Hadoop的版本更新挺快的,已经到了2.4,但是其周边工具的更新速度还是比较慢的,一些旧的周边工具版本对hadoop2.x的兼容性做得还不完善,特别是sqoop.最近,在为hadoop2.2.0找适合的sqoop版本时遇到了很多问题.尝试了多个sqoop1.4.x版本的直接简单粗暴的报版本不兼容问题,其中测了sqoop-1.4.4.bin__hadoop-0.23这个版本,在该版本中直接用sqoop的脚本export HDFS的数据是没有问题的,但是一旦调用JAVA API来进行对H

工作记录 - OBB的解决方案

之前关于OBB的内容: Android上使用native IO 最近工作中的问题笔记 工作记录[续] android OBB 自从用了Java来mount OBB, 再也没有遇到挂载的问题. 但最近在LG Nexus5 和LG G2上测试, 发现某个大约30K文件的文件, 一次性读取出来以后, 处理会报错. 最后排除各种因素, 比如为了排除buffer坏掉的因素,读的时候单独new一个新buffer,一次性读取,然后dump到sd卡.对比dump出的文件, 发现整个文件中间有n个字节(大约是32

JavaScript操作XML工作记录

JavaScript操作XML (一) JavaScript操作XML是通过XML DOM来完成的.那么什么是XML DOM呢?XML DOM 是: 用于 XML 的标准对象模型 用于 XML 的标准编程接口 中立于平台和语言 W3C 的标准 XML DOM 定义了所有XML 元素的对象和属性,以及访问它们的方法(接口).也就是说:XML DOM 是用于查询.添加.修改.删除XML 元素的标准. 在继续之前,我们先来了解一下XML的定义.请看下面的 XML 文件 (books.xml):<?xm

在直播APP制作时如何设置直播软件聊天发言部分可见的功能

在直播APP制作时聊天功能是直播软件中的重要功能,在开发中经常涉及根据用户的不同分类对收发消息进行不同的处理. 处理方式如下:1.在用户进入房间链接socket时,根据用户的属性进入特定房间 if(socket.usertype == 60){//新建当前房间的超管频道和场控频道,用于消息发送 socket.join(data.roomnum+'_60'); }else if(socket.usertype == 40){ socket.join(data.roomnum+'_40'); } 2

工作记录

 20140428  6 20140505 9 20140512 4 20140519 11 20140526 8  20140429  5 20140506 10 20140513 6 20140520 10 20140527 11  20140430  6 20140507 14 20140514 7 20140521 10 20140528 9 20140501 6 20140508 4 20140515 9 20140522 10 20140529 11 20140502 5 20140

[工作记录] Android OpenSL ES: references &amp; AAC related

AAC V.S. MP3 http://en.wikipedia.org/wiki/Advanced_Audio_Coding#AAC.27s_improvements_over_MP3 AAC patent lisense FAQ: http://www.vialicensing.com/licensing/aac-faq.aspx you may need a license but usually no fees, exept that when end user products are

[工作记录] Android OpenGL ES: non-square texture - continue

previous: [工作记录] Android OpenGL ES 2.0: square texture not supported on some device recently I found that it is the mipmap of a non-square texture that cause the black texture problem: http://stackoverflow.com/questions/5052762/using-mipmaps-results-

【工作记录】c#操作win7注册表

这里讲一 C# 小列子(高手请绕过此地! ), 我们平时都是在xp开发比较多...不过现在很多开发人员也在win7下开发了. 下面是在 LocalMachine 下的 一下注册表操作 ,就不详说了 private static void DeleteRegistry(string name){string[] aimnames;RegistryKey hkml = Registry.LocalMachine;RegistryKey software = hkml.OpenSubKey("SOFT