构建基本的嵌入式Linux根文件系统
构建基本的嵌入式Linux根文件系统
构建基本的嵌入式Linux根文件系统
(1)创建根文件系统的基本目录结构。
我把这个过程做成了shell脚本(文件名为mkroot) ,很方便!
#! /bin/sh
echo "creatint rootfs dir......"
mkdir rootfs
cd rootfs
echo "making dir : bin dev etc lib proc sbin sys usr"
mkdir bin dev etc lib proc sbin sys usr #必备的8个目录
mkdir usr/bin usr/lib usr/sbin lib/modules
# Don't use mknod ,unless you run this Script as root !
# mknod -m 600 dev/console c 5 1
# mknod -m 666 dev/null c 1 3
echo "making dir : mnt tmp var"
mkdir mnt tmp var
chmod 1777 tmp
mkdir mnt/etc mnt/jffs2 mnt/yaffs mnt/data mnt/temp
mkdir var/lib var/lock var/log var/run var/tmp
chmod 1777 var/tmp
echo "making dir : home root boot"
mkdir home root boot
echo "done"
在你想要建立根文件系统的地方,运行:
[tekkamanninja@Tekkaman-Ninja nfs]$ ./mkroot
creatint rootfs dir......
making dir : bin dev etc lib proc sbin sys usr
making dir : mnt tmp var
making dir : home root boot
done
[tekkamanninja@Tekkaman-Ninja nfs]$ cd rootfs/dev/
[tekkamanninja@Tekkaman-Ninja dev]$ su
口令:
[root@Tekkaman-Ninja dev]# mknod -m 600 console c 5 1;mknod -m 666 null c 1 3;exit
exit
[tekkamanninja@Tekkaman-Ninja dev]$
(2)配置、编译和安装Busybox-1.9.1-----我没用本文章的busybox配置,参见同文件夹下的文档,我的是静态的,如果以后要改成动态的,可参见本文章
[tekkamanninja@Tekkaman-Ninja source]$ tar -xjvf busybox-1.9.1.tar.bz2
修改Makefile文件:
[tekkamanninja@Tekkaman-Ninja busybox-1.9.1]$ pwd
/home/tekkamanninja/working/source/busybox-1.9.1
[tekkamanninja@Tekkaman-Ninja bu
相关文档:
文档创建日期:2010-02-18
01 // P173: 2.编程题 (5)输入一个字符串,统计英文字母、空格、数字和其他字符的个数。
02
03 // The beginning of C program: test06-05.c.
04  ......
kernel.shmall = 268435456
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_max_tw_buckets = 5000
net.ip ......
文档创建日期:2010-02-19
[文件1: test06-08.c]
01 // P174: 2.编程题 (8)把有序的两个数组a和b合并,要求合并后的数组依然有序
02
03 // The beginning of C program: test06-08.c.
&nbs ......
明天就回家了。今晚去火车站买了明早的车票,感觉蛮匆忙的。这两天,除了整电脑,啥事都没干。我那可怜的电脑,隔三差五的就被我整一次。开始只是应用软件层面上的,接着是系统,再接着就是接近硬件。
花了这么多时间 ......
1.check ntp is installed or not
[root@myvm1 server-tar]# whereis npt
npt:
#:(..not install
2.get ntp from official website(http://psp2.ntp.org/bin/view/Main/SoftwareDownloads) and install.
[root@myvm1 server-tar]# wget http://archive.ntp.org/ntp4/ntp-4.2/ntp-4.2.6.tar.gz
[root@myvm1 server-tar ......