在板子上电后自动运行程序

2019-04-14 16:34发布

将自己的应用加在/etc/profile文件中
MSLIB_PATH=/vendor/lib

export LD_PRELOAD=$MSLIB_PATH/preloadable_libiconv.so
export LD_LIBRARY_PATH=$MSLIB_PATH:$MSLIB_PATH/utopia
export TERM=vt100
export TERMINFO=/terminfo

export GST_PLUGIN_PATH=$MSLIB_PATH/gstreamer-0.10
export GST_PLUGIN_SCANNER=$MSLIB_PATH/gstreamer-0.10/bin/gst-plugin-scanner
export GST_REGISTRY=$MSLIB_PATH/gstreamer.registry
export GST_REGISTRY_FORK=no
export GST_REGISTRY_UPDATE=no

ulimit -c unlimited >/dev/null 2>&1
#echo ""
#echo ""
#echo "Please press Ctrl-C TWICE to leave auto run mode."
#for i in 1 2 3 4 5 ; do
#    echo -e -n $i" "
#    sleep 1
#done

#udhcpc -t 1 -T 3 -n
ulimit -s 4196

#Skype run-time daemon
if [ -f /applications/Skype/linux-mipsel-skypekit-voicertp-videortp ];then
        echo "Start Skype daemon..."
        /applications/Skype/linux-mipsel-skypekit-voicertp-videortp &
fi

echo "cd to applications/bin"
cd /applications

./apm &

cd /applications/bin
./autorun &

echo "cd to applications/tv/bin"
cd /applications/tv/bin
./dvbt_board &