#!/bin/sh

export LD_PRELOAD=/usr/lib/libdebugger.so
export LD_LIBRARY_PATH=/usr/ansjer/ax/lib

case "$1" in
  start)
    #if [ ! -f /data/imx307_mipi_1920_1080_30_linear.json ]; then
    #    cp /etc/isp/* /data/
    #fi

    #if `cat /proc/cmdline | grep 'root=/dev/mmc' > /dev/null`
    #then
    #    log_size=10240
    #else
    #    log_size=1024
    #fi
    #logcat -s *:W -v time -r$log_size -f "/data/log/logcat.log" &

    #if [ -f /data/pre_run.sh ]; then
    #    /bin/sh /data/pre_run.sh &
    #fi

	#if [ ! -f /data/imx415_mipi_3864_2192_15_linear.json ]; then
	#	cp -rf /etc/isp/imx415_* /data/
	#fi

	#ifconfig eth0 192.168.138.107 up
	#route add default gw 192.168.138.1
	#sleep 1

	echo VISS=0 > /sys/devices/virtual/misc/memctrl/set_read_priority
	echo VISS=0 > /sys/devices/virtual/misc/memctrl/set_write_priority
	route add -net 239.255.255.250 netmask 255.255.255.255 eth0 &
	sleep 1
    /usr/ansjer/ansjeripc &
    /usr/ansjer/ansjerapplauncher &

    ;;
  *)
    ;;
esac
