2011年(10)
分类: 嵌入式
2011-03-05 14:40:40
#
#
Copyright (C) 2001 Erik Andersen
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
#
Format for each entry:
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -o remount,rw /
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -a
::sysinit:/bin/hostname -F /etc/hostname
::sysinit:/sbin/ifconfig lo 127.0.0.1 up
::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Set up a couple of getty's
#tty1::respawn:/sbin/getty 38400 tty1
#tty2::respawn:/sbin/getty 38400 tty2
# Put a getty on the serial port
#ttyS0::respawn:/sbin/getty
-L ttyS0 115200 vt100 /*关串口1,打开后应该可以用串口调试了*/
#ttyS0::respawn:-/bin/sh
# Logging junk
#null::sysinit:/bin/touch /var/log/messages
#null::respawn:/sbin/syslogd -n -m 0
#null::respawn:/sbin/klogd -n
#tty3::respawn:/usr/bin/tail -f /var/log/messages
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
#null::shutdown:/usr/bin/killall klogd
#null::shutdown:/usr/bin/killall syslogd
#null::shutdown:/bin/umount -a -r
#null::shutdown:/sbin/swapoff -a
/etc/init.d/rcS
#!/bin/sh
# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
for i in /etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
.
$i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
insmod /home/g_serial.o
/usr/sbin/telnetd -l /bin/sh
cd /home
mv servo.bak servo
./servo