导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    D1s tina 如何开机自启动程序

    H/F/TV Series
    4
    8
    1016
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • M
      mafei LV 5 最后由 编辑

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

      M M 2 条回复 最后回复 回复 引用 分享 1
      • M
        M_xiaotao LV 3 @mafei 最后由 编辑

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

        M 1 条回复 最后回复 回复 引用 分享 1
        • M
          mafei LV 5 @M_xiaotao 最后由 编辑

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

          M 1 条回复 最后回复 回复 引用 分享 2
          • M
            M_xiaotao LV 3 @mafei 最后由 编辑

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

            1 条回复 最后回复 回复 引用 分享 0
            • T
              tivon LV 6 最后由 编辑

              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 条回复 最后回复 回复 引用 分享 0
              • S
                sundaygeek LV 2 最后由 编辑

                此回复已被删除!
                1 条回复 最后回复 回复 引用 分享 0
                • M
                  mafei LV 5 @mafei 最后由 编辑

                  @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 条回复 最后回复 回复 引用 分享 0
                  • M
                    mafei LV 5 @mafei 最后由 编辑

                    @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 条回复 最后回复 回复 引用 分享 0
                    • 1 / 1
                    • First post
                      Last post

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

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