根文件系统的完善
在busybox制作的根文件系统基础上还需要完善文件文件系统,才能应用于嵌入式开发。
加载程序运行库
- busybox依赖库
ld-linux.so.3
libc.so.6
libm.so.6 - 常用的动态库
libpthread.so.0
libpthread_db.so.1
libresolv.so.2
librt.so.1 - 其他库
…
配置文件
- 文件系统挂载配置文件
proc /proc proc defaults 0 0
- inittab配置文件
::sysinit:/etc/init.d/rcs
::respawn:-/bin/sh
tty2::askfirst:-/bin/sh
::ctrlaltdel:/bin/umount -a -r
- profile配置文件
# /etc/profile: system-wide .profile file for the bourne shells
echo
echo -n "processing /etc/profile..."
# no-op
echo "Done"
echo
PATH=/bin/:/sbin/:/usr/bin:/usr/sbin/
LIBRARY_PATH=/lib:/usr/lib:$LIBRARY_PATH
export PATH LIBRARY_PATH
- resolv.conf配置文件
nameserver 192.168.10.1
启动脚本
- rcs
#! /bin/sh
#挂载文件系统
/bin/mount -a
for script in /etc/init.d/s[0-9][0-9]*
do
if [ -x $script ];then
echo "RCS:$script"
/bin/sh -c $script
fi
done
echo "------rcs end1-------"
- S80network网络配置
#!/bin/sh
ifconfig eth0 192.168.10.12 broadcast 255.255.255.255
route add default gw 192.168.10.1