Navigation

    全志在线开发者论坛

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

    Tina procd-init 与 busybox-init 切换

    Linux
    init tina-linux
    2
    3
    271
    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.
    • Y
      YterAA LV 7 last edited by

      tina 默认为 procd-init。

      Procd INIT

      make menuconfig 进行配置

      1. System init 选择procd-init

      2. 以下一步步选中

         Base system  --->
         <*>block-mount
         <*>busybox................................ Core utilities for embedded Linux  --->
                 Init Utilities  --->
                 [ ] init       此处不选
      
      1. env.cfg修改
      init=/sbin/init
      

      Busybox INIT

      make menuconfig 进行配置

      1. System init 选择busy-init

      2. 以下一步步选中

         Base system  --->
         <*>busybox................................ Core utilities for embedded Linux  --->
                Init Utilities  --->
                [* ] init       此处选上
      
      1. env.cfg 修改
      init=/init
      rdinit=/rdinit
      
      1 Reply Last reply Reply Quote Share 0
      • M
        memory LV 7 last edited by

        rdinit=/rdinit
        这个是干嘛的?

        Y 1 Reply Last reply Reply Quote Share 0
        • Y
          YterAA LV 7 @memory last edited by YterAA

          @memory

          11307b18-f0ec-46e5-b7af-6e3ef5741576-image.png

          (1)如果ramdisk_execute_command变量指定了要运行的程序,则启动它。
                    ramdisk_execute_command的取值分三种情况,
                   1)如果命令行参数指定了“rdinit=xxx”,则ramdisk_execute_command等于这个参数指定的程序
                   2)否则,如果/init程序存在,ramdisk_execute_command就等于“/init”。
                   3)否则,ramdisk__execute_command为空
          (2)如果execute_command变量指定了要运行的程序,启动它。
                   如果命令行参数指定了"init=...",则execute_command等于这个参数指定的程序,否则为空
          (3)如果ramdisk_execute_command和execute_command参数都没有指定,则依次执行”/sbin/init、/etc/init、/bin/init、/bin/sh“
          
          在tina系统中,我们可以通过去修改env.cfg文件”rdinit=xxx“或”init=xxx“参数来指定启动的第一个用户进程
          
          1 Reply Last reply Reply Quote Share 1
          • 1 / 1
          • First post
            Last post

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

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