zsw 发表于 2020-3-18 16:08:58

启动



这个到底在自启文件 rc.local这个文件的哪里关啊

zsw 发表于 2020-3-18 16:13:34

这个初始界面,

zsw 发表于 2020-3-18 16:19:33

#!/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

zhichao 发表于 2020-3-18 16:23:01

source /etc/rc.d/qt_env.sh改成 #source /etc/rc.d/qt_env.sh这样关不掉吗,我这能关啊

zsw 发表于 2020-3-18 16:30:57

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:43:41

zsw 发表于 2020-3-18 16:30
关是能关但是我自己的程序也跑不起来了,,难道要在前面添加自启脚本??

也不行,,,,,,,

zsw 发表于 2020-3-18 16:53:22

zhichao 发表于 2020-3-18 16:23
source /etc/rc.d/qt_env.sh改成 #source /etc/rc.d/qt_env.sh这样关不掉吗,我这能关啊

我需要关的是初始界面这个控件,而不是qt系统

zhichao 发表于 2020-3-18 16:55:55

看看运行环境有没有,先有运行环境再运行qt

zsw 发表于 2020-3-18 17:00:42

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了,

zhichao 发表于 2020-3-19 09:21:27

add the "-qws" command-line option.
加-qws比如./4G -qws

zhichao 发表于 2020-3-19 09:55:31

    #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程序,这样改可以用

relations 发表于 2020-4-13 14:33:17

这个界面的启动是在/etc/init.d/qt.sh中,一般在最后几行。把./matux      -qws这条指令屏蔽掉就行了。(ps:文件名记不太清了,反正是m开头,自己对应一下)
页: [1]
查看完整版本: 启动