#!/bin/sh # Modefi 2013/1 read sw & etc echo "Starting rcS..." echo "++ Mounting filesystem" mount -t proc none /proc mount -t sysfs none /sys mount -t tmpfs none /tmp echo "++ Setting up mdev" echo /sbin/mdev > /proc/sys/kernel/hotplug mdev -s mkdir -p /dev/pts mkdir -p /dev/i2c mount -t devpts devpts /dev/pts echo "++ Configure static IP 192.168.0.10" ifconfig eth0 down ifconfig eth0 192.168.0.10 up echo "++ Starting telnet daemon" telnetd -l /bin/sh echo "++ Starting http daemon" httpd -h /var/www echo "++ Starting ftp daemon" tcpsvd 0:21 ftpd ftpd -w /& echo "++ Starting dropbear (ssh) daemon" dropbear echo "++ Starting OLED Display" load_oled # Bottun L/R/U/D/S Data -> 0x100*1/2/3/4/5 echo "++ Exporting LEDs & SWs" for i in 0 1 2 3 4 5 6 7 8 9 10 11 12; do sw=$(($i+69)); led=$(($i+61)); echo $sw > /sys/class/gpio/export; echo $led > /sys/class/gpio/export; echo out > /sys/class/gpio/gpio$led/direction; done; export PATH=$PATH:/usr/local/bin echo "rcS Complete"