启动
这个到底在自启文件 rc.local这个文件的哪里关啊
这个初始界面, #!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here
if [ -x "/usr/bin/rpm" -a -e "/tmp/ltib" ]
then
echo "rebuilding rpm database"
rm -rf /tmp/ltib
rpm --rebuilddb
fi
# fix up permissions
if [ -d /home/user ]
then
chown -R user.user /home/user
fi
# Add nodes when running under the hypervisor and static devices
if [ -r /sys/class/misc/fsl-hv/dev -a ! -r /dev/fsl-hv ]
then
echo "creating hypervisor nodes"
DEVID=`cat /sys/class/misc/fsl-hv/dev`
if [ -n "$DEVID" ]
then
MAJOR="${DEVID%:*}"
MINOR="${DEVID##*:}"
if [ \( "$MAJOR" -gt 0 \) -a \( "$MINOR" -gt 0 \) ]
then
rm -f /dev/fsl-hv
mknod /dev/fsl-hv c $MAJOR $MINOR
fi
fi
for i in 0 1 2 3 4 5 6 7
do
mknod /dev/hvc$i c 229 $i
done
fi
# add the fm device nodes
if [ -n "$(cat /proc/devices | grep fm | sed 's/\(*\).*/\1/')" -a ! -r /dev/fm0 ]
then
echo "creating fman device nodes"
cd /usr/share/doc/fmd-uspace-01.01/test/
sh fm_dev_create
cd -
fi
for i in 0 1 2; do
if [ -e /sys/class/graphics/fb$i ]; then
chmod 0666 /sys/class/graphics/fb$i/pan
fi
done
mode=$1
if [ $mode = "start" ]
then
ifconfig lo 127.0.0.1
ifconfig lo up
#set bits_per_pixel
board=`cat /proc/boardname | awk '{print $2}'`
if [ $board = "OKMX6UL-C2" ]
then
echo 16 > /sys/class/graphics/fb0/bits_per_pixel
else
echo 32 > /sys/class/graphics/fb0/bits_per_pixel
fi
#configure can devices
ifconfig can0 down
ip link set can0 up type can bitrate 125000 triple-sampling on
ifconfig can0 up
ifconfig can1 down
ip link set can1 up type can bitrate 125000 triple-sampling on
ifconfig can1 up
#rename ttymxc
ln -s /dev/ttymxc3 /dev/ttyS3
ln -s /dev/ttymxc4 /dev/ttyS4
ln -s /dev/ttymxc1 /dev/ttyS6
#configure ethenet
/etc/rc.d/init.d/networking restart
#restore alsa
alsactl restore
#start boa server
/sbin/boa
#set qt env
if [ -e /root/laohua ]
then
/usr/bin/memtester 80M1>> /root/laohua/mem-out.log2 >> /root/laohua/mem-err.log &
/root/laohua/start.sh &
else
source /etc/rc.d/qt_env.sh
#start lighttpd server and matrix_gui browser
cd /forlinx/web/lighttpd/sbin
./lighttpd -f ../config/lighttpd.conf
cd /forlinx/qt/bin
./matrix_gui -qws 2>/dev/null &
fi
#enable ssh server
#/usr/sbin/dropbear
# /home/root/startnet.sh &
# wdtdogreset &
# source forlinx/test/sys-green.sh &
# source forlinx/test/heartbeat.sh &
#source /etc/rc.d/qt_env.sh
#source /etc/rc.d/apps.sh &
/media/mmcblk0p1/df8b
fi source /etc/rc.d/qt_env.sh改成 #source /etc/rc.d/qt_env.sh这样关不掉吗,我这能关啊
zhichao 发表于 2020-3-18 16:23
source /etc/rc.d/qt_env.sh改成 #source /etc/rc.d/qt_env.sh这样关不掉吗,我这能关啊
关是能关但是我自己的程序也跑不起来了,,难道要在前面添加自启脚本?? zsw 发表于 2020-3-18 16:30
关是能关但是我自己的程序也跑不起来了,,难道要在前面添加自启脚本??
也不行,,,,,,, zhichao 发表于 2020-3-18 16:23
source /etc/rc.d/qt_env.sh改成 #source /etc/rc.d/qt_env.sh这样关不掉吗,我这能关啊
我需要关的是初始界面这个控件,而不是qt系统 看看运行环境有没有,先有运行环境再运行qt zhichao 发表于 2020-3-18 16:55
看看运行环境有没有,先有运行环境再运行qt
QWSSocket::connectToLocalFile could not connect:: No such file or directory
QWSSocket::connectToLocalFile could not connect:: No such file or directory
QWSSocket::connectToLocalFile could not connect:: No such file or directory
QWSSocket::connectToLocalFile could not connect:: No such file or directory
QWSSocket::connectToLocalFile could not connect:: No such file or directory
QWSSocket::connectToLocalFile could not connect:: No such file or directory
No Qt for Embedded Linux server appears to be running.
If you want to run this program as a server,
add the "-qws" command-line option.
这样的,没有qt了, add the "-qws" command-line option.
加-qws比如./4G -qws #set qt env
if [ -e /root/laohua ]
then
/usr/bin/memtester 80M1>> /root/laohua/mem-out.log2 >> /root/laohua/
/root/laohua/start.sh &
else
source /etc/rc.d/qt_env.sh
#start lighttpd server and matrix_gui browser
cd /forlinx/web/lighttpd/sbin
./lighttpd -f ../config/lighttpd.conf
# cd /forlinx/qt/bin
# ./matrix_gui -qws 2>/dev/null &
fi
#enable ssh server
/usr/sbin/dropbear
cd /opt/QT4.8.6/apps
./4g -qws &
我做了一下,用的4g程序,这样改可以用 这个界面的启动是在/etc/init.d/qt.sh中,一般在最后几行。把./matux -qws这条指令屏蔽掉就行了。(ps:文件名记不太清了,反正是m开头,自己对应一下)
页:
[1]