整個開機流程是
(1) 載入BIOS的硬體資訊,並取得第一個開機裝置的代號
(2)讀取第一個開機裝置的MBR的boot Loader (grub)的開機資訊
(3)載入OS Kernel資訊,解壓Kernel,嘗試驅動硬體
(4) Kernel執行init程式並獲得run-lebel資訊(如3或5)
(5) init執行/etc/rc.d/rc.sysinit
(6)啟動核心外掛模組(/etc/modprobe.conf)(/etc/profile)
(7) init執行run-level的各種Scripts,啟動服務
(8) init執行/etc/rc.d/rc.local
(9)執行/bin/login,等待使用者Login
(10)Login後進入Shell
正確的方式是把需要載入的模組放在(5)或(6),

***************************************************
   SEP4020 ARM Linux-2.6.16 SDK 3.1  for Xiaogui  
***************************************************
# mount all...........
# Starting mdev.........
starting pid 250, tty '': '-/bin/sh'
fgs add .....
hwclock: settimeofday() failed: Invalid argument
Created led device OK
request tp irq8 failed!
insmod: cannot insert '/drivers/sep4020_tp.ko': Operation not permitted
sep4020 Keys module insmod OK
registered!
mount: mounting /dev/mmcblk0p1 on /mnt/sd/ failed: No such file or directory
mount: mounting /dev/uba1 on /mnt/usb failed: No such file or directory
keydevice is open!!!!!!!!!!!
TSLIB_TSDEVICE is open!!!!!!!!!!!
ts_open(): No such device or address

/tmp #

如上列印資訊中的綠色部分,執行的指令碼在 /nfs/etc/profile中
內容如下:

#Set search library path
#echo "Set search library path..........."
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH

#Set user path
echo "fgs add ....."

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PATH

mknod /dev/ttyp5   c 3 5
mknod /dev/ptyp5   c 2 5
mknod /dev/tp    c 250 0
mknod /dev/flowled   c 253 0
mknod /dev/mg_card  c 255 0
mknod /dev/key   c  254 0
mknod /dev/sep4020_gpio c  240 0
mknod /dev/printer  c 249 0
mknod /dev/psam   c 252 0
mknod /dev/cmx865  c 251 0
mknod /dev/sep4020_pwm c 245 0

export T_ROOT=/
export LD_LIBRARY_PATH=/lib
export TSLIB_CONSOLEDEVICE=none 
export TSLIB_TSDEVICE=/dev/tp
export TSLIB_CALIBFILE=/etc/pointercal    
export TSLIB_CONFFILE=/etc/ts.conf  
export TSLIB_PLUGINDIR=/plugins

hwclock -s

insmod  /drivers/sep4020_led.ko
insmod  /drivers/sep4020_tp.ko
insmod  /drivers/sep4020_key.ko
insmod  /drivers/sep4020_pwm.ko
insmod  /drivers/sep4020_psam.ko

#mount -t yaffs /dev/mtdblock2 /Mini4020/Mp3
mount -t vfat -o sync /dev/mmcblk0p1 /mnt/sd/
mount /dev/uba1 /mnt/usb
cp -ar Mini4020/mini/res/ /tmp/
cp -ar Mini4020/mini/sdres/ /tmp/
cp /Mini4020/mini/prisonbreak.mp3 /tmp/
cp /Mini4020/Mp3/madplay.arm /tmp/
cp /Mini4020/mini/mini /tmp/
cp -ar Mini4020/mini/pwm/ /tmp/
cd /tmp
./mini