rcS 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #! /bin/ash
  2. # ---------------------------------------------
  3. # MDEV Support
  4. # (Requires sysfs support in the kernel)
  5. # ---------------------------------------------
  6. mount -n -t proc /proc /proc
  7. mount -n -t sysfs sysfs /sys
  8. mount -n -t tmpfs mdev /dev
  9. mkdir /dev/pts
  10. mount -t devpts devpts /dev/pts
  11. #echo -n " Enabling hot-plug : "
  12. echo "/sbin/mdev" > /proc/sys/kernel/hotplug
  13. #echo -n " Populating /dev : "
  14. mkdir /dev/input
  15. mkdir /dev/snd
  16. mdev -s
  17. # ---------------------------------------------
  18. # Disable power management
  19. # (Requires sysfs support in the kernel)
  20. # ---------------------------------------------
  21. # echo -n " Disabling Power mgmt : "
  22. # echo -n "1" > /sys/power/cpuidle_deepest_state
  23. # status $? 1
  24. # ---------------------------------------------
  25. # Mount the default file systems
  26. # ---------------------------------------------
  27. #echo -n " Mounting other filesystems : "
  28. mount -a
  29. mount -t tmpfs tmpfs /mnt
  30. chmod 777 /Storage
  31. mount -t jffs2 /dev/mtdblock13 /Storage
  32. mkdir -p /Storage/EventLog
  33. mkdir -p /Storage/ChargeLog
  34. mkdir -p /UsbFlash
  35. # ---------------------------------------------
  36. # Set PATH
  37. # ---------------------------------------------
  38. export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
  39. # ---------------------------------------------
  40. # Start other daemons
  41. # ---------------------------------------------
  42. #echo 110 > /sys/class/gpio/export
  43. #echo "out" > /sys/class/gpio/gpio110/direction
  44. #echo 1 > /sys/class/gpio/gpio110/value
  45. #sleep 2
  46. /sbin/ifconfig eth0 192.168.1.10 netmask 255.255.255.0
  47. /sbin/ifconfig eth0 down
  48. sleep 1
  49. /sbin/ifconfig eth0 up
  50. #echo -n " Starting telnetd : "
  51. #/usr/sbin/telnetd -l /bin/login
  52. #status $? 0
  53. #echo -n " Starting SSH : "
  54. /sbin/dropbear
  55. /sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -m /lib
  56. #status $? 0
  57. # ---------------------------------------------
  58. # Softlink
  59. # ---------------------------------------------
  60. cd lib
  61. ln -sf libbz2.so.1.0.6 libbz2.so.1
  62. # ---------------------------------------------
  63. # Start demo app
  64. # ---------------------------------------------
  65. /root/main &