id: 661890d0284e4ded8ff8ee0da14a7f60
parent_id: 
item_type: 1
item_id: 61832b0ef8f64a7e89621e0987fa724a
item_updated_time: 1764345628470
title_diff: "[{\"diffs\":[[1,\"一文看懂嵌入式Linux的etcinit.d目录下的所有启动文件\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":32}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>一文看懂嵌入式Linux的/etc/init.d/目录下的所有启动文件</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"content-class\\\" content=\\\"yinxiang.peso.superNote\\\"/>\\\r\\\n  <meta name=\\\"application-data:yinxiang.noteLayout\\\" content=\\\"{\\\"lineSpace\\\":\\\"recommend\\\",\\\"paragraphSpace\\\":\\\"recommend\\\"}\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"40580\\\"></a>\\\r\\\n<h1>一文看懂嵌入式Linux的/etc/init.d/目录下的所有启动文件</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"margin:0px;\\\"><div style=\\\"padding:8px 0px;margin:8px auto;max-width:700px;\\\"> <div><span></span></div>\\\n<p></p>\\\n<div style=\\\"--en-blockquote:true;box-sizing: border-box; padding-left: 19px; padding-top: 6px; padding-bottom: 6px; border-left: 3px solid #b4c0cc; background-position: initial initial; background-repeat: initial initial; margin-top: 6px\\\"><div>原文链接: <a href=\\\"http://mp.weixin.qq.com/s?__biz=MzUyNDUyMDQyNQ==&amp;mid=2247486979&amp;idx=1&amp;sn=f6c3c237d36ac0c3f186d44536244f56&amp;chksm=fbc5fb7d6939498028a8ae722c3d33ef6608754b7203c1e1f1b2adf5a10e8ff6691298a7846d&amp;mpshare=1&amp;scene=1&amp;srcid=0426fhclhKW3iIsippLcVku6&amp;sharer_shareinfo=821d52557e8f0128c8dffd877a28be1c&amp;sharer_shareinfo_first=821d52557e8f0128c8dffd877a28be1c#rd\\\"><span>http://mp.weixin.qq.com/s?__biz=MzUyNDUyMDQyNQ==&amp;mid=2247486...</span></a></div></div>\\\n<p></p>\\\n<div><span></span></div>\\\n<div style=\\\"\\\"><div><div><h1 style=\\\"margin:0\\\"> 一文看懂嵌入式Linux的/etc/init.d/目录下的所有启动文件 </h1><div><span style=\\\"position:relative\\\">原创</span><span> 潘帅 </span><span><a style=\\\"position:relative\\\"> Linux随笔录 </a></span><span><em></em></span></div><div style=\\\";\\\"><p style=\\\"margin:0;margin-bottom:0;padding-top:8px;padding-bottom:8px;outline:0;text-wrap:wrap;background-color:rgb(255,255,255);font-size:16px;letter-spacing:0.544px;font-family:&quot;PingFang SC&quot;,&quot;Microsoft YaHei&quot;,sans-serif;line-height:26px;color:rgb(102,102,102);text-align:center;__visibility:visible\\\"><span style=\\\"outline: 0px;color: rgb(62, 62, 62);font-size: 14px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;word-spacing: 2px;letter-spacing: 1.5px;__visibility: visible;\\\"><span>点击上方</span></span><span style=\\\"outline: 0px;color: rgb(0, 82, 255);font-size: 14px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;word-spacing: 2px;letter-spacing: 1.5px;__visibility: visible;\\\"><strong style=\\\"outline: 0px;__visibility: visible;\\\"><span>“Linux随笔录”</span></strong></span><span style=\\\"outline: 0px;color: rgb(62, 62, 62);font-size: 14px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;word-spacing: 2px;letter-spacing: 1.5px;__visibility: visible;\\\"><span>，选择</span></span><strong style=\\\"outline: 0px;color: rgb(62, 62, 62);font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;word-spacing: 2px;letter-spacing: 1.5px;font-size: 15px;__visibility: visible;\\\"><span style=\\\"outline: 0px;color: rgb(255, 41, 65);__visibility: visible;\\\"><span>“置顶/星标公众号”</span></span></strong></p><div style=\\\"margin-bottom: 0px;outline: 0px;text-wrap: wrap;background-color: rgb(255, 255, 255);color: rgba(0, 0, 0, 0.8);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 15px;text-align: center;letter-spacing: 1.5px;\\\"><span style=\\\"outline: 0px;color: rgb(127, 127, 127);font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;word-spacing: 2px;font-size: 14px;__visibility: visible;\\\"><span>福利干货，第一时间送达</span></span></div><p style=\\\"margin:0;margin-bottom:0;outline:0\\\"><span><br/></span></p><div style=\\\"margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;font-family: Optima, 'Microsoft YaHei', PingFangSC-regular, serif;font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;word-spacing: 0em;letter-spacing: 0em;word-break: break-word;overflow-wrap: break-word;text-align: left;\\\"><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span><br/></span></p><ul style=\\\"margin:0;list-style-type:disc;margin-top:8px;margin-bottom:8px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:25px;padding-right:0;color:rgb(0,0,0)\\\"><li><div><span>前言</span></div></li><li><div><span>本篇环境</span></div></li><li><div><span>init.d概述</span></div></li><li><div><span>init.d目录脚本</span></div></li><li><div><span>最后</span></div></li></ul><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span><br/></span></p><h2 style=\\\"margin:0;border-bottom-color:rgb(239,112,96);margin-top:30px;margin-bottom:15px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:0;padding-right:0;align-items:unset;background-attachment:scroll;background-clip:border-box;background-color:unset;background-image:none;background-origin:padding-box;background-position-x:0;background-position-y:0;background-repeat:no-repeat;background-size:auto;border-top-style:none;border-bottom-style:solid;border-left-style:none;border-right-style:none;border-top-width:1px;border-bottom-width:2px;border-left-width:1px;border-right-width:1px;border-top-color:rgb(0,0,0);border-left-color:rgb(0,0,0);border-right-color:rgb(0,0,0);border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:none;display:flex;flex-direction:unset;float:unset;height:auto;justify-content:unset;line-height:1.1em;overflow-x:unset;overflow-y:unset;text-align:left;text-shadow:none;transform:none;width:auto;-webkit-box-reflect:unset\\\"><span style=\\\"font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"><span>前言</span></span><span style=\\\"border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"></span></h2><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>在嵌入式Linux系统的开发和维护过程中，了解系统启动和服务管理机制是至关重要的。其中</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>/etc/init.d/</span></code><span> 目录扮演了关键角色，它包含了用于初始化、启动、重启或停止各种服务的脚本。本文将深入浅出地介绍这个目录下常见启动文件的作用，帮助读者更好地理解如何管理和优化嵌入式Linux设备。</span></p><h2 style=\\\"margin:0;border-bottom-color:rgb(239,112,96);margin-top:30px;margin-bottom:15px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:0;padding-right:0;align-items:unset;background-attachment:scroll;background-clip:border-box;background-color:unset;background-image:none;background-origin:padding-box;background-position-x:0;background-position-y:0;background-repeat:no-repeat;background-size:auto;border-top-style:none;border-bottom-style:solid;border-left-style:none;border-right-style:none;border-top-width:1px;border-bottom-width:2px;border-left-width:1px;border-right-width:1px;border-top-color:rgb(0,0,0);border-left-color:rgb(0,0,0);border-right-color:rgb(0,0,0);border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:none;display:flex;flex-direction:unset;float:unset;height:auto;justify-content:unset;line-height:1.1em;overflow-x:unset;overflow-y:unset;text-align:left;text-shadow:none;transform:none;width:auto;-webkit-box-reflect:unset\\\"><span style=\\\"font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"><span>本篇环境</span></span><span style=\\\"border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"></span></h2><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>软件SDK：RV1106 SDK</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>编译环境：Ubuntu 20.04 LTS</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>编译工具链：arm-rockchip831-linux-uclibcgnueabihf-</span></p><h2 style=\\\"margin:0;border-bottom-color:rgb(239,112,96);margin-top:30px;margin-bottom:15px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:0;padding-right:0;align-items:unset;background-attachment:scroll;background-clip:border-box;background-color:unset;background-image:none;background-origin:padding-box;background-position-x:0;background-position-y:0;background-repeat:no-repeat;background-size:auto;border-top-style:none;border-bottom-style:solid;border-left-style:none;border-right-style:none;border-top-width:1px;border-bottom-width:2px;border-left-width:1px;border-right-width:1px;border-top-color:rgb(0,0,0);border-left-color:rgb(0,0,0);border-right-color:rgb(0,0,0);border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:none;display:flex;flex-direction:unset;float:unset;height:auto;justify-content:unset;line-height:1.1em;overflow-x:unset;overflow-y:unset;text-align:left;text-shadow:none;transform:none;width:auto;-webkit-box-reflect:unset\\\"><span style=\\\"font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"><span>init.d概述</span></span><span style=\\\"border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"></span></h2><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>init.d</span></code><span> 是指包含一系列 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>Shell</span></code><span> 脚本的目录，这些脚本用于控制服务（也称为守护进程）的生命周期。当系统启动时，</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>init</span></code><span> 进程会根据预定义的规则执行这些脚本，以确保必要的服务能够正确启动。下面是 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>RV1106</span></code><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>SDK</span></code><span>里的 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>rootfs</span></code><span> 下的的 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>init.d</span></code><span>目录</span></p><div style=\\\"margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;\\\"><span><img src=\\\":/77bb6b2bd5f340278cedc4166a06afce\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;\\\"/></span></div><h2 style=\\\"margin:0;border-bottom-color:rgb(239,112,96);margin-top:30px;margin-bottom:15px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:0;padding-right:0;align-items:unset;background-attachment:scroll;background-clip:border-box;background-color:unset;background-image:none;background-origin:padding-box;background-position-x:0;background-position-y:0;background-repeat:no-repeat;background-size:auto;border-top-style:none;border-bottom-style:solid;border-left-style:none;border-right-style:none;border-top-width:1px;border-bottom-width:2px;border-left-width:1px;border-right-width:1px;border-top-color:rgb(0,0,0);border-left-color:rgb(0,0,0);border-right-color:rgb(0,0,0);border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:none;display:flex;flex-direction:unset;float:unset;height:auto;justify-content:unset;line-height:1.1em;overflow-x:unset;overflow-y:unset;text-align:left;text-shadow:none;transform:none;width:auto;-webkit-box-reflect:unset\\\"><span style=\\\"font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"><span>init.d目录脚本</span></span><span style=\\\"border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"></span></h2><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>先看一下 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>rcS</span></code><span> 文件，它是本目录在开机时最先启动的文件。</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#!/bin/sh</span><span><br/></span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Start all init scripts in /etc/init.d</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># executing them in numerical order.</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>for</span></span><span> i </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span> /etc/init.d/S??* ;</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>do</span></span><span><br/></span><span>     </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Ignore dangling symlinks (if any).</span></span><span><br/></span><span>     [ ! -f </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$i</span></span><span>&quot;</span></span><span> ] &amp;&amp; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>continue</span></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#如果是目录或设备文件则遍历下一个</span></span><span><br/></span><span>     </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$i</span></span><span>&quot;</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>        *.sh) </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#.sh结尾的脚本</span></span><span><br/></span><span>            </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Source shell script for speed.</span></span><span><br/></span><span>            (</span><span><br/></span><span>                </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>trap</span></span><span> - INT QUIT TSTP  </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># 重置为默认行为</span></span><span><br/></span><span>                </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>set</span></span><span> start </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#设置传入的参数start</span></span><span><br/></span><span>                . </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$i</span></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#执行携带start参数</span></span><span><br/></span><span>            )</span><span><br/></span><span>            ;;</span><span><br/></span><span>        *) </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#其他脚本</span></span><span><br/></span><span>            </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># No sh extension, so fork subprocess.</span></span><span><br/></span><span>            </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$i</span></span><span> start </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#执行，携带start参数</span></span><span><br/></span><span>            ;;</span><span><br/></span><span>    </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>done</span></span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>总结：检测大写S开头的所有脚本并执行它们。</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>file:rcK</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>rcK</span></code><span> 文件是设备关机或重启执行的文件，它和 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>rcS</span></code><span> 差不多，只有传入的参数有微微差别。</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#</span></span><span style=\\\"line-height: 26px;\\\"><span>!/bin/sh</span></span><span><br/></span><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span><br/></span><span>#</span></span><span style=\\\"line-height: 26px;\\\"><span> Stop all init scripts </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span> /etc/init.d</span></span><span><br/></span><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#</span></span><span style=\\\"line-height: 26px;\\\"><span> executing them </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span> reversed numerical order.</span></span><span><br/></span><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span>for i in $(ls -r /etc/init.d/S??*) ;do #$()相当于反引号，首先执行命令，-r倒序排列</span><span><br/></span><span>     # Ignore dangling symlinks (if any).</span><span><br/></span><span>     [ ! -f &quot;$i&quot; ] &amp;&amp; continue #如果不存在则遍历下一个</span><span><br/></span><span>     case &quot;$i&quot; in</span><span><br/></span><span>        *.sh)</span><span><br/></span><span>            # Source shell script for speed.</span><span><br/></span><span>            (</span><span><br/></span><span>                trap - INT QUIT TSTP # 重置为默认行为</span><span><br/></span><span>                set stop  #设置传入的参数stop</span><span><br/></span><span>                . $i #执行，携带stop参数</span><span><br/></span><span>            )</span><span><br/></span><span>            ;;</span><span><br/></span><span>        *)</span><span><br/></span><span>            # No sh extension, so fork subprocess.</span><span><br/></span><span>            $i stop #执行，携带stop参数</span><span><br/></span><span>            ;;</span><span><br/></span><span>    esac</span><span><br/></span><span>done</span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>总结：关机时还需要启动一遍启动脚本，只不过传入的参数是 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>stop</span></code><span>，需要处理一些后续工作才关机。</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>file:S01logging</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#</span></span><span style=\\\"line-height: 26px;\\\"><span>!/bin/sh</span></span><span><br/></span><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#</span></span><span style=\\\"line-height: 26px;\\\"><span> Start logging</span></span><span><br/></span><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span><br/></span><span>start() {</span><span><br/></span><span>        echo -n &quot;Starting logging: &quot;</span><span><br/></span><span>        start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n</span><span><br/></span><span>        start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n</span><span><br/></span><span>        echo &quot;OK&quot;</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span>stop() {</span><span><br/></span><span>        echo -n &quot;Stopping logging: &quot;</span><span><br/></span><span>        start-stop-daemon -K -q -p /var/run/syslogd.pid</span><span><br/></span><span>        start-stop-daemon -K -q -p /var/run/klogd.pid</span><span><br/></span><span>        echo &quot;OK&quot;</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span>case &quot;$1&quot; in</span><span><br/></span><span>  start)</span><span><br/></span><span>        start</span><span><br/></span><span>        ;;</span><span><br/></span><span>  stop)</span><span><br/></span><span>        stop</span><span><br/></span><span>        ;;</span><span><br/></span><span>  restart|reload)</span><span><br/></span><span>        stop</span><span><br/></span><span>        start</span><span><br/></span><span>        ;;</span><span><br/></span><span>  *)</span><span><br/></span><span>        echo &quot;Usage: $0 {start|stop|restart}&quot;</span><span><br/></span><span>        exit 1</span><span><br/></span><span>esac</span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>exit $? </span></code><span>#最后一次命令的执行状态码，</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>0</span></code><span> 为正常。 由 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>rcS</span></code><span> 或者 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>rcK</span></code><span> 脚本调用的子进程运行此脚本，</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>. S01logging start</span></code><span>或 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>. S01logging stop</span></code><span> 参数来控制执行 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>start</span></code><span> 函数或 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>stop</span></code><span> 函数。</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>参数</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>-b | --background 后台运行</span><span><br/></span><span>-S | --start –  开启一个系统守护程序，并传递参数给它</span><span><br/></span><span>-K | --stop 停止一个程序</span><span><br/></span><span>-q | --quiet 不要输出警告</span><span><br/></span><span>-m| --make-pidfile 当命令本身不创建pidfile时，由start-stop-daemon创建</span><span><br/></span><span>-p | --pidfile  要检查的pid文件</span><span><br/></span><span>-x | --exec  程序启动/检查它是否正在运行</span><span><br/></span><span>-n | --name  要检查的进程名称</span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>脚本中的两条指令主要意思是 1、启动 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>syslogd</span></code><span> 守护进程，负责收集和管理用户空间的日志信息 2、启动 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>klogd</span></code><span> 守护进程， 负责收集和管理内核空间的日志信息</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>file:S10udev</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#!/bin/sh</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># udev  This is a minimal non-LSB version of a UDEV startup script.  It</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       was derived by stripping down the udev-058 LSB version for use</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       with buildroot on embedded hardware using Linux 2.6.34+ kernels.</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       You may need to customize this for your system's resource limits</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       (including startup time!) and administration.  For example, if</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       your early userspace has a custom initramfs or initrd you might</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       need /dev much earlier; or without hotpluggable busses (like USB,</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       PCMCIA, MMC/SD, and so on) your /dev might be static after boot.</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       This script assumes your system boots right into the eventual root</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       filesystem, and that init runs this udev script before any programs</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       needing more device nodes than the bare-bones set -- /dev/console,</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#       /dev/zero, /dev/null -- that's needed to boot and run this script.</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Check for missing binaries</span></span><span><br/></span><span>UDEV_BIN=/sbin/udevd</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span> -x </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UDEV_BIN</span></span><span> || </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 5 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#文件不可执行则退出，退出码：5</span></span><span><br/></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Check for config file and read it</span></span><span><br/></span><span>UDEV_CONFIG=/etc/udev/udev.conf</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span> -r </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UDEV_CONFIG</span></span><span> || </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 6 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#文件不可读则退出，退出码：6</span></span><span><br/></span><span>. </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UDEV_CONFIG</span></span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span>&quot;</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>    start) </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#设备开机时</span></span><span><br/></span><span>        </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>printf</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Populating %s using udev: &quot;</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${udev_root:-/dev}</span></span><span>&quot;</span></span><span><br/></span><span>        [ -e /proc/sys/kernel/hotplug ] &amp;&amp; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>printf</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>'\\\\000\\\\000\\\\000\\\\000'</span></span><span> &gt; /proc/sys/kernel/hotplug  </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#清空（或禁用）内核的热插拔事件处理程序 </span></span><span><br/></span><span>        /sbin/udevd -d || { </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;FAIL&quot;</span></span><span>; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1; }</span><span><br/></span><span>        udevadm trigger --</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>type</span></span><span>=subsystems --action=add</span><span><br/></span><span>        udevadm trigger --</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>type</span></span><span>=devices --action=add</span><span><br/></span><span>        udevadm settle --timeout=30 || </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;udevadm settle failed&quot;</span></span><span><br/></span><span>        </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;done&quot;</span></span><span><br/></span><span>        ;;</span><span><br/></span><span>    stop) </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#设备关机或重启</span></span><span><br/></span><span>        </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Stop execution of events</span></span><span><br/></span><span>        udevadm control --stop-exec-queue</span><span><br/></span><span>        killall udevd</span><span><br/></span><span>        ;;</span><span><br/></span><span>    *)</span><span><br/></span><span>        </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Usage: </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span> {start|stop}&quot;</span></span><span><br/></span><span>        </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1</span><span><br/></span><span>        ;;</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 0</span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>udevadm</span></code><span> 命令详解</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>上一篇有讲udev热插拔机制，没看到的同学可以看看，<a href=\\\"https://mp.weixin.qq.com/s?__biz=MzUyNDUyMDQyNQ==&amp;mid=2247486925&amp;idx=1&amp;sn=aa76f35f2d60040e577807d2d23e0bea&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">Linux驱动基础 | udev 热插拔机制</a></span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>udevadm trigger [options]  手动触发 udev 事件，通知内核重新处理设备或子系统。</span><span><br/></span><span>udevadm trigger --</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>type</span></span><span>=subsystems --action=add 手动触发 udev事件，类型是subsystems，动作是add</span><span><br/></span><span>udevadm trigger --</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>type</span></span><span>=devices --action=add</span><span><br/></span><span>手动触发 udev事件，类型是devices，动作是add</span><span><br/></span><span><br/></span><span>udevadm settle [options] 等待 udev 事件队列，如果所有事件全部处理完就退出。</span><span><br/></span><span>udevadm settle --timeout=30 || </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;udevadm settle failed&quot;</span></span><span>是一个 Shell 命令组合，|| 前是第一部分，||后是第二部分。第一部分的意思是等待当前正在处理的 udev 事件完成，最多等待 30 秒。如果 30 秒内所有事件处理完毕，命令返回 0（成功），就不会执行第二部分。 如果超时（30 秒后仍有未完成的事件），命令返回 非0（失败），就会执行第二部分输出</span><span><br/></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;udevadm settle failed&quot;</span></span><span><br/></span><span><br/></span><span>udevadm control [options] 用于 控制 udev 守护进程行为 的命令。主要用于修改 udev 的运行时参数、重新加载规则、启停事件队列等管理操作</span><span><br/></span><span><br/></span><span>udevadm control --stop-exec-queue 意思是关机时暂停 udev 事件处理队列</span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>file: S10linkmount</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#!/bin/sh</span></span><span><br/></span><span>bootmedium=emmc</span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>linkdev</span></span></span><span>(){</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ ! -d </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;/dev/block/by-name&quot;</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>mkdir -p /dev/block/by-name</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>cd</span></span><span> /dev/block/by-name</span><span><br/></span><span>ln -sf /dev/mmcblk0p1 env</span><span><br/></span><span>ln -sf /dev/mmcblk0p2 idblock</span><span><br/></span><span>ln -sf /dev/mmcblk0p3 uboot</span><span><br/></span><span>ln -sf /dev/mmcblk0p4 boot</span><span><br/></span><span>ln -sf /dev/mmcblk0p5 rootfs</span><span><br/></span><span>ln -sf /dev/mmcblk0p6 oem</span><span><br/></span><span>ln -sf /dev/mmcblk0p7 userdata</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span> }</span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>mount_part</span></span></span><span>(){</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ -z </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span>&quot;</span></span><span> -o -z </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$2</span></span><span>&quot;</span></span><span> -o -z </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$3</span></span><span>&quot;</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Invalid paramter, exit !!!&quot;</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>root_dev=$(mountpoint -n /)</span><span><br/></span><span>root_dev=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${root_dev%% *}</span></span><span><br/></span><span>partname=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span><br/></span><span>part_dev=/dev/block/by-name/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span><br/></span><span>mountpt=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$2</span></span><span><br/></span><span>part_fstype=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$3</span></span><span><br/></span><span>part_realdev=$(realpath </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span>)</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ ! -d </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span>&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;IGNORE&quot;</span></span><span> -a </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;emmc&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$bootmedium</span></span><span>&quot;</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$root_dev</span></span><span>&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span>&quot;</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   resize2fs </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>return</span></span><span> 0;</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${0}</span></span><span> info: mount point path [</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span>] not found, skip...&quot;</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>return</span></span><span> 1;</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span> -h </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span>; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$bootmedium</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span> emmc)</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$root_dev</span></span><span>&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span>&quot;</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   resize2fs </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>   e2fsck -y </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span><br/></span><span>   mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ $? -eq 0 ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>    resize2fs </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span><br/></span><span>    tune2fs </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span> -L </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;mount </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span> error, try to format...&quot;</span></span><span><br/></span><span>    mke2fs -F -L </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span>  &amp;&amp;      tune2fs -c 0 -i 0 </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span> &amp;&amp;      mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>  ;;</span><span><br/></span><span> spi_nand|slc_nand)</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;rootfs&quot;</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;rootfs mount on </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$root_dev</span></span><span>&quot;</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>elif</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span>&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;ubifs&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   part_no=$(</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span> | grep -oE </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;[0-9]*$&quot;</span></span><span>)</span><span><br/></span><span>   ubi_dev=/dev/ubi</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${part_no}</span></span><span><br/></span><span>   ubi_vol=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${ubi_dev}</span></span><span>_0</span><span><br/></span><span>   mount | grep </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_vol</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ $? -eq 0 ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span> has been mounted***********&quot;</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>    </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ ! -e </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_vol</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>     </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_vol</span></span><span> not exist***********&quot;</span></span><span><br/></span><span>     </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ ! -e </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_dev</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>      </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_dev</span></span><span> not exist***********&quot;</span></span><span><br/></span><span>      ubiattach /dev/ubi_ctrl -m </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_no</span></span><span> -d </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_no</span></span><span><br/></span><span>      </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ $? -ne 0 ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>       </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;ubiattach </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span> error, try to format...&quot;</span></span><span><br/></span><span>       ubiformat -y </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span><br/></span><span>       ubiattach /dev/ubi_ctrl -m </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_no</span></span><span> -d </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_no</span></span><span><br/></span><span>      </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>     </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>     ubi_info_dir=/sys/class/ubi/ubi</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${part_no}</span></span><span><br/></span><span>     avail_eraseblocks=$(cat </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_info_dir</span></span><span>/avail_eraseblocks)</span><span><br/></span><span>     eraseblock_size=$(cat </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_info_dir</span></span><span>/eraseblock_size)</span><span><br/></span><span>     </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;try to make volume: </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_vol</span></span><span> ...&quot;</span></span><span><br/></span><span>     ubimkvol </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_dev</span></span><span> -N </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span> -s $((avail_eraseblocks*eraseblock_size))</span><span><br/></span><span>    </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>    mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_vol</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>elif</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span>&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;squashfs&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   part_no=$(</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span> | grep -oE </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;[0-9]*$&quot;</span></span><span>)</span><span><br/></span><span>   ubi_dev=/dev/ubi</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${part_no}</span></span><span><br/></span><span>   ubi_vol=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${ubi_dev}</span></span><span>_0</span><span><br/></span><span>   ubi_block=/dev/ubiblock</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${part_no}</span></span><span>_0</span><span><br/></span><span>   mount | grep </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_block</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ $? -eq 0 ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span> has been mounted***********&quot;</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>    </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ ! -e </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_block</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>     </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_block</span></span><span> not exist***********&quot;</span></span><span><br/></span><span>     ubiattach /dev/ubi_ctrl -m </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_no</span></span><span> -d </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_no</span></span><span><br/></span><span>     </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ $? -ne 0 ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>      </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;ubiattach </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span> error, return !!!&quot;</span></span><span><br/></span><span>      </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Please check the device: </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span>&quot;</span></span><span><br/></span><span>      </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>return</span></span><span> 1</span><span><br/></span><span>     </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>     ubiblock -c </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_vol</span></span><span><br/></span><span>    </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>    mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_block</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>elif</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span>&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;erofs&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   part_no=$(</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span> | grep -oE </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;[0-9]*$&quot;</span></span><span>)</span><span><br/></span><span>   ubi_dev=/dev/ubi</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${part_no}</span></span><span><br/></span><span>   ubi_vol=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${ubi_dev}</span></span><span>_0</span><span><br/></span><span>   ubi_block=/dev/ubiblock</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${part_no}</span></span><span>_0</span><span><br/></span><span>   mount | grep </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_block</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ $? -eq 0 ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span> has been mounted***********&quot;</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>    </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ ! -e </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_block</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>     </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_block</span></span><span> not exist***********&quot;</span></span><span><br/></span><span>     ubiattach /dev/ubi_ctrl -m </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_no</span></span><span> -d </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_no</span></span><span><br/></span><span>     </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ $? -ne 0 ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>      </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;ubiattach </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span> error, return !!!&quot;</span></span><span><br/></span><span>      </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Please check the device: </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span>&quot;</span></span><span><br/></span><span>      </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>return</span></span><span> 1</span><span><br/></span><span>     </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>     ubiblock -c </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_vol</span></span><span><br/></span><span>    </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>    mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ubi_block</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>   </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Error: wrong filesystem type: </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span>, return !!!&quot;</span></span><span><br/></span><span>   </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>return</span></span><span> 1</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>  ;;</span><span><br/></span><span> spi_nor)</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$root_dev</span></span><span>&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_realdev</span></span><span>&quot;</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span> has been mounted, skipping***********&quot;</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>   </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span> </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span> </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span>&quot;</span></span><span><br/></span><span>   mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ $? -eq 0 ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;***********succeed in mounting***********&quot;</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>elif</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span>&quot;</span></span><span> = </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;jffs2&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;mount </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span> error, try to format...&quot;</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;flash_erase -j </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${part_realdev/block/}</span></span><span> 0 0 &amp;&amp; mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span> </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span> </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span>&quot;</span></span><span><br/></span><span>    flash_erase -j </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${part_realdev/block/}</span></span><span> 0 0 &amp;&amp; mount -t </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_fstype</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$part_dev</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$mountpt</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;mount </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$partname</span></span><span> error, skipping! Please check the filesystem.&quot;</span></span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>  ;;</span><span><br/></span><span> *)</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Invalid Parameter: Check bootmedium !!!&quot;</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1</span><span><br/></span><span>  ;;</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>}</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span> start) linkdev;</span><span><br/></span><span>mount_part rootfs IGNORE ext4 ; </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#IGNORE表示不挂载</span></span><span><br/></span><span>mount_part userdata /userdata ext4 ;</span><span><br/></span><span>mount_part oem /oem ext4 ;</span><span><br/></span><span>;; linkdev) linkdev ;</span><span><br/></span><span>;; stop) </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;stop </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span> finished&quot;</span></span><span> ;; *) </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Usage: </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span> {start|stop}&quot;</span></span><span>; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1 ;; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>这个脚本是一个 Linux 启动/挂载分区管理脚本，主要用于在嵌入式系统（如 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>Android </span></code><span>或 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>Linux</span></code><span> 嵌入式设备）中处理存储设备（ </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>eMMC</span></code><span>、</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>NAND</span></code><span>、</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>NOR</span></code><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>Flash</span></code><span> 等）的分区挂载和文件系统管理。</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>会去执行 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>start</span></code><span> 参数处理以下事情</span></p><ol style=\\\"margin:0;list-style-type:decimal;margin-top:8px;margin-bottom:8px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:25px;padding-right:0;color:rgb(0,0,0)\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><span>调用 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>linkdev</span></code><span> 创建分区符号链接。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><span>挂载关键分区 : </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>rootfs</span></code><span>(仅扩容), </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>userdata</span></code><span>, </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>oem</span></code></div></li></ol><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>会去执行 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>stop</span></code><span> 仅打印信息</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>file: S20urandom</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span> </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span>&quot;</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>         start|</span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;&quot;</span></span><span>)</span><span><br/></span><span>         </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># check for read only file system</span></span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> ! touch /etc/random-seed 2&gt;/dev/null</span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>                         </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;read-only file system detected...done&quot;</span></span><span><br/></span><span>                         </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$VERBOSE</span></span><span>&quot;</span></span><span> != no ]</span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>                         </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>printf</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Initializing random number generator... &quot;</span></span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>                 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Load and then save 512 bytes,</span></span><span><br/></span><span>                 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># which is the size of the entropy pool</span></span><span><br/></span><span>                 cat /etc/random-seed &gt;/dev/urandom</span><span><br/></span><span>                 rm -f /etc/random-seed</span><span><br/></span><span>                 </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>umask</span></span><span> 077 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#设置权限只能自己读写访问</span></span><span><br/></span><span>                 dd </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span>=/dev/urandom of=/etc/random-seed count=1 \\\\</span><span><br/></span><span>                         &gt;/dev/null 2&gt;&amp;1 || </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;urandom start: failed.&quot;</span></span><span><br/></span><span>                 </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>umask</span></span><span> 022 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#设置权限可以让其他人读写访问</span></span><span><br/></span><span>                 [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$VERBOSE</span></span><span>&quot;</span></span><span> != no ] &amp;&amp; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;done.&quot;</span></span><span><br/></span><span>                 ;;</span><span><br/></span><span>         stop)</span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> ! touch /etc/random-seed 2&gt;/dev/null</span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>                         </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span><br/></span><span>                 </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>                 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Carry a random seed from shut-down to start-up;</span></span><span><br/></span><span>                 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># see documentation in linux/drivers/char/random.c</span></span><span><br/></span><span>                 [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$VERBOSE</span></span><span>&quot;</span></span><span> != no ] &amp;&amp; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>printf</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Saving random seed... &quot;</span></span><span><br/></span><span>                 </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>umask</span></span><span> 077  </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#设置权限只能自己读写访问</span></span><span><br/></span><span>                 dd </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span>=/dev/urandom of=/etc/random-seed count=1 \\\\</span><span><br/></span><span>                         &gt;/dev/null 2&gt;&amp;1 || </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;urandom stop: failed.&quot;</span></span><span><br/></span><span>                 [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$VERBOSE</span></span><span>&quot;</span></span><span> != no ] &amp;&amp; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;done.&quot;</span></span><span><br/></span><span>                 ;;</span><span><br/></span><span>         *)</span><span><br/></span><span>                 </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Usage: urandom {start|stop}&quot;</span></span><span> &gt;&amp;2</span><span><br/></span><span>                 </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1</span><span><br/></span><span>                 ;;</span><span><br/></span><span>      </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>这个脚本是用于初始化和管理Linux系统的随机数种子，通常在系统启动（ </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>start</span></code><span> ）和关闭（ </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>stop</span></code><span> ）时执行。它的核心功能是保存和加载随机数种子，以增强系统的随机数生成质量</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>start</span></code><span> 会去处理</span></p><ol style=\\\"margin:0;list-style-type:decimal;margin-top:8px;margin-bottom:8px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:25px;padding-right:0;color:rgb(0,0,0)\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><span>检查文件系统是否可读</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><span>读取旧的随机种子文件</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>dd</span></code><span> 生成新得随机种子文件</span></div></li></ol><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>stop</span></code><span>会去处理</span></p><ol style=\\\"margin:0;list-style-type:decimal;margin-top:8px;margin-bottom:8px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:25px;padding-right:0;color:rgb(0,0,0)\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><span>系统关闭后，会将</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>/dev/urandom</span></code><span>保存到随机种子文件</span></div></li></ol><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>file: S21appinit</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#!/bin/sh</span></span><span><br/></span><span> [ -f /etc/profile.d/RkEnv.sh ] &amp;&amp; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>source</span></span><span> /etc/profile.d/RkEnv.sh</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>          start)</span><span><br/></span><span>                  sh /oem/usr/bin/RkLunch.sh</span><span><br/></span><span>                  ;;</span><span><br/></span><span>          stop)</span><span><br/></span><span>                 sh /oem/usr/bin/RkLunch-stop.sh</span><span><br/></span><span>                  ;;</span><span><br/></span><span>          *)</span><span><br/></span><span>                 </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1</span><span><br/></span><span>                  ;;</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>这个脚本主要是先判断 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>/etc/profile.d/RkEnv.sh</span></code><span>文件是否存在。存在的话就去判断第一个参数是 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>start</span></code><span> 还是 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>stop</span></code><span>。</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>start</span></code><span>就会去执行 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>sh /oem/usr/bin/RkLunch.sh</span></code><span> 运行启动脚本、初始化网络、加载摄像头驱动和参数，启动主应用程序</span></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>file:S50usbdevice</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>#!/bin/sh</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># setup configfs for adbd, usb mass storage and MTP....</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># For kernel v4.4 usb configfs</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Load default env variables from profiles</span></span><span><br/></span><span>. /etc/profile</span><span><br/></span><span><br/></span><span>UMS_EN=off</span><span><br/></span><span>ADB_EN=off</span><span><br/></span><span>MTP_EN=off</span><span><br/></span><span>NTB_EN=off</span><span><br/></span><span>ACM_EN=off</span><span><br/></span><span>UAC1_EN=off</span><span><br/></span><span>UAC2_EN=off</span><span><br/></span><span>UVC_EN=off</span><span><br/></span><span>RNDIS_EN=off</span><span><br/></span><span>HID_EN=off</span><span><br/></span><span><br/></span><span>USB_ATTRIBUTE=0x409</span><span><br/></span><span>USB_GROUP=rockchip</span><span><br/></span><span>USB_SKELETON=b.1</span><span><br/></span><span><br/></span><span>CONFIGFS_DIR=/sys/kernel/config</span><span><br/></span><span>USB_CONFIGFS_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${CONFIGFS_DIR}</span></span><span>/usb_gadget/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_GROUP}</span></span><span><br/></span><span>USB_STRINGS_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/strings/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_ATTRIBUTE}</span></span><span><br/></span><span>USB_FUNCTIONS_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>functions</span></span><span><br/></span><span>USB_CONFIGS_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/configs/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_SKELETON}</span></span><span><br/></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># For VBUS_ALWAYS_ON usb otg is not support ums</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Since the block to ums is always occupated by USB due to no disconneted state</span></span><span><br/></span><span>UMS_BLOCK=/userdata/ums_shared.img</span><span><br/></span><span>UMS_BLOCK_SIZE=0 </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#unit M</span></span><span><br/></span><span>UMS_BLOCK_TYPE=fat</span><span><br/></span><span>UMS_BLOCK_AUTO_MOUNT=off</span><span><br/></span><span>UMS_RO=0</span><span><br/></span><span><br/></span><span>UVC_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/uvc.gs6/</span><span><br/></span><span>UVC_STREAMING_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_DIR}</span></span><span>/streaming/</span><span><br/></span><span>UVC_CONTROL_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_DIR}</span></span><span>/control/</span><span><br/></span><span>UVC_U_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/uncompressed/u/</span><span><br/></span><span>UVC_M_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/mjpeg/m/</span><span><br/></span><span>UVC_F_DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/framebased/f/</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>test_write</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span> -e </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$2</span></span><span> &amp;&amp; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$2</span></span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>function_init</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/uac1.gs0</span><span><br/></span><span> test_write 1 </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/uac1.gs0/c_feature_unit</span><span><br/></span><span> test_write 1 </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/uac1.gs0/p_feature_unit</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/uac2.gs0</span><span><br/></span><span> test_write 1 </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/uac2.gs0/c_feature_unit</span><span><br/></span><span> test_write 1 </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/uac2.gs0/p_feature_unit</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/ffs.adb</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/ffs.ntb</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/mtp.gs0</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/rndis.gs0</span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#write /config/usb_gadget/g1/functions/rndis.gs0/wceis 1</span></span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/acm.gs6</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/mass_storage.0</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/uvc.gs6</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/hid.usb0</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>configfs_init</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Debug: configfs_init&quot;</span></span><span><br/></span><span> mkdir /dev/usb-ffs</span><span><br/></span><span><br/></span><span> mount -t configfs none </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${CONFIGFS_DIR}</span></span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span> -m 0770</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 0x2207 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/idVendor</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 0x0310 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/bcdDevice</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 0x0200 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/bcdUSB</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_STRINGS_DIR}</span></span><span>   -m 0770</span><span><br/></span><span> SERIAL=`cat /proc/cpuinfo | grep Serial | awk </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>'{print $3}'</span></span><span>`</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ -z </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$SERIAL</span></span><span> ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>  SERIAL=0123456789ABCDEF</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$SERIAL</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_STRINGS_DIR}</span></span><span>/serialnumber</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;rockchip&quot;</span></span><span>  &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_STRINGS_DIR}</span></span><span>/manufacturer</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;rk3xxx&quot;</span></span><span>  &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_STRINGS_DIR}</span></span><span>/product</span><span><br/></span><span><br/></span><span> function_init</span><span><br/></span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGS_DIR}</span></span><span>  -m 0770</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGS_DIR}</span></span><span>/strings/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_ATTRIBUTE}</span></span><span>  -m 0770</span><span><br/></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 0x1 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/os_desc/b_vendor_code</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;MSFT100&quot;</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/os_desc/qw_sign</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 500 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGS_DIR}</span></span><span>/MaxPower</span><span><br/></span><span> ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGS_DIR}</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/os_desc/b.1</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>make_config_string</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span> tmp=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$CONFIG_STRING</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ -n </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$CONFIG_STRING</span></span><span>&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>  CONFIG_STRING=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${tmp}</span></span><span>_</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${1}</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>  CONFIG_STRING=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>parse_parameter</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># find name and var</span></span><span><br/></span><span> NAME=`</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span> | awk -F </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;=&quot;</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>'{print $1}'</span></span><span>`</span><span><br/></span><span> VAR=`</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span> | awk -F </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;=&quot;</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>'{print $2}'</span></span><span>`</span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$NAME</span></span><span>&quot;</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>  ums_block)</span><span><br/></span><span>   UMS_BLOCK=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${VAR}</span></span><span><br/></span><span>   ;;</span><span><br/></span><span>  ums_block_size)</span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ ! </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$VAR</span></span><span>&quot;</span></span><span> -gt 0 ] 2&gt;/dev/null ;</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$VAR</span></span><span> is not a number&quot;</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1</span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>   UMS_BLOCK_SIZE=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${VAR}</span></span><span><br/></span><span>   ;;</span><span><br/></span><span>  ums_block_type)</span><span><br/></span><span>   UMS_BLOCK_TYPE=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${VAR}</span></span><span><br/></span><span>   ;;</span><span><br/></span><span>  ums_block_auto_mount)</span><span><br/></span><span>   UMS_BLOCK_AUTO_MOUNT=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${VAR}</span></span><span><br/></span><span>   ;;</span><span><br/></span><span>  ums_ro)</span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$VAR</span></span><span>&quot;</span></span><span> != </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;off&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>    </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Set UMS read-only&quot;</span></span><span><br/></span><span>    UMS_RO=1</span><span><br/></span><span>   </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>    UMS_RO=0</span><span><br/></span><span>   ;;</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>parameter_init</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>while</span></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>read</span></span><span> line</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>do</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$line</span></span><span>&quot;</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>   usb_mtp_en)</span><span><br/></span><span>    MTP_EN=on</span><span><br/></span><span>    make_config_string mtp</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_adb_en)</span><span><br/></span><span>    ADB_EN=on</span><span><br/></span><span>    make_config_string adb</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_ums_en)</span><span><br/></span><span>    UMS_EN=on</span><span><br/></span><span>    make_config_string ums</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_ntb_en)</span><span><br/></span><span>    NTB_EN=on</span><span><br/></span><span>    make_config_string ntb</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_acm_en)</span><span><br/></span><span>    ACM_EN=on</span><span><br/></span><span>    make_config_string acm</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_uac1_en)</span><span><br/></span><span>    UAC1_EN=on</span><span><br/></span><span>    make_config_string uac1</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_uac2_en)</span><span><br/></span><span>    UAC2_EN=on</span><span><br/></span><span>    make_config_string uac2</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_uvc_en)</span><span><br/></span><span>    UVC_EN=on</span><span><br/></span><span>    make_config_string uvc</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_rndis_en)</span><span><br/></span><span>    RNDIS_EN=on</span><span><br/></span><span>    make_config_string rndis</span><span><br/></span><span>    ;;</span><span><br/></span><span>   usb_hid_en)</span><span><br/></span><span>    HID_EN=on</span><span><br/></span><span>    make_config_string hid</span><span><br/></span><span>    ;;</span><span><br/></span><span>   *)</span><span><br/></span><span>    parse_parameter </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${line}</span></span><span><br/></span><span>    ;;</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>done</span></span><span> &lt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$USB_CONFIG_FILE</span></span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$CONFIG_STRING</span></span><span>&quot;</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>  ums)</span><span><br/></span><span>   PID=0x0000</span><span><br/></span><span>   ;;</span><span><br/></span><span>  mtp)</span><span><br/></span><span>   PID=0x0001</span><span><br/></span><span>   ;;</span><span><br/></span><span>  adb)</span><span><br/></span><span>   PID=0x0006</span><span><br/></span><span>   ;;</span><span><br/></span><span>  mtp_adb | adb_mtp)</span><span><br/></span><span>   PID=0x0011</span><span><br/></span><span>   ;;</span><span><br/></span><span>  ums_adb | adb_ums)</span><span><br/></span><span>   PID=0x0018</span><span><br/></span><span>   ;;</span><span><br/></span><span>  acm)</span><span><br/></span><span>   PID=0x1005</span><span><br/></span><span>   ;;</span><span><br/></span><span>  *)</span><span><br/></span><span>   PID=0x0019</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>use_os_desc</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$MTP_EN</span></span><span> = on ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;MTP&quot;</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/mtp.gs0/os_desc/interface.MTP/compatible_id</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 1 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/os_desc/use</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>pre_run_binary</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ADB_EN</span></span><span> = on ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>  mkdir /dev/usb-ffs/adb -m 0770</span><span><br/></span><span>  mount -o uid=2000,gid=2000 -t functionfs adb /dev/usb-ffs/adb</span><span><br/></span><span>  start-stop-daemon --start --quiet --background --</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exec</span></span><span> /usr/bin/adbd</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$NTB_EN</span></span><span> = on ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>  mkdir /dev/usb-ffs/ntb -m 0770</span><span><br/></span><span>  mount -o uid=2000,gid=2000 -t functionfs ntb /dev/usb-ffs/ntb</span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Not start app here</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Add uvc app here with start-stop-daemon</span></span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>configure_uvc_resolution_yuyv</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span> W=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span><br/></span><span> H=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$2</span></span><span><br/></span><span> DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_U_DIR}</span></span><span>/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${H}</span></span><span>p/</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$W</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/wWidth</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$H</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/wHeight</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 333333 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwDefaultFrameInterval</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> $((W*H*20)) &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwMinBitRate</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> $((W*H*20)) &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwMaxBitRate</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> $((W*H*2)) &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwMaxVideoFrameBufferSize</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> -e </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;333333\\\\\n666666\\\\\n1000000\\\\\n2000000&quot;</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwFrameInterval</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>configure_uvc_resolution_mjpeg</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span> W=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span><br/></span><span> H=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$2</span></span><span><br/></span><span> DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_M_DIR}</span></span><span>/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${H}</span></span><span>p/</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$W</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/wWidth</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$H</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/wHeight</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 333333 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwDefaultFrameInterval</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> $((W*H*20)) &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwMinBitRate</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> $((W*H*20)) &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwMaxBitRate</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> $((W*H*2)) &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwMaxVideoFrameBufferSize</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> -e </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;333333\\\\\n666666\\\\\n1000000\\\\\n2000000&quot;</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwFrameInterval</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>configure_uvc_resolution_h264</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span> W=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span><br/></span><span> H=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$2</span></span><span><br/></span><span> DIR=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_F_DIR}</span></span><span>/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${H}</span></span><span>p/</span><span><br/></span><span> mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$W</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/wWidth</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$H</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/wHeight</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 333333 &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwDefaultFrameInterval</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> $((W*H*10)) &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwMinBitRate</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> $((W*H*10)) &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwMaxBitRate</span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#echo $((W*H*2)) &gt; ${DIR}/dwMaxVideoFrameBufferSize</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> -e </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;333333\\\\\n666666\\\\\n1000000\\\\\n2000000&quot;</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${DIR}</span></span><span>/dwFrameInterval</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>syslink_function</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span> ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGS_DIR}</span></span><span>/f</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_CNT}</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>let</span></span><span> USB_FUNCTIONS_CNT=USB_FUNCTIONS_CNT+1</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>bind_functions</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span> USB_FUNCTIONS_CNT=1</span><span><br/></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UAC1_EN</span></span><span> = on &amp;&amp; syslink_function uac1.gs0</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UAC2_EN</span></span><span> = on &amp;&amp; syslink_function uac2.gs0</span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UVC_EN</span></span><span> = on ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#echo 3072 &gt; ${UVC_DIR}/streaming_maxpacket</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#echo 1 &gt; ${UVC_DIR}/streaming_bulk</span></span><span><br/></span><span><br/></span><span>  mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_CONTROL_DIR}</span></span><span>/header/h</span><span><br/></span><span>  ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_CONTROL_DIR}</span></span><span>/header/h </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_CONTROL_DIR}</span></span><span>/class/fs/h</span><span><br/></span><span>  ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_CONTROL_DIR}</span></span><span>/header/h </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_CONTROL_DIR}</span></span><span>/class/ss/h</span><span><br/></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>##YUYV support config</span></span><span><br/></span><span>  mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_U_DIR}</span></span><span><br/></span><span>  configure_uvc_resolution_yuyv 640 480</span><span><br/></span><span>  configure_uvc_resolution_yuyv 1280 720</span><span><br/></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>##mjpeg support config</span></span><span><br/></span><span>  mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_M_DIR}</span></span><span><br/></span><span>  configure_uvc_resolution_mjpeg 640 480</span><span><br/></span><span>  configure_uvc_resolution_mjpeg 1280 720</span><span><br/></span><span>  configure_uvc_resolution_mjpeg 1920 1080</span><span><br/></span><span>  configure_uvc_resolution_mjpeg 2560 1440</span><span><br/></span><span>  configure_uvc_resolution_mjpeg 2592 1944</span><span><br/></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>## h.264 support config</span></span><span><br/></span><span>  mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_F_DIR}</span></span><span><br/></span><span>  configure_uvc_resolution_h264 640 480</span><span><br/></span><span>  configure_uvc_resolution_h264 1280 720</span><span><br/></span><span>  configure_uvc_resolution_h264 1920 1080</span><span><br/></span><span><br/></span><span>  mkdir </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/header/h</span><span><br/></span><span>  ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_U_DIR}</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/header/h/u</span><span><br/></span><span>  ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_M_DIR}</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/header/h/m</span><span><br/></span><span>  ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_F_DIR}</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/header/h/f</span><span><br/></span><span>  ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/header/h </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/class/fs/h</span><span><br/></span><span>  ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/header/h </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/class/hs/h</span><span><br/></span><span>  ln -s </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/header/h </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UVC_STREAMING_DIR}</span></span><span>/class/ss/h</span><span><br/></span><span><br/></span><span>  syslink_function uvc.gs6</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$MTP_EN</span></span><span> = on &amp;&amp; syslink_function mtp.gs0</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$NTB_EN</span></span><span> = on &amp;&amp; syslink_function ffs.ntb</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ADB_EN</span></span><span> = on &amp;&amp; syslink_function ffs.adb</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$ACM_EN</span></span><span> = on &amp;&amp; syslink_function acm.gs6</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$RNDIS_EN</span></span><span> = on &amp;&amp; syslink_function rndis.gs0</span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$HID_EN</span></span><span> = on ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 1 &gt; /sys/kernel/config/usb_gadget/rockchip/</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>functions</span></span><span>/hid.usb0/protocol</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 1 &gt; /sys/kernel/config/usb_gadget/rockchip/</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>functions</span></span><span>/hid.usb0/subclass</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> 8 &gt; /sys/kernel/config/usb_gadget/rockchip/</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>functions</span></span><span>/hid.usb0/report_length</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span> -ne \\\\\\\\x05\\\\\\\\x01\\\\\\\\x09\\\\\\\\x06\\\\\\\\xa1\\\\\\\\x01\\\\\\\\x05\\\\\\\\x07\\\\\\\\x19\\\\\\\\xe0\\\\\\\\x29\\\\\\\\xe7\\\\\\\\x15\\\\\\\\x00\\\\\\\\x25\\\\\\\\x01\\\\\\\\x75\\\\\\\\x01\\\\\\\\x95\\\\\\\\x08\\\\\\\\x81\\\\\\\\x02\\\\\\\\x95\\\\\\\\x01\\\\\\\\x75\\\\\\\\x08\\\\\\\\x81\\\\\\\\x03\\\\\\\\x95\\\\\\\\x05\\\\\\\\x75\\\\\\\\x01\\\\\\\\x05\\\\\\\\x08\\\\\\\\x19\\\\\\\\x01\\\\\\\\x29\\\\\\\\x05\\\\\\\\x91\\\\\\\\x02\\\\\\\\x95\\\\\\\\x01\\\\\\\\x75\\\\\\\\x03\\\\\\\\x91\\\\\\\\x03\\\\\\\\x95\\\\\\\\x06\\\\\\\\x75\\\\\\\\x08\\\\\\\\x15\\\\\\\\x00\\\\\\\\x25\\\\\\\\x65\\\\\\\\x05\\\\\\\\x07\\\\\\\\x19\\\\\\\\x00\\\\\\\\x29\\\\\\\\x65\\\\\\\\x81\\\\\\\\x00\\\\\\\\xc0 &gt; /sys/kernel/config/usb_gadget/rockchip/</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>functions</span></span><span>/hid.usb0/report_desc</span><span><br/></span><span>  syslink_function hid.usb0</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UMS_EN</span></span><span> = on ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_RO}</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/mass_storage.0/lun.0/ro</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UMS_BLOCK_SIZE</span></span><span>&quot;</span></span><span> != </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;0&quot;</span></span><span> -a ! -e </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK}</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   dd </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span>=/dev/zero of=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK}</span></span><span> bs=1M count=</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK_SIZE}</span></span><span><br/></span><span>   mkfs.</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK_TYPE}</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK}</span></span><span><br/></span><span>   </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span> $? &amp;&amp; </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Warning: failed to mkfs.</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK_TYPE}</span></span><span> </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK}</span></span><span>&quot;</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>  mkdir /mnt/ums -p</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UMS_BLOCK_AUTO_MOUNT</span></span><span> = on ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>   mount </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK}</span></span><span> /mnt/ums</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>else</span></span><span><br/></span><span>   </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${UMS_BLOCK}</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_FUNCTIONS_DIR}</span></span><span>/mass_storage.0/lun.0/file</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>  syslink_function mass_storage.0</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${CONFIG_STRING}</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGS_DIR}</span></span><span>/strings/</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_ATTRIBUTE}</span></span><span>/configuration</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>run_binary</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$MTP_EN</span></span><span> = on ];</span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>  start-stop-daemon --start --quiet --background --</span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exec</span></span><span> /usr/bin/mtp-server</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>program_kill</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span> P_PID=`ps | grep </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span> | grep -v grep | awk </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>'{print $1}'</span></span><span>`</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span> -z </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${P_PID}</span></span><span> || </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>kill</span></span><span> -9 </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${P_PID}</span></span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"line-height: 26px;\\\"><span style=\\\"color: #61aeee;line-height: 26px;\\\"><span>usb_device_stop</span></span></span><span>()</span><span><br/></span><span>{</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;none&quot;</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/UDC</span><span><br/></span><span> program_kill adbd</span><span><br/></span><span> program_kill mtp-server</span><span><br/></span><span> ls </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGS_DIR}</span></span><span> | grep f[0-9] | xargs -I {} rm </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGS_DIR}</span></span><span>/{}</span><span><br/></span><span>}</span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span>&quot;</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>start)</span><span><br/></span><span> ifconfig lo up</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ ! -e </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;/tmp/.usb_config&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span>: Cannot find .usb_config&quot;</span></span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># exit 0</span></span><span><br/></span><span>  USB_CONFIG_FILE=/tmp/.usb_config</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;usb_adb_en&quot;</span></span><span> &gt;&gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$USB_CONFIG_FILE</span></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ -e /tmp/.usb_config ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>  USB_CONFIG_FILE=/tmp/.usb_config</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span> parameter_init</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ -z </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$CONFIG_STRING</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span>: no function be selected&quot;</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 0</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>test</span></span><span> -d </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span> || configfs_init</span><span><br/></span><span> use_os_desc</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$PID</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/idProduct</span><span><br/></span><span> bind_functions</span><span><br/></span><span> pre_run_binary</span><span><br/></span><span> sleep 1</span><span><br/></span><span> UDC=`ls /sys/class/udc/| awk </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>'{print $1}'</span></span><span>`</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$UDC</span></span><span> &gt; </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>${USB_CONFIGFS_DIR}</span></span><span>/UDC</span><span><br/></span><span> run_binary</span><span><br/></span><span> ;;</span><span><br/></span><span>stop)</span><span><br/></span><span> usb_device_stop</span><span><br/></span><span> ;;</span><span><br/></span><span>restart|reload)</span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Do restart usb by udev</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;USB_FORCE_CHANGED&quot;</span></span><span> &gt;&gt; /tmp/.usb_config</span><span><br/></span><span> usb_device_stop</span><span><br/></span><span> sleep 1</span><span><br/></span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span> start</span><span><br/></span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span># Don't forget to clear &quot;USB_FORCE_CHANGED&quot;</span></span><span><br/></span><span> sed -i </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;/USB_FORCE_CHANGED/d&quot;</span></span><span> /tmp/.usb_config</span><span><br/></span><span> ;;</span><span><br/></span><span>*)</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Usage: </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span> {start|stop|restart}&quot;</span></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 0</span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>这个脚本是一个用于配置和管理 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>USB</span></code><span> 设备功能的。主要功能如下：</span></p><ol style=\\\"margin:0;list-style-type:decimal;margin-top:8px;margin-bottom:8px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:25px;padding-right:0;color:rgb(0,0,0)\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>初始化 </span><code style=\\\"height: auto;color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>USB</span></code><span> 配置：设置 </span><code style=\\\"height: auto;color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>USB</span></code><span> 设备的厂商 </span><code style=\\\"height: auto;color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>ID</span></code><span>、产品 </span><code style=\\\"height: auto;color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>ID</span></code><span>、序列号等信息。</span></p></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>支持多种 </span><code style=\\\"height: auto;color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>USB</span></code><span> 功能模式：</span></p></div></li></ol><ul style=\\\"margin:0;list-style-type:disc;margin-top:8px;margin-bottom:8px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:25px;padding-right:0;color:rgb(0,0,0)\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>ADB</span></strong><span>（Android Debug Bridge）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>UMS</span></strong><span>（USB Mass Storage，大容量存储）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>MTP</span></strong><span>（Media Transfer Protocol，媒体传输协议）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>NTB</span></strong><span>（Network Transport Block，网络传输块）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>ACM</span></strong><span>（Abstract Control Model，串行通信）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>UAC1/UAC2</span></strong><span>（USB Audio Class，音频设备）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>UVC</span></strong><span>（USB Video Class，视频设备）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>RNDIS</span></strong><span>（Remote Network Driver Interface Specification，网络设备）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><strong style=\\\"color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;\\\"><span>HID</span></strong><span>（Human Interface Device，人机接口设备）</span></div></li></ul><ol style=\\\"margin:0;list-style-type:decimal;margin-top:8px;margin-bottom:8px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:25px;padding-right:0;color:rgb(0,0,0)\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><span>动态配置：通过读取配置文件（/tmp/.usb_config）来决定启用哪些功能。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;\\\"><span>管理功能：可以启动、停止或重启 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>USB</span></code><span> 设备功能。</span></div></li></ol><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>stop</span></code><span>就会去执行</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>sh /oem/usr/bin/RkLunch-stop.sh</span></code></p><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>file: S99_auto_reboot</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span> </span><span style=\\\"color: #5c6370;font-style: italic;line-height: 26px;\\\"><span>#!/bin/sh</span></span><span><br/></span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>case</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;</span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$1</span></span><span>&quot;</span></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>in</span></span><span><br/></span><span>          start)</span><span><br/></span><span>                  </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ -e </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;/oem/rockchip_test/auto_reboot.sh&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>                          </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;start recovery auto-reboot&quot;</span></span><span><br/></span><span>                          mkdir -p /data/cfg/rockchip_test</span><span><br/></span><span>                          cp /oem/rockchip_test/auto_reboot.sh /data/cfg/rockchip_test/</span><span><br/></span><span>                  </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span>                  </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ -e </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;/data/cfg/rockchip_test/power_lost_test.sh&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>                          </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;start test flash power lost&quot;</span></span><span><br/></span><span>                          </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>source</span></span><span> /data/cfg/rockchip_test/power_lost_test.sh &amp;</span><span><br/></span><span>                  </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span>                  </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>if</span></span><span> [ -e </span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;/data/cfg/rockchip_test/auto_reboot.sh&quot;</span></span><span> ]; </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>then</span></span><span><br/></span><span>                          </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;start auto-reboot&quot;</span></span><span><br/></span><span>                          </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>source</span></span><span> /data/cfg/rockchip_test/auto_reboot.sh `cat /data/cfg/rockchip_test/reboot_total_cnt`&amp;</span><span><br/></span><span>                  </span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>fi</span></span><span><br/></span><span><br/></span><span>                  ;;</span><span><br/></span><span>          stop)</span><span><br/></span><span>                  </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;stop auto-reboot finished&quot;</span></span><span><br/></span><span>                  ;;</span><span><br/></span><span>          restart|reload)</span><span><br/></span><span>                  </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span> stop</span><span><br/></span><span>                  </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span> start</span><span><br/></span><span>                  ;;</span><span><br/></span><span>          *)</span><span><br/></span><span>                  </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>echo</span></span><span style=\\\"color: #98c379;line-height: 26px;\\\"><span>&quot;Usage: </span><span style=\\\"color: #d19a66;line-height: 26px;\\\"><span>$0</span></span><span> {start|stop|restart}&quot;</span></span><span><br/></span><span>                  </span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 1</span><span><br/></span><span style=\\\"color: #c678dd;line-height: 26px;\\\"><span>esac</span></span><span><br/></span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>exit</span></span><span> 0</span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>这个脚本如果传入</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>start</span></code><span>参数的话，主要做下面事情</span></p><pre style=\\\"border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;\\\"><span style=\\\"display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_svg/HhRfwkaJkMsQ71GiasL2SiaUR4fmD8Ohdiaab5GauIaymeok09ia3giaEiawfEuZqcHnI2FPTVSEHTtfeC8q3xicwbmKLEwuZ4MXl37/640?wx_fmt=svg&amp;from=appmsg&quot;);\\\"></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>cp /oem/rockchip_test/auto_reboot.sh /data/cfg/rockchip_test/`</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>source</span></span><span> /data/cfg/rockchip_test/power_lost_test.sh &amp;</span><span><br/></span><span style=\\\"color: #e6c07b;line-height: 26px;\\\"><span>source</span></span><span> /data/cfg/rockchip_test/auto_reboot.sh `cat /data/cfg/rockchip_test/reboot_total_cnt`&amp;</span><span><br/></span></div></pre><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>这个脚本如果传入</span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>stop</span></code><span>参数的话，仅打印信息</span></p><h2 style=\\\"margin:0;border-bottom-color:rgb(239,112,96);margin-top:30px;margin-bottom:15px;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;padding-left:0;padding-right:0;align-items:unset;background-attachment:scroll;background-clip:border-box;background-color:unset;background-image:none;background-origin:padding-box;background-position-x:0;background-position-y:0;background-repeat:no-repeat;background-size:auto;border-top-style:none;border-bottom-style:solid;border-left-style:none;border-right-style:none;border-top-width:1px;border-bottom-width:2px;border-left-width:1px;border-right-width:1px;border-top-color:rgb(0,0,0);border-left-color:rgb(0,0,0);border-right-color:rgb(0,0,0);border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:none;display:flex;flex-direction:unset;float:unset;height:auto;justify-content:unset;line-height:1.1em;overflow-x:unset;overflow-y:unset;text-align:left;text-shadow:none;transform:none;width:auto;-webkit-box-reflect:unset\\\"><span style=\\\"font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"><span>最后</span></span><span style=\\\"border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;\\\"></span></h2><p style=\\\"margin:0;color:rgb(0,0,0);font-size:16px;line-height:1.8em;letter-spacing:0;text-align:left;text-indent:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;padding-top:8px;padding-bottom:8px;padding-left:0;padding-right:0\\\"><span>本文学习到了 </span><code style=\\\"color: rgb(239, 112, 96);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-top: 2px;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;\\\"><span>/etc/init.d/</span></code><span> 目录下的所有启动文件。如果有疑问的话可以在评论区留言，对本篇文章学废的同学，可以一键三连！欢迎关注公众号[Linux随笔录]，不定期分享Linux 小知识</span></p></div><div><span><br/></span></div><p style=\\\"margin:0\\\"><span><br/></span></p><div style=\\\"margin-bottom: 0px;outline: 0px;text-wrap: wrap;background-color: rgb(255, 255, 255);color: rgba(0, 0, 0, 0.8);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 15px;text-align: center;letter-spacing: 1.5px;\\\"><span style=\\\"outline: 0px;color: rgb(127, 127, 127);font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;word-spacing: 2px;font-size: 14px;__visibility: visible;\\\"><span><br/></span></span></div><div style=\\\"margin-bottom: 0px;outline: 0px;text-wrap: wrap;background-color: rgb(255, 255, 255);color: rgba(0, 0, 0, 0.8);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 15px;text-align: center;letter-spacing: 1.5px;\\\"><span style=\\\"outline: 0px;color: rgb(127, 127, 127);font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;word-spacing: 2px;font-size: 14px;__visibility: visible;\\\"><span><br/></span></span></div><div style=\\\"margin-bottom: 0px;outline: 0px;text-wrap: wrap;\\\"><div style=\\\"outline: 0px;border-width: 0px;border-style: none;border-color: initial;\\\"><div style=\\\"outline: 0px;text-align: center;height: 50px;\\\"><div style=\\\"margin-right: auto;margin-left: auto;outline: 0px;width: 48px;height: 48px;color: rgb(255, 255, 255);font-size: 16px;line-height: 48px;display: inline-block;background-image: url(&quot;https://mmbiz.qpic.cn/mmbiz_gif/kiaqiahsnxHd4Zt4378tqib1DnnfKYvZAI7sUNZCYmGN2HCMDFDYV5hLu6HrHIK5BynAAwgHGiafFFU7ibYez6mXL4w/640?wx_fmt=gif&quot;);background-repeat: no-repeat;background-size: 100%;background-position: 0px center;\\\"><p style=\\\"margin:0;outline:0;font-weight:bold\\\"><span style=\\\"outline: 0px;font-size: 14px;\\\"><span>end</span></span></p></div><div style=\\\"margin-top: -26px;outline: 0px;height: 2px;background-color: rgb(34, 33, 33);\\\"><span><br/></span></div></div></div></div><div style=\\\"margin-bottom: 0px;outline: 0px;text-wrap: wrap;\\\"><div><span><span></span></span></div><div style=\\\"outline: 0px;\\\"><span><br/></span></div></div><div style=\\\"margin-bottom: 0px;outline: 0px;width: 578px;display: flex;justify-content: center;align-items: center;\\\"><div style=\\\"padding: 13px 12px 8px;outline: 0px;width: 578px;background: rgb(255, 255, 255);border-radius: 3px;border-width: 1px;border-style: solid;border-color: rgb(232, 232, 235);\\\"><div style=\\\"padding-top: 7px;padding-bottom: 7px;outline: 0px;width: 552.667px;background: rgb(255, 248, 244);box-shadow: rgba(0, 0, 0, 0.17) 0px 0px 6px 0px;\\\"><div style=\\\"margin-bottom: 4px;outline: 0px;width: 552.667px;text-align: center;font-size: 14px;color: rgb(87, 46, 15);line-height: 20px;\\\"><p style=\\\"margin:0;outline:0\\\"><span>往期推荐</span></p></div><div style=\\\"margin-bottom: 1px;outline: 0px;width: 552.667px;height: 2px;background: rgb(224, 198, 178);\\\"><span><br/></span></div><div style=\\\"margin-bottom: 5px;outline: 0px;width: 552.667px;height: 1px;background: rgb(224, 198, 178);\\\"><span><br/></span></div><div style=\\\"outline: 0px;\\\"><div style=\\\"padding: 6px 18px;outline: 0px;color: rgb(87, 46, 15);cursor: pointer;width: 552.667px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(224, 198, 178);font-size: 13px;line-height: 18px;\\\"><p style=\\\"margin:0;outline:0;overflow:hidden;text-overflow:ellipsis\\\"><span><a href=\\\"http://mp.weixin.qq.com/s?__biz=MzUyNDUyMDQyNQ==&amp;mid=2247484392&amp;idx=1&amp;sn=4cf2255b0695f7ce9aa6af5e440f306a&amp;chksm=fa2d5d6ecd5ad478e244b9e5d876ec7e0ebd55009b58a0f4d747a0ba9ddf0f996b84179de0bd&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">学习嵌入式推荐的必读书籍</a></span></p></div></div><div style=\\\"outline: 0px;\\\"><div style=\\\"padding: 6px 18px;outline: 0px;color: rgb(87, 46, 15);cursor: pointer;width: 552.667px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(224, 198, 178);font-size: 13px;line-height: 18px;\\\"><p style=\\\"margin:0;outline:0;overflow:hidden;text-overflow:ellipsis\\\"><span><a href=\\\"http://mp.weixin.qq.com/s?__biz=MzUyNDUyMDQyNQ==&amp;mid=2247484333&amp;idx=1&amp;sn=602fc4ba8917f1e48673114fcdb0043a&amp;chksm=fa2d5d2bcd5ad43d50e2a45bb4142e137055d7dd09977749f441139e750050064a35b9d13a07&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">我的Linux驱动学习路线</a></span></p></div></div><div style=\\\"outline: 0px;\\\"><div style=\\\"padding: 6px 18px;outline: 0px;color: rgb(87, 46, 15);cursor: pointer;width: 552.667px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(224, 198, 178);font-size: 13px;line-height: 18px;\\\"><p style=\\\"margin:0;outline:0;overflow:hidden;text-overflow:ellipsis\\\"><span><a href=\\\"http://mp.weixin.qq.com/s?__biz=MzUyNDUyMDQyNQ==&amp;mid=2247484552&amp;idx=1&amp;sn=ce585b5de904026a0672af69e08a964f&amp;chksm=fa2d5a0ecd5ad3180eed8b701719104467f9611e7bc05b51b6a07a2c6c80a6c55e31e14e03ba&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">1V1付费咨询</a></span></p></div></div><div style=\\\"outline: 0px;\\\"><div style=\\\"padding: 6px 18px;outline: 0px;color: rgb(87, 46, 15);cursor: pointer;width: 552.667px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(224, 198, 178);font-size: 13px;line-height: 18px;\\\"><p style=\\\"margin:0;outline:0;overflow:hidden;text-overflow:ellipsis\\\"><span><a href=\\\"http://mp.weixin.qq.com/s?__biz=MzUyNDUyMDQyNQ==&amp;mid=2247484387&amp;idx=1&amp;sn=52aa836b74c257e4abc810032dffcdee&amp;chksm=fa2d5d65cd5ad47319dadfd5b2453e57be7706071954411c8e7c3cd01f60d844d8ebf09e4d2d&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">单片机、嵌入式大神平时浏览哪些网站</a></span></p></div></div><div style=\\\"outline: 0px;\\\"><div style=\\\"padding: 6px 18px;outline: 0px;width: 552.667px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;font-size: 13px;color: rgb(87, 46, 15);line-height: 18px;border-bottom: none !important;\\\"><p style=\\\"margin:0;outline:0;overflow:hidden;text-overflow:ellipsis\\\"><span><a href=\\\"http://mp.weixin.qq.com/s?__biz=MzUyNDUyMDQyNQ==&amp;mid=2247484512&amp;idx=1&amp;sn=8dba09b6efe46dea08b7e4185e88b116&amp;chksm=fa2d5ae6cd5ad3f0ffeb00d137e332d1a47751739e61e9125e0ead8a34f185969e2e8a1031f9&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">推荐应届生写进简历的十个项目</a></span></p><p style=\\\"margin:0;outline:0;overflow:hidden;text-overflow:ellipsis\\\"><span><br/></span></p><p style=\\\"margin:0;outline:0;overflow:hidden;text-overflow:ellipsis\\\"><span><br/></span></p></div></div></div></div></div><div style=\\\"margin-bottom: 0px;outline: 0px;text-wrap: wrap;\\\"><div style=\\\"outline: 0px;\\\"><div style=\\\"outline: 0px;text-align: center;\\\"><div style=\\\"outline: 0px;display: inline-block;\\\"><div style=\\\"margin-bottom: -16px;outline: 0px;display: -webkit-box;-webkit-box-pack: end;\\\"><div style=\\\"outline: 0px;width: 80px;\\\"><span style=\\\"font-size: var(--articleFontsize);letter-spacing: 0.034em;\\\"></span></div></div></div></div></div></div><p style=\\\"margin:0;outline:0;margin-bottom:0\\\"><span><br/></span></p><p style=\\\"margin:0;margin-bottom:0\\\"><span><br/></span></p><div><span><br/></span></div></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":253485}]"
metadata_diff: {"new":{"id":"61832b0ef8f64a7e89621e0987fa724a","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348830430,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:04:05.021Z
created_time: 2025-11-28T21:04:05.021Z
type_: 13