2440移植Linux Kernel笔记(三)------制作jffs2映像文件
2017-05-25 13:34
274 查看
你好!这里是风筝的博客,欢迎和我一起交流。
如果本篇博客对您有帮助,或许可以在下方评论给我留个言。
之前我们把busybox安装到/work/nfs/root/目录下.
现在:
cd /work/nfs/
mkfs.jffs2 -n -s 2048 -e 128KiB -d root -o rootfs.jffs2
其中root为busybox的安装文件夹,rootfs.jffs2为生成的目标文件
现在我们把rootfs.jffs2文件下载下去,在uboot里设置参数:
set bootargs console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=jffs2
发现挂载不成功,提示:
end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
这是因为我们Kernel没有支持ARM EABI造成的.
cd /work/system/linux-4.4.66/
make menuconfig
选中:Kernel Features->Use the ARM EABI to compile the kernel
make uImage
现在我们重新启动Kernel,发现rootfs.jffs2文件挂载成功!!
附:
mkfs.jffs2的一些选项:
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 (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
b991
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
如果本篇博客对您有帮助,或许可以在下方评论给我留个言。
之前我们把busybox安装到/work/nfs/root/目录下.
现在:
cd /work/nfs/
mkfs.jffs2 -n -s 2048 -e 128KiB -d root -o rootfs.jffs2
其中root为busybox的安装文件夹,rootfs.jffs2为生成的目标文件
现在我们把rootfs.jffs2文件下载下去,在uboot里设置参数:
set bootargs console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=jffs2
发现挂载不成功,提示:
end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
这是因为我们Kernel没有支持ARM EABI造成的.
cd /work/system/linux-4.4.66/
make menuconfig
选中:Kernel Features->Use the ARM EABI to compile the kernel
make uImage
现在我们重新启动Kernel,发现rootfs.jffs2文件挂载成功!!
附:
mkfs.jffs2的一些选项:
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 (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
b991
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
相关文章推荐
- 2440移植Linux Kernel笔记(五)------制作yaffs2映像文件
- jffs2文件系统制作与移植(二)
- 使用mkfs.jffs2工具制作jffs2根文件系统映像。
- 【TINY4412】LINUX移植笔记:(2)BusyBox制作最小文件系统
- 制作jffs2文件系统 分类: 终端移植_文件系统 2013-07-10 14:36 261人阅读 评论(0) 收藏
- 2440移植Linux Kernel笔记(一)------编译kernel
- jffs2文件系统的制作以及移植
- jffs2文件系统的制作和移植
- jffs2文件系统制作与移植
- [Linux驱动开发] jffs2 文件系统制作及移植
- jffs2文件系统制作与移植(二)
- 移植linux3.4.2以及文件系统制作笔记
- linux文件系统移植和制作(jffs2文件系统)时的错误 /usr/bin/ld: cannot find -lc 改正
- 2440移植Linux Kernel笔记(七)------网卡驱动
- 2440移植Linux Kernel笔记(四)------yaffs2打补丁
- 移植内核学习笔记2-----修改分区及制作根文件系统
- 2440移植Linux Kernel笔记(六)------剪裁Kernel
- linux文件系统的移植-制作JFFS2文件系统
- 嵌入式学习笔记(3)---YAFFS文件系统的制作移植
- linux文件系统的移植-制作JFFS2文件系统