其他分享
首页 > 其他分享> > NUC972平台学习笔记之rootfs编译

NUC972平台学习笔记之rootfs编译

作者:互联网

rootfs根文件系统编译笔记

复制mkfs.ubifs ubinize到usr/Sbin 目录

编译生成rootfs.img

[root@localhost usr]# mkdir /usr/rootfs
[root@localhost usr]# ls
bin  etc  games  include  lib  libexec  local  rootfs  sbin  share  src
[root@localhost usr]# cp /mnt/hgfs/LINUX_JZQ/Linux/Rootfs/Rootfs.tar /usr/rootfs
[root@localhost usr]# ls
bin  etc  games  include  lib  libexec  local  rootfs  sbin  share  src
[root@localhost tmp]# cd /usr/rootfs
[root@localhost rootfs]# ls
Rootfs.tar
[root@localhost rootfs]# cp /mnt/hgfs/LINUX_JZQ/Linux/Rootfs/ubinize.cfg /usr/rootfs
[root@localhost rootfs]# ls
Rootfs.tar  ubinize.cfg
[root@localhost rootfs]#  tar xvf Rootfs.tar
[root@localhost rootfs]# mkfs.ubifs -F -m 2048 -e 126976 -c 128 -o rootfs.img -r rootfs
[root@localhost rootfs]# ls
rootfs  rootfs.img  Rootfs.tar  ubinize.cfg
有时提示 /usr/sbin/mkfs.ubifs: Permission demied 修改下mkfs.ubifs权限777
生产了rootfs.img

编译生成rootfs.ubi

[root@localhost rootfs]# ubinize -o rootfs.ubi -m 2048 -p 131072 -O 2048 -s 2048 ubinize.cfg

ubinize: volume size was not specified in section "rootfs-volume", assume minimum to fit image "rootfs.img"6856704 bytes (6.5 MiB)

[root@localhost rootfs]# ls

rootfs  rootfs.img  Rootfs.tar  rootfs.ubi  ubinize.cfg

至此根文件编译完成。

标签:ubinize,NUC972,编译,usr,Rootfs,root,localhost,rootfs
来源: https://www.cnblogs.com/azan777/p/14695224.html