DM355 Demo Startup
From Wiki
Jump to navigationJump to search
The TI startup code normally looks like this:
| Code: /etc/init.d/dvevmdemo |
#!/bin/sh
DVEVMDIR=/opt/dvsdk/dm355
DEMO=interface
OPTS=""
# Load the dsplink and cmem kernel modules
cd $DVEVMDIR
./loadmodules.sh
# Start the web server
echo Starting web server ...
if [ -x /opt/dvsdk/dm355/web/thttpd_wrapper ] ; then
echo " thttpd"
/opt/dvsdk/dm355/web/thttpd_wrapper &
fi
# Start the demo application
cd $DVEVMDIR
./$DEMO $OPTS > /dev/null 2>&1 &
|
To start a different program at boot time, such as slideshow, replace the file with following contents:
| Code: /etc/init.d/dvevmdemo |
#!/bin/sh
USBDRIVE=/mnt/usb
DVEVMDIR=/opt/dvsdk/dm355
DEMO=slideshow
OPTS=""
#
# If the USB drive file version is newer, update the version in $DVEVMDIR
#
copyIfNewer ()
{
if [ -e $USBDRIVE/$1 ] && [ $USBDRIVE/$1 -nt $DVEVMDIR/$1 ] ; then
if [ ! -d `dirname $1` ] ; then
mkdir -p `dirname $1`
fi
cp -a $USBDRIVE/$1 $DVEVMDIR/$1
fi
}
#
# Load the dsplink and cmem kernel modules
#
cd $DVEVMDIR
./loadmodules.sh
cd $DVEVMDIR
copyIfNewer "screens/blank.jpg"
copyIfNewer "screens/error.jpg"
copyIfNewer "screens/start.jpg"
copyIfNewer "screens/welcome.jpg"
copyIfNewer "slideshow"
sleep 3
./$DEMO $OPTS > /dev/null 2>&1 &
|