--- /dev/null
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+I2C_BUS=0
+DS3221=68
+
+echo heartbeat > /sys/class/leds/linkit-smart-7688:orange\:wifi/trigger
+
+if [ ! -e /dev/lcdi2c ]; then
+ insmod lcdi2c busno=0 address=0x27 cursor=0 blink=0 topo=1
+fi
+
+echo 1 > /sys/class/alphalcd/lcdi2c/clear
+echo \00\00 > /sys/class/alphalcd/lcdi2c/position
+
+if [ ! -e /dev/rtc0 ]; then
+
+ modprobe rtc-ds1307
+ echo ds1307 0x$DS3221 > /sys/class/i2c-dev/i2c-$I2C_BUS/device/new_device
+ sleep 1
+ if [ -e /dev/rtc0 ]; then
+ ln -sf /dev/rtc0 /dev/rtc
+ logger -t hardware RTC initialized
+ fi
+
+fi
+
+if [ -e /dev/rtc0 ]; then
+ /sbin/hwclock -u --rtc=/dev/rtc0 --hctosys
+ echo "Hardware RTC OK" > /dev/lcdi2c
+else
+ echo "Hardware RTC FAIL" > /dev/lcdi2c
+fi