本文主要是介绍mkfs.jffs2命令,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Linux使用mkfs.jffs2命令需要安装mtd-utils工具
root@ubuntu:~# apt-get install mtd-utils
root@ubuntu:~# mkfs.jffs2 --help
mkfs.jffs2: error!: Usage: mkfs.jffs2 [OPTIONS]
Make a JFFS2 file system image from an existing directory tree
Options:
-p, --pad[=SIZE] Pad output to SIZE bytes with 0xFF. If SIZE is
not specified, the output is padded to the end of
the final erase block
-r, -d, --root=DIR Build file system from directory DIR (default: cwd)
-s, --pagesize=SIZE Use page size (max data node size) SIZE.
Set according to target system's memory management
page size (default: 4KiB)
-e, --eraseblock=SIZE Use erase block size SIZE (default: 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 Don't add a cleanmarker to every eraseblock
-o, --output=FILE Output to FILE (default: stdout)
-l, --little-endian Create a little-endian filesystem
-b, --big-endian Create a big-endian filesystem
-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 Squash owners making all files be owned by 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 Display this help text
-v, --verbose Verbose operation
-V, --version Display version information
-i, --incremental=FILE Parse FILE and generate appendage output for it
jffs2文件制作命令:
mkfs.jffs2 -d ./firmware/HI3518E_OV9732/ -e 0x10000 -p 0xA00000 -o ./output/application_HI3518E_OV9732.jffs2
linux系统下命令重写第四分区:
dd if=application_HI3518E_OV9732.jffs2 of=/dev/mtdblock3
uboot下通过tftp单独重烧第四分区:
mw.b 0x82000000 ff 1000000;tftp 0x82000000 application_3518c_imx238_ex.jffs2;sf probe 0;sf erase 0x600000 0xA00000;sf write 0x82000000 0x600000 0xA00000;
这篇关于mkfs.jffs2命令的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!