123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #! /bin/ash
- # ---------------------------------------------
- # MDEV Support
- # (Requires sysfs support in the kernel)
- # ---------------------------------------------
- mount -n -t proc /proc /proc
- mount -n -t sysfs sysfs /sys
- mount -n -t tmpfs mdev /dev
- mkdir /dev/pts
- mount -t devpts devpts /dev/pts
- #echo -n " Enabling hot-plug : "
- echo "/sbin/mdev" > /proc/sys/kernel/hotplug
- #echo -n " Populating /dev : "
- mkdir /dev/input
- mkdir /dev/snd
- mdev -s
- # ---------------------------------------------
- # Disable power management
- # (Requires sysfs support in the kernel)
- # ---------------------------------------------
- # echo -n " Disabling Power mgmt : "
- # echo -n "1" > /sys/power/cpuidle_deepest_state
- # status $? 1
- # ---------------------------------------------
- # Mount the default file systems
- # ---------------------------------------------
- #echo -n " Mounting other filesystems : "
- mount -a
- mount -t tmpfs tmpfs /mnt
- chmod 777 /Storage
- #mount -t jffs2 /dev/mtdblock13 /Storage
- ubiattach /dev/ubi_ctrl -m 13
- if [ "$?" -eq "0" ]
- then
- echo "Success."
- else
- echo "Erase /dev/mtd13 jffs2 block"
- flash_eraseall /dev/mtd13
- ubiattach /dev/ubi_ctrl -m 13
- fi
- ubimkvol /dev/ubi0 -N ubiNandFs -m
- mount -t ubifs ubi0:ubiNandFs /Storage
- mkdir -p /Storage/EventLog
- mkdir -p /Storage/ChargeLog
- mkdir -p /Storage/SystemLog
- mkdir -p /Storage/OCPP
- mkdir -p /Storage/root
- mkdir -p /UsbFlash
- # ---------------------------------------------
- # Set PATH
- # ---------------------------------------------
- export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
- # ---------------------------------------------
- # Start other daemons
- # ---------------------------------------------
- #echo 110 > /sys/class/gpio/export
- #echo "out" > /sys/class/gpio/gpio110/direction
- #echo 1 > /sys/class/gpio/gpio110/value
- #sleep 2
- #--------------------------------------------------------
- #/sbin/ifconfig eth0:0 192.168.0.20 netmask 255.255.255.0
- #/sbin/ifconfig eth0 down
- #sleep 1
- #/sbin/ifconfig eth0 up
- #/sbin/route add default gw 192.168.0.1
- #--------------------------------------------------------
- #echo -n " Starting telnetd : "
- #/usr/sbin/telnetd -l /bin/login
- #status $? 0
- #echo -e " Starting SSH : \n"
- #/sbin/dropbear
- #echo -e " Starting FTPD : \n"
- #/sbin/pure-ftpd &
- #echo -e " Starting LIGHTTPD : \n"
- #/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -m /lib
- #cp /root/.tmate.conf /
- #/usr/sbin/crond &
- #id=CSU3_$(cat /sys/class/net/eth0/address)
- #echo $id > /etc/hostname
- #hostname -F /etc/hostname
- #status $? 0
- # ---------------------------------------------
- # Softlink
- # ---------------------------------------------
- #cd lib
- #ln -sf libbz2.so.1.0.6 libbz2.so.1
- # ---------------------------------------------
- # Loading CCS Apps
- # ---------------------------------------------
- echo -e " Loading CCS Apps : \n"
- cp -rfv /Storage/root/* /root/
- # ---------------------------------------------
- # Start demo app
- # ---------------------------------------------
- echo -e " Starting CCS Apps : \n"
- /root/main &
|