首页 > 其他 > 详细

initramfs 文件系统制作

时间:2019-12-05 23:11:09      阅读:316      评论:0      收藏:0      [点我收藏+]

源码下载:https://busybox.net/downloads/

源码版本:busybox-1.30.0.tar.bz2

 

[ 源码编译步骤 ]

make menuconfig ARCH= COMPILE_CROSS= --prefix=
①[*] Build static binary (no shared libs) (/home/lance/nanopi/busybox/rootfs) Destination path for make install (aarch64-linux-gnu-) Cross compiler prefix ②make ③make install

[ 编辑文件 ]

1 ln -s /dev/null /dev/tty1  ///< 加入ttyx
2 cp linuxr init         ///< 加入init,做为启动入口
3 touch /etc/init.d/rcs      ///< 加入初始化脚本,写入自定义内容

[ 最终的根目录 ]

lance@ubuntu:~/busybox/rootfs$ ls
    bin  dev  etc  init  linuxrc  mnt  proc  sbin  sys  tmp  usr

[ initramfs 打包 ]

find . | cpio -o -H newc | gzip > ../rootfs.cpio.gz

最终可用的文件系统即为: rootfs.cpio.gz 

 

initramfs 文件系统制作

原文:https://www.cnblogs.com/GyForever1004/p/11992309.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!