#!/bin/sh

export LD_LIBRARY_PATH=/tmp/lib:$LD_LIBRARY_PATH:

cd /tmp/

chmod 777 web/iframe/*
chmod 777 web/images/*
chmod 777 web/css/*
chmod 777 web/css/iframe/*
chmod 777 web/js/*
chmod 777 web/js/iframe/*
chmod 777 web/*

chmod 777 kmod/sata/*
chmod 777 kmod/usb/*
chmod 777 kmod/*
chmod 777 lib/*
chmod 777 *
chmod 777 nginx/sbin/*

#I2S
himm 0xf8a210a4 0x174
himm 0xf8a210a0 0x174
himm 0xf8a2109c 0x174
himm 0xf8a21098 0x1F4

#LED
himm 0xf8000044 0x20820000
himm 0xf8004400 0x1f
#ON
himm 0xf800407c 0x0
#OFF
himm 0xf800407c 0x1f
#sw1
himm 0xF8A2105C 0x00
himm 0xF8B22400 0x00
#eth
himm 0xf8a210dc 0x133
himm 0xf8a210e0 0x133

UART2 /dev/ttyAMA1
himm 0xF8A21064 0x00000135
himm 0xF8A21068 0x00000135
himm 0xF8A2106C 0x00000135
himm 0xF8A21070 0x00000135

UART3 /dev/ttyAMA2
himm 0xF8A2104C 0x00000132
himm 0xF8A21050 0x00000132
himm 0xF8A21054 0x00000132
himm 0xF8A21058 0x00000132


ifconfig lo up
telnetd&

/tmp/nginx/sbin/nginx -p /tmp/nginx/

cd /tmp/kmod/
./load

cd /tmp/
./reset &

while true 
do   
./HiSTB.d3
done 



