【Tiny4412】最小网络文件系统制作
发布日期:2021-06-29 20:47:25 浏览次数:2 分类:技术文章

本文共 2785 字,大约阅读时间需要 9 分钟。

00. 目录

文章目录

01. BusyBox简介

BusyBox 是一个集成了一百多个最常用Linux命令和工具的软件。BusyBox 包含了一些简单的工具,例如ls、cat和echo等等,还包含了一些更大、更复杂的工具,例grep、find、mount以及telnet。有些人将 BusyBox 称为 Linux 工具里的瑞士军刀。简单的说BusyBox就好像是个大工具箱,它集成压缩了 Linux 的许多工具和命令,也包含了 Android 系统的自带的shell。

02. 编译BusyBox

2.1 解压文件

[root@itcast tools]# tar -xzvf busybox-1.17.2-20101120.tgz

2.2 配置BusyBox

[root@itcast tools]# cd busybox-1.17.2[root@itcast busybox-1.17.2]# make menuconfig

在这里插入图片描述

2.3 选择编译选项

在这里插入图片描述

在这里插入图片描述

2.4 编译BusyBox

[root@itcast busybox-1.17.2]# make -j4

2.5 安装BusyBox

[root@itcast busybox-1.17.2]# make install

2.6 验证生成的文件

[root@itcast busybox-1.17.2]# ls _install/bin  linuxrc  sbin  usr[root@itcast busybox-1.17.2]#

03. 最小网络文件系统

3.1 创建共享目录

[root@itcast /]# mkdir rootfs[root@itcast /]#

3.2 拷贝busybox编译好的文件到rootfs中

[root@itcast busybox-1.17.2]# cp _install/* /rootfs/ -rf[root@itcast busybox-1.17.2]#

3.3 拷贝etc目录

[root@itcast busybox-1.17.2]# cp examples/bootfloppy/etc /rootfs/ -rf [root@itcast busybox-1.17.2]#

3.4 拷贝库

[root@itcast busybox-1.17.2]# mkdir /rootfs/lib[root@itcast busybox-1.17.2]# cp /usr/local/arm/4.5.1/arm-none-linux-gnueabi/lib/* /rootfs/lib/ -rf[root@itcast busybox-1.17.2]#

3.5 手动创建目录

[root@itcast rootfs]# mkdir mnt media misc home sys proc tmp var dev boot net opt[root@itcast rootfs]#

3.6 修改配置文件

[root@itcast rootfs]# vim etc/profile [root@itcast rootfs]# cat etc/profile # /etc/profile: system-wide .profile file for the Bourne shellsecho "============================="echo "  welcom to dengjin system   "echo "============================="export PS1="[root@deng \W]# "[root@itcast rootfs]#

3.7 修改rcS配置文件

[root@itcast rootfs]# vim etc/init.d/rcS #修改内容如下:[root@itcast rootfs]# cat etc/init.d/rcS #! /bin/shmount -t proc none /procmount -t sysfs none /sysmount -t sysfs none /tmpmount -t sysfs none /dev/sbin/mdev -s[root@itcast rootfs]#

3.8 修改inittab文件

[root@itcast filesystem]# vim etc/inittab # 修改内容如下::sysinit:/etc/init.d/rcS#::respawn:-/bin/shttySAC0::askfirst:-/bin/sh#::ctrlaltdel:/bin/umount -a -r[root@itcast filesystem]#

3.9 设置nfs共享

[root@itcast rootfs]# vim /etc/exports # 最后一行添加如下内容/rootfs *(rw,sync,no_root_squash)[root@itcast /]# chmod  -R 755 /rootfs[root@itcast /]# /etc/init.d/nfs reload [root@itcast /]#

3.10 设置启动参数

# kernel不用修改 就是qt的kernel# 在minicom中的uboot设置启动参数DengJin #set bootargs root=/dev/nfs nfsroot=192.168.88.88:/rootfs ip=192.168.88.77 console=ttySAC0,115200 lcd=S70 ctp=2DengJin #saveSaving Environment to SMDK bootable device...done

3.11 测试

[   14.075000] VFS: Mounted root (nfs filesystem) on device 0:10.[   14.075000] Freeing init memory: 212KPlease press Enter to activate this console. ===============================  welcom to uplooking system   ===============================[root@itcast /]# [root@itcast /]# [root@itcast /]# [root@itcast /]#

04. 下载

4.1 BusyBox工具

下载:

4.2 制作好的文件系统

下载:

05. 附录

转载地址:https://dengjin.blog.csdn.net/article/details/106628121 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:【Tiny4412】搭建Qt网络文件系统
下一篇:【Tiny4412】烧写Android系统(SD卡)

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2024年04月28日 17时02分23秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章