busybox1.15制作根文件系统:
1. 配置:
make defconfig
make menucofnig
进行裁剪:
修改Build Option如下:
[*] Build BusyBox as a static binary (no shared libs)
[ ] Build shared libbusybox
[*] Build with Large File Support (for accessing files > 2 GB)
[*] Do you want to build BusyBox with a Cross Compiler?
(/usr/local/arm/4.3.2/bin/arm-linux-) Cross Compiler prefix
[ ] Compile all sources at once
修改Installation Options如下:
[*] Don't use /usr
Applets links (as soft-links) --->
(../rootfs) BusyBox installation prefix
修改Shell,选择默认的shell为ash,必须的呀。 Choose your default shell (ash) --->
make ; make installation
2. 建立目录:
cd ../rootfs
mkdir dev usr etc proc sys var home root tmp lib mnt usr
mknod dev/console c 5 1
3. etc/fstab 内容:
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0
4. etc/init.d/rcS内容:
#! /bin/sh
/bin/mount -a
/sbin/mdev -s
5. etc/inittab内容
::sysinit:/etc/init.d/rcS
::respawn:-/bin/sh
tty2::askfirst:-/bin/sh
::ctrlaltdel:/bin/umount -a -r
6. etc/profile内容:
alias ll="ls -l"
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH
cd /root
#可将第9步的环境变量放在这个文件里面
7. 拷贝/lib内容:
拷贝4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib/或目录下的以下内容:
arm-none-linux-gnueabi/libc/armv4t/usr/lib/目录下的以下内容:
ld-2.8.so // 装在器:运行时加载动态链接库
ld-linux.so.3 -> ld-2.8.so
libdl-2.8.so // 动态库链接器:运行时动态链接函数用。
libdl.so.2 -> libdl-2.8.so
libc-2.8.so // libc运行库
libc.so.6 -> libc-2.8.so
libgcc_s.so.1 // c++运行库
libm.so.6 // 数学库
libpng.so -> libpng.so.3.35.0 // png文件解码库
libpng.so.3 -> libpng.so.3.35.0
libpng.so.3.35 -> libpng.so.3.35.0
libpng.so.3.35.0
libpthread.so.0 // 线程库
librt.so.1 // real-time部分支持
libstdc++.so.6 // 标准C++运行库
//Qt库
libQtCore.so.4.3.5
libQtCore.so -> libQtCore.so.4.3.5
libQtCore.so.4 -> libQtCore.so.4.3.5
libQtCore.so.4.3 -> libQtCore.so.4.3.5
libQtGui.so.4.3.5
libQtGui.so -> libQtGui.so.4.3.5
libQtGui.so.4 -> libQtGui.so.4.3.5
libQtGui.so.4.3 -> libQtGui.so.4.3.5
libQtNetwork.so.4.3.5
libQtNetwork.so -> libQtNetwork.so.4.3.5
libQtNetwork.so.4 -> libQtNetwork.so.4.3.5
libQtNetwork.so.4.3 -> libQtNetwork.so.4.3.5
8. tslib:
/usr/local/tslib/bin:
ts_calibrate
ts_harvest
ts_print
ts_print_raw
ts_test
/usr/local/tslib/etc
ts.conf
内容:
# Uncomment if you wish to use the linux input layer event interface
module_raw input
# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
# module_raw collie
# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
# module_raw corgi
# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
# module_raw ucb1x00
# Uncomment if you're using an HP iPaq h3600 or similar
# module_raw h3600
# Uncomment if you're using a Hitachi Webpad
# module_raw mk712
# Uncomment if you're using an IBM Arctic II
# module_raw arctic2
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
/usr/local/tslib/plugins #与ts.conf中对应
arctic2.so
collie.so
corgi.so
dejitter.so #****必须****#
h3600.so
input.so #****必须****#
linear.so #****必须****#
linear_h2200.so
mk712.so
pthres.so #****必须****#
ucb1x00.so
variance.so #****必须****#
/usr/local/tslib/lib
libts-0.0.so.0.1.1
libts-0.0.so.0 -> libts-0.0.so.0.1.1
libts.so -> libts-0.0.so.0.1.1
9. 环境变量配置:
export TSLIB_ROOT=/usr/local/tslib
export LD_LIBRARY_PATH=$TSLIB_ROOT/lib:$LD_LIBRARY_PATH
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export POINTERCAL_FILE=$TSLIB_ROOT/etc/pointercal
export TSLIB_PLUGINDIR=$TSLIB_ROOT/plugins
export TSLIB_CONSOLEDEVICE=none
export TSLIB_TSEVENTTYPE=H3600
export TSLIB_TSDEVICE=/dev/event0
export QWS_SIZE=320x240
export TLIB_FBDEVICE=/dev/fb0
export QTOPIA=/usr/local/Trolltech/QtopiaCore-4.3.5-arm/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTOPIA/lib
export QWS_MOUSE_PROTO=Tslib:/dev/event0