2440移植Linux Kernel笔记(三)------制作jffs2映像文件

你好!这里是风筝的博客,

欢迎和我一起交流。

 


之前我们把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 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

 

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值