Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    D1s tina 如何开机自启动程序

    H/F/TV Series
    4
    8
    1056
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mafei LV 5 last edited by

      busybox-init-base-files/etc/init.d 编写S99启动脚本。这种方法无效

      M M 2 Replies Last reply Reply Quote Share 1
      • M
        M_xiaotao LV 3 @mafei last edited by

        @mafei 你是不是有一个S99 的脚本了,可以先试一下在/etc/init.d/rcS 中添加脚本,看看可不可以启动

        M 1 Reply Last reply Reply Quote Share 1
        • M
          mafei LV 5 @M_xiaotao last edited by

          @m_xiaotao S99启动脚本写了,手动调用也能启动,就是不知道怎么开机调用,试了很多方式,没蛋用

          M 1 Reply Last reply Reply Quote Share 2
          • M
            M_xiaotao LV 3 @mafei last edited by

            @mafei 直接在/etc/init.d/rcS 中添加需要执行的代码,看看可不可以启动,脚本中也可以加一些echo 判断一下执行到哪里,最好加两张截图,看看为啥没执行

            1 Reply Last reply Reply Quote Share 0
            • T
              tivon LV 6 last edited by

              T113,tina5.0是这个位置
              /openwrt/openwrt/package/base-files/files/etc/init.d
              中建立脚本,名字随便取,值越大,越靠后
              start()开机执行
              stop()关机(poweroff)执行

              #!/bin/sh /etc/rc.common

              Copyright (C) 2008 OpenWrt.org

              START=98
              STOP=99
              start() {
              echo "rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr" > /dev/console
              }
              stop() {
              echo "SSSSSSSSSSSSSSSTOPPPPPPPP" > /dev/console
              }

              1 Reply Last reply Reply Quote Share 0
              • S
                sundaygeek LV 2 last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote Share 0
                • M
                  mafei LV 5 @mafei last edited by

                  @mafei target/allwinner/d1s-nezha/base-files/etc/rc.local

                  Put your custom commands here that should be executed once

                  the system init finished. By default this file does nothing.

                  dd if=/dev/zero of=/dev/fb0
                  amixer -D hw:audiocodec cset name='Headphone Switch' 1
                  amixer -D hw:audiocodec cset name='Headphone Volume' 7
                  amixer -D hw:audiocodec cset numid=31 1
                  /app/main &
                  exit 0

                  添加无需编写S99脚本

                  M 1 Reply Last reply Reply Quote Share 0
                  • M
                    mafei LV 5 @mafei last edited by

                    @mafei 在 D1s tina 如何开机自启动程序 中说:

                    the system init finished. By default this file does nothing.

                    或
                    target/allwinner/t113-nezha/busybox-init-base-files/etc/init.d/rc.final

                    1 Reply Last reply Reply Quote Share 0
                    • 1 / 1
                    • First post
                      Last post

                    Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                    行为准则 | 用户协议 | 隐私权政策