add edu-riscv64,edu-arm,cr100 and cm100 instruction page
|
@ -67,7 +67,7 @@ source envsetup.sh //输入74,代表选择 rockchip_rk3568_dlm3568
|
|||
./build.sh lunch //输入3,代表选择 BoardConfig-rk3568-dlm3568-ddr4-A1.mk配置文件
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
`注:提前将 XiHuiTong_Linux_Support_Collaborate_With_XiUOS\Source_Code\rk3568_linux/dl目录拷贝到$SDK_PATH/buildroot/ 下,这个目录里是大量的压缩包,在编译内核时减少大量下载时间`
|
||||
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
# XiDaTong_ARM_Reference_Resource
|
||||
|
||||
## 1. 矽达通介绍
|
||||
|
||||
矽达通外观图:
|
||||
|
||||

|
||||
|
||||
拆开后盖:
|
||||
|
||||

|
||||
|
||||
矽达通天线种类:
|
||||
|
||||

|
||||
|
||||
天线位置:
|
||||
|
||||

|
||||
|
||||
矽达通烧录这里介绍两种方式,分别是 NXP-MCUBootUtility 和 Keil MDK5
|
||||
|
||||
## 2. NXP-MCUBootUtility 方式烧录
|
||||
|
||||
**[NXP-MCUBootUtility](https://github.com/JayHeng/NXP-MCUBootUtility/tree/v3.4.0)** 是一款开源免费的专为 NXP MCU 安全启动而设计的 GUI 工具。目前主要支持 i.MXRT、LPC、Kinetis 系列 MCU 芯片
|
||||
|
||||
> ### 测试环境
|
||||
|
||||
- Windows
|
||||
|
||||
- NXP-MCUBootUtility v3.4.0
|
||||
|
||||
> ### 烧录流程
|
||||
|
||||
将矽达通串口 1 通过 usb 转串口连接至电脑,并在电脑端查看到相应端口,如下图,com15
|
||||
|
||||

|
||||
|
||||
打开 NXP-MCUBootUtility.exe
|
||||
|
||||
确保一下配置选项正确,COM Port 记得选择上述对应的串口
|
||||
|
||||

|
||||
|
||||
将拨码开关拨到 1 on 2 on 3 off 4 off 进入 Serial Download Programming(SDP) 模式, 重新连接电源
|
||||
|
||||
先点击 Connect to ROM,若连接成功按钮会变蓝
|
||||
|
||||

|
||||
|
||||
> #### 2.1、NON-XIP 二进制文件烧写:
|
||||
>
|
||||
> 在 Application Image File 一栏中选择要烧录的 elf 文件,文件格式选择 .out(elf) from GCC ARM,然后点击 All-In-One Action 烧录即可
|
||||
|
||||

|
||||
|
||||
> #### 2.2、XIP 二进制文件烧写:
|
||||
>
|
||||
> 选择编译生成的 elf 或 bin 文件路径,按照图示步骤,将文件烧写至 Flash 中(link.lds 中已构造 Flash Bootable image,如有修改 Flash 相关配置需求,可修改./Ubiquitous/$(kernel)/xidatong/xip 目录内相关文件,无需 NXPBootUtility 再次构造),若烧写无误,则下列绿色进度条会执行到底。如下图所示:
|
||||
|
||||

|
||||
|
||||
烧录完后后,将拨码开关拨回 1 off 2 off 3 off 4 off 进入 nor-flash 启动模式,重新上电,即可从 QSPI Flash 启动程序,此时可以从串口看到调试信息
|
||||
|
||||
`注:由于采用串口烧录,在连接和烧录的时候记得先关闭串口调试工具`
|
||||
|
||||
## 2. Keil MDK 方式烧录
|
||||
|
||||
Keil MDK 是一系列基于 Arm Cortex-M 的微控制器设备的完整软件开发环境,可以自行去官网 **[购买下载](https://www.keil.com/download/product/)** ,需要注意的是请选择使用 Keil MDK5.24a 及以上版本
|
||||
|
||||
开发板连接 CMSIS-DAP 调试器,如下图所示,连接 DIO/CLK/GND 对应的三个引脚即可
|
||||
|
||||

|
||||
|
||||
> ### 芯片支持包导入
|
||||
|
||||
去 keil 官网 [http://www.keil.com/dd2/pack/#/eula-container](http://www.keil.com/dd2/pack/#/eula-container) 下载对应的板级安装包
|
||||
|
||||

|
||||
|
||||
注意: 安装包可能随时间推移,版本有所改动,可选择最新版本下载。
|
||||
|
||||
下载完成,安装即可。
|
||||
|
||||
> ### 烧写固件安装
|
||||
|
||||
将开发板烧写固件复制到 Keil5 安装目录 Keil_v5\ARM\Flash\MIMXRT_QSPIFLASH.FLM,该固件可以兼容 32M 以下 nor Flash 烧写。
|
||||
|
||||
例如: c:\Keil_v5\ARM\Flash\MIMXRT_QSPIFLASH.FLM
|
||||
|
||||
> ### Keil 环境配置
|
||||
|
||||
查看仿真器是否连接成功:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
> ### 添加烧写固件
|
||||
|
||||
选择 Flash Download,删除原来的烧写配置
|
||||
|
||||

|
||||
|
||||
添加该烧写固件,size 大小为 32MB
|
||||
|
||||

|
||||
|
||||
下载的一些设置记得勾上:
|
||||
|
||||

|
||||
|
||||
然后编译烧录即可,keil 下载不需要进入 SDP 模式,无需拨拨码开关。
|
|
@ -0,0 +1,53 @@
|
|||
# XiDaTong_RISCV_Reference_Resource
|
||||
|
||||
## 1. 烧录
|
||||
|
||||
如下图,usb 转串口将矽达通(RISCV)与电脑连接起来
|
||||
|
||||

|
||||
|
||||
矽达通后盖如下图,烧录时需要将引脚短接并重新上电
|
||||
|
||||

|
||||
|
||||
> ### windows 端
|
||||
|
||||
用 [k-flash gui](https://github.com/kendryte/kendryte-flash-windows/releases) 工具烧录
|
||||
|
||||
波特率不能太高,调小一点,选择镜像文件,烧录即可
|
||||
|
||||

|
||||
|
||||
**`注:烧录时需要断开串口调试工具,后面同理`**
|
||||
|
||||
> ### Ubuntu 端
|
||||
|
||||
依然用 kendryte 官方的 [k-flash](https://github.com/kendryte/kflash.py) 命令行工具
|
||||
|
||||
执行以下命令安装 K-Flash 工具
|
||||
|
||||
```
|
||||
sudo apt install python3 python3-pip
|
||||
sudo pip3 install pyserial
|
||||
sudo pip3 install pyelftools
|
||||
sudo pip3 install kflash
|
||||
```
|
||||
|
||||
如果最后一步安装 kflash 出现错误,可以尝试以下命令
|
||||
|
||||
```
|
||||
sudo python -m pip install kflash
|
||||
sudo python3 -m pip install kflash
|
||||
sudo pip install kflash
|
||||
sudo pip2 install kflash
|
||||
```
|
||||
|
||||
代码根目录下执行 K-Flash 工具烧录,-p 为 USB 端口号,视实际情况而定
|
||||
|
||||
```
|
||||
sudo kflash -t build/XiUOS_kd233.bin -p /dev/ttyUSB0
|
||||
```
|
||||
|
||||
如果编译 & 烧写无误,断开之前短接的引脚,将会在串口终端上看到信息打印输出
|
||||
|
||||

|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 42 KiB |
|
@ -2,7 +2,7 @@
|
|||
* @Author: 龚祖望 573413756@qq.com
|
||||
* @Date: 2022-05-16 09:16:41
|
||||
* @LastEditors: 龚祖望 573413756@qq.com
|
||||
* @LastEditTime: 2023-03-08 15:57:02
|
||||
* @LastEditTime: 2023-03-09 16:53:42
|
||||
* @FilePath: \dashengda\src\permission.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@ import getPageTitle from '@/utils/get-page-title'
|
|||
NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
||||
|
||||
const whiteList = ['/login', '/home', '/product/M168', '/product/RV400', '/product/RV400-SR100', '/product/M168-SM100',
|
||||
'/product/RV400-AR100', '/product/RV400-AR100/instruction', '/product/RV400-CR100', '/product/M528-CM100', '/product/edu-arm', '/product/edu-riscv64', '/product/M528',
|
||||
'/product/RV400-AR100', '/product/instructionDetail', '/product/RV400-CR100', '/product/M528-CM100', '/product/edu-arm', '/product/edu-riscv64', '/product/M528',
|
||||
'/solution/shengda', '/solution/qianjiang', '/configuration/development', '/configuration/transferStation',
|
||||
'/configuration/AiCity', '/configuration/bridgeMachine'] // no redirect whitelist
|
||||
|
||||
|
|
|
@ -66,8 +66,8 @@ export const constantRoutes = [
|
|||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/product/RV400-AR100/instruction',
|
||||
component: () => import('@/views/product/RV400-AR100/instruction.vue'),
|
||||
path: '/product/instructionDetail',
|
||||
component: () => import('@/views/product/instructionDetail'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
|
|
|
@ -16,6 +16,41 @@
|
|||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<h1>开发板详情介绍图</h1>
|
||||
<img src="@/assets/images/cm100_mainboard.png" style="margin-bottom:50px" width="60%">
|
||||
<h1>产品使用说明</h1>
|
||||
<el-row>
|
||||
<el-col :span="18" :offset="3">
|
||||
<div class="instruction">
|
||||
<div class="left">
|
||||
<img src="@/assets/images/instruction_logo.png" width="45%">
|
||||
<p>矽璓 智能终端</p>
|
||||
<P>M528-LoRa-CM100</P>
|
||||
<img src="@/assets/images/instruction_title.png" width="35%" style="vertical-align:middle">
|
||||
<img class="button" src="@/assets/images/instruction_button.png" style="margin-right:20%" width="30%" @click="instructionDetail">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div>
|
||||
<p class="title">1. 矽达通介绍</p>
|
||||
<p class="title">2. NXP-MCUBootUtility 方式烧录</p>
|
||||
<p>
|
||||
<span>2.1、测试环境</span>
|
||||
<span>2.2、烧录流程</span>
|
||||
<span>2.3、NON-XIP 二进制文件烧写</span>
|
||||
<span>2.4、XIP 二进制文件烧写</span>
|
||||
</p>
|
||||
<p class="title">3. Keil MDK 方式烧录</p>
|
||||
<p>
|
||||
<span>3.1、芯片支持包导入</span>
|
||||
<span>3.2、烧写固件安装</span>
|
||||
<span>3.3、Keil 环境配置</span>
|
||||
<span>3.4、添加烧写固件</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="arch">
|
||||
<h1>技术架构</h1>
|
||||
|
@ -137,71 +172,127 @@ export default {
|
|||
return {}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
methods: {
|
||||
instructionDetail() {
|
||||
this.$router.push({
|
||||
path: '/product/instructionDetail',
|
||||
query: { type: 'cm100' }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.body-container {
|
||||
color: #2e2e2e;
|
||||
text-align: center;
|
||||
font-family: Nunito;
|
||||
min-width: 1340px;
|
||||
.info {
|
||||
.intro {
|
||||
text-align: justify;
|
||||
text-indent: 2em;
|
||||
font-size: 20px;
|
||||
line-height: 2.5;
|
||||
letter-spacing: 2px;
|
||||
.body-container {
|
||||
color: #2e2e2e;
|
||||
text-align: center;
|
||||
font-family: Nunito;
|
||||
min-width: 1340px;
|
||||
.info {
|
||||
.intro {
|
||||
text-align: justify;
|
||||
text-indent: 2em;
|
||||
font-size: 20px;
|
||||
line-height: 2.5;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
.instruction {
|
||||
margin-top: 30px;
|
||||
width: 100%;
|
||||
background: linear-gradient(181deg, #424d83, #7dadf3);
|
||||
padding: 50px 80px;
|
||||
border-radius: 96px;
|
||||
// height: 300px;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
.left {
|
||||
width: 50%;
|
||||
p {
|
||||
font-family: Poppins;
|
||||
font-weight: bold;
|
||||
font-size: 2.5vw;
|
||||
// line-height: 1.2;
|
||||
color: #fff;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
.button {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.arch {
|
||||
min-height: 100vh;
|
||||
background: url('~@/assets/images/advantage_bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
margin-top: 50px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
.intro {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
.right {
|
||||
width: 50%;
|
||||
color: #fff;
|
||||
font-family: Minion Pro;
|
||||
padding-left: 5%;
|
||||
line-height: 2;
|
||||
.title {
|
||||
font-size: 1.3vw;
|
||||
font-weight: bold;
|
||||
// line-height: 52px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.advantage{
|
||||
.advantage_row{
|
||||
height: 20vh;
|
||||
&:first-of-type{
|
||||
margin-top: 50px;
|
||||
}
|
||||
.img{
|
||||
float: left;
|
||||
p {
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 0.95vw;
|
||||
white-space: nowrap;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.intro{
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scene{
|
||||
padding-top: 70px;
|
||||
padding-bottom: 120px;
|
||||
background: url('~@/assets/images/scene_bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.content{
|
||||
background-color: #fff;
|
||||
span{
|
||||
font-size: 20px;
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-card {
|
||||
margin: 20px;
|
||||
height: 23vh;
|
||||
min-height: 250px;
|
||||
}
|
||||
.arch {
|
||||
min-height: 100vh;
|
||||
background: url('~@/assets/images/advantage_bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
margin-top: 50px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
.intro {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
.advantage {
|
||||
.advantage_row {
|
||||
height: 20vh;
|
||||
&:first-of-type {
|
||||
margin-top: 50px;
|
||||
}
|
||||
.img {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.intro {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scene {
|
||||
padding-top: 70px;
|
||||
padding-bottom: 120px;
|
||||
background: url('~@/assets/images/scene_bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.content {
|
||||
background-color: #fff;
|
||||
span {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-card {
|
||||
margin: 20px;
|
||||
height: 23vh;
|
||||
min-height: 250px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<div class="left">
|
||||
<img src="@/assets/images/instruction_logo.png" width="45%">
|
||||
<p>矽璓 智能终端</p>
|
||||
<P>M168-NPU4T-4G-SM100</P>
|
||||
<P>RV400-NPU16T-5G-AR100</P>
|
||||
<img src="@/assets/images/instruction_title.png" width="35%" style="vertical-align:middle">
|
||||
<img class="button" src="@/assets/images/instruction_button.png" width="30%" @click="instructionDetail">
|
||||
</div>
|
||||
|
@ -213,7 +213,7 @@ export default {
|
|||
mounted() {},
|
||||
methods: {
|
||||
instructionDetail() {
|
||||
|
||||
this.$router.push({ path: '/product/instructionDetail', query: { type: 'ar100' }})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ export default {
|
|||
p{
|
||||
font-family: Poppins;
|
||||
font-weight: bold;
|
||||
font-size: 2.5vw;
|
||||
font-size: 2.4vw;
|
||||
// line-height: 1.2;
|
||||
color: #fff;
|
||||
margin: 0.5em 0;
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<p><img src="@/assets/images/instruction_detail_logo.png"> 矽璓 智能终端</p>
|
||||
<P>M168-NPU4T-4G-SM100</P>
|
||||
<img src="@/assets/images/instruction_detail_title.png">
|
||||
<div class="markdown-body body-container" v-html="articalContent" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
articalContent: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
axios.get('/ar100.md').then(res => {
|
||||
const Markdown = require('markdown-it')
|
||||
const md = new Markdown()
|
||||
console.log('res', res)
|
||||
const htmlMD = md.render(res.data)
|
||||
|
||||
this.articalContent = htmlMD
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/styles/github-markdown.css';
|
||||
.container{
|
||||
border-radius: 48px;
|
||||
background: linear-gradient(181deg,#424D83,#7DADF3);
|
||||
padding: 50px 30px 30px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
& > p{
|
||||
font-size: 52px;
|
||||
font-family: Poppins;
|
||||
margin: 20px 0;
|
||||
img{
|
||||
vertical-align: middle;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
& > img {
|
||||
height: 100px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
::v-deep .markdown-body{
|
||||
border-radius: 48px;
|
||||
background-color: #fff;
|
||||
padding: 50px;
|
||||
text-align: left;
|
||||
|
||||
h1,h2{
|
||||
color: #46548C !important;
|
||||
}
|
||||
h3{
|
||||
color:#7DADF3 !important;
|
||||
text-indent: 2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -15,6 +15,31 @@
|
|||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<h1>开发板详情介绍图</h1>
|
||||
<img src="@/assets/images/cr100_mainboard.png" style="margin-bottom:50px" width="60%">
|
||||
<h1>产品使用说明</h1>
|
||||
<el-row>
|
||||
<el-col :span="18" :offset="3">
|
||||
<div class="instruction">
|
||||
<div class="left">
|
||||
<img src="@/assets/images/instruction_logo.png" width="45%">
|
||||
<p>矽璓 智能终端</p>
|
||||
<P>RV400-4G-CR100</P>
|
||||
<img src="@/assets/images/instruction_title.png" width="35%" style="vertical-align:middle">
|
||||
<img class="button" src="@/assets/images/instruction_button.png" style="margin-right:25%" width="30%" @click="instructionDetail">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div>
|
||||
<p class="title">1. 烧录</p>
|
||||
<p>
|
||||
<span>1.1、windows端</span>
|
||||
<span>1.2、Ubuntu端</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="arch">
|
||||
<h1>技术架构</h1>
|
||||
|
@ -135,71 +160,127 @@ export default {
|
|||
return {}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
methods: {
|
||||
instructionDetail() {
|
||||
this.$router.push({
|
||||
path: '/product/instructionDetail',
|
||||
query: { type: 'cr100' }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.body-container {
|
||||
color: #2e2e2e;
|
||||
text-align: center;
|
||||
font-family: Nunito;
|
||||
min-width: 1340px;
|
||||
.info {
|
||||
.intro {
|
||||
text-align: justify;
|
||||
text-indent: 2em;
|
||||
font-size: 20px;
|
||||
line-height: 2.5;
|
||||
letter-spacing: 2px;
|
||||
.body-container {
|
||||
color: #2e2e2e;
|
||||
text-align: center;
|
||||
font-family: Nunito;
|
||||
min-width: 1340px;
|
||||
.info {
|
||||
.intro {
|
||||
text-align: justify;
|
||||
text-indent: 2em;
|
||||
font-size: 20px;
|
||||
line-height: 2.5;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
.instruction {
|
||||
margin-top: 30px;
|
||||
width: 100%;
|
||||
background: linear-gradient(181deg, #424d83, #7dadf3);
|
||||
padding: 50px 80px;
|
||||
border-radius: 96px;
|
||||
// height: 300px;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
.left {
|
||||
width: 50%;
|
||||
p {
|
||||
font-family: Poppins;
|
||||
font-weight: bold;
|
||||
font-size: 2.5vw;
|
||||
// line-height: 1.2;
|
||||
color: #fff;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
.button {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 50%;
|
||||
color: #fff;
|
||||
font-family: Minion Pro;
|
||||
padding-left: 5%;
|
||||
line-height: 2;
|
||||
.title {
|
||||
font-size: 1.8vw;
|
||||
font-weight: bold;
|
||||
// line-height: 52px;
|
||||
margin: 0;
|
||||
}
|
||||
p {
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 1.3vw;
|
||||
white-space: nowrap;
|
||||
margin-right: 20px;
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.arch {
|
||||
min-height: 100vh;
|
||||
background: url('~@/assets/images/advantage_bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
margin-top: 50px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
.arch {
|
||||
min-height: 100vh;
|
||||
background: url('~@/assets/images/advantage_bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
margin-top: 50px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
.intro {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
.advantage {
|
||||
.advantage_row {
|
||||
height: 20vh;
|
||||
&:first-of-type {
|
||||
margin-top: 50px;
|
||||
}
|
||||
.img {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.intro {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
.advantage{
|
||||
.advantage_row{
|
||||
height: 20vh;
|
||||
&:first-of-type{
|
||||
margin-top: 50px;
|
||||
}
|
||||
.img{
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.intro{
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scene{
|
||||
padding-top: 70px;
|
||||
padding-bottom: 120px;
|
||||
background: url('~@/assets/images/scene_bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.content{
|
||||
background-color: #fff;
|
||||
span{
|
||||
font-size: 20px;
|
||||
}
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-card {
|
||||
margin: 20px;
|
||||
height: 23vh;
|
||||
min-height: 250px;
|
||||
.scene {
|
||||
padding-top: 70px;
|
||||
padding-bottom: 120px;
|
||||
background: url('~@/assets/images/scene_bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.content {
|
||||
background-color: #fff;
|
||||
span {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
.el-card {
|
||||
margin: 20px;
|
||||
height: 23vh;
|
||||
min-height: 250px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<h1>开发板详情介绍图</h1>
|
||||
<img src="@/assets/images/edu-arm_mainboard.png" width="60%">
|
||||
</div>
|
||||
<div class="arch">
|
||||
<h1>技术架构</h1>
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<h1>开发板详情介绍图</h1>
|
||||
<img src="@/assets/images/edu-riscv64_mainboard.png" width="60%">
|
||||
</div>
|
||||
<div class="arch">
|
||||
<h1>技术架构</h1>
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<p><img src="@/assets/images/instruction_detail_logo.png"> 矽璓 智能终端</p>
|
||||
<P>{{ deviceName }}</P>
|
||||
<img src="@/assets/images/instruction_detail_title.png">
|
||||
<div class="markdown-body body-container" v-html="articalContent" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
articalContent: '',
|
||||
deviceName: 'RV400-NPU16T-5G-AR100',
|
||||
fileName: 'ar100',
|
||||
type: this.$route.query.type
|
||||
}
|
||||
},
|
||||
created() {
|
||||
switch (this.type) {
|
||||
case 'ar100':
|
||||
this.deviceName = 'RV400-NPU16T-5G-AR100'
|
||||
this.fileName = 'ar100'
|
||||
break
|
||||
case 'cm100':
|
||||
this.deviceName = 'M528-LoRa-CM100'
|
||||
this.fileName = 'cm100'
|
||||
break
|
||||
case 'cr100':
|
||||
this.deviceName = 'RV400-4G-CR100'
|
||||
this.fileName = 'cr100'
|
||||
break
|
||||
default:
|
||||
this.deviceName = 'RV400-NPU16T-5G-AR100'
|
||||
this.fileName = 'ar100'
|
||||
}
|
||||
axios.get('/' + this.fileName + '.md').then(res => {
|
||||
const Markdown = require('markdown-it')
|
||||
const md = new Markdown()
|
||||
console.log('res', res)
|
||||
const htmlMD = md.render(res.data)
|
||||
this.articalContent = htmlMD
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/styles/github-markdown.css';
|
||||
.container{
|
||||
border-radius: 48px;
|
||||
background: linear-gradient(181deg,#424D83,#7DADF3);
|
||||
padding: 50px 30px 30px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
& > p{
|
||||
font-size: 52px;
|
||||
font-family: Poppins;
|
||||
margin: 20px 0;
|
||||
img{
|
||||
vertical-align: middle;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
& > img {
|
||||
height: 100px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
::v-deep .markdown-body{
|
||||
border-radius: 48px;
|
||||
background-color: #fff;
|
||||
padding: 50px;
|
||||
text-align: left;
|
||||
|
||||
h1,h2{
|
||||
color: #46548C !important;
|
||||
}
|
||||
h3{
|
||||
color:#7DADF3 !important;
|
||||
text-indent: 2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,769 +0,0 @@
|
|||
# XiHuiTong_Linux_Support_Collaborate_With_XiUOS
|
||||
|
||||
## 1. 系统交叉编译
|
||||
|
||||
### 1.1、测试环境
|
||||
|
||||
- `Ubuntu 18.04` 及以上
|
||||
|
||||
- 16.04 在编译 debian 文件系统时会出错,暂时未解决,不建议使用
|
||||
|
||||
解压 sdk 基础包
|
||||
|
||||
在路径 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code/rk3568_linux/sdk/base/ 下,拷贝到 Ubuntu 环境下,执行如下命令
|
||||
|
||||
```
|
||||
tar -xzvf som3568_base_0520.tar.gz
|
||||
cd rk356x_linux
|
||||
```
|
||||
|
||||
### 1.2、交叉编译工具链
|
||||
|
||||
已内置于 sdk prebuilts 和 buildroot 目录下,不用重新安装
|
||||
|
||||
- aarch64-linux-gcc (gcc version 6.3.1 20170404)
|
||||
- aarch64-buildroot-linux-gnu-gcc (gcc version 9.3.0)
|
||||
|
||||
### 1.3、其他安装包
|
||||
|
||||
```
|
||||
sudo apt-get install repo git ssh make gcc libssl-dev liblz4-tool
|
||||
sudo apt-get install expect g++ patchelf chrpath gawk texinfo chrpath diffstat binfmt-support
|
||||
sudo apt-get install qemu-user-static live-build bison flex fakeroot cmake gcc-multilib g++-multilib
|
||||
sudo apt-get install unzip zlib1g-dev
|
||||
sudo apt-get install device-tree-compiler python-pip ncurses-dev
|
||||
|
||||
pip install pyelftools
|
||||
```
|
||||
|
||||
### 1.4、打 patch
|
||||
|
||||
将 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code/rk3568_linux/patch 下三个 patch 文件取出
|
||||
|
||||
**下文 SDK_PATH 指代 rk356x_linux 目录**
|
||||
|
||||
repo_20210520_DLM3568_device_95d7e1_435a6c_01.patch 放在 $SDK_PATH/device/rockchip 下
|
||||
repo_20210520_DLM3568_kernel_4f736f_a7164d_01.patch 放在 $SDK_PATH/kernel 下
|
||||
repo_20210520_DLM3568_buildroot_94742b_86ca23_01.patch 放在 $SDK_PATH/buildroot 下
|
||||
|
||||
在对应目录下运行 `patch -p1 < *.patch` 打包
|
||||
|
||||
```shell
|
||||
cd device/rockchip
|
||||
patch -p1 < *.patch
|
||||
|
||||
cd ../../kernel
|
||||
patch -p1 < *.patch
|
||||
|
||||
cd ../buildroot
|
||||
patch -p1 < *.patch
|
||||
```
|
||||
|
||||
配置 deconfig 文件和设备树(在 SDK_PATH 目录下)
|
||||
|
||||
```shell
|
||||
cd ../
|
||||
source envsetup.sh //输入74,代表选择 rockchip_rk3568_dlm3568
|
||||
./build.sh lunch //输入3,代表选择 BoardConfig-rk3568-dlm3568-ddr4-A1.mk配置文件
|
||||
```
|
||||
|
||||

|
||||
|
||||
`注:提前将 XiHuiTong_Linux_Support_Collaborate_With_XiUOS\Source_Code\rk3568_linux/dl目录拷贝到$SDK_PATH/buildroot/ 下,这个目录里是大量的压缩包,在编译内核时减少大量下载时间`
|
||||
|
||||
### 1.5、编译 Uboot
|
||||
|
||||
```
|
||||
<SDK_PATH>$ ./build.sh uboot
|
||||
```
|
||||
|
||||
### 1.6、编译 Kernel
|
||||
|
||||
编译 kernel 前把 5G 网卡驱动设置一下:
|
||||
|
||||
打开 $SDK_PATH/kernel/drivers/usb/serial/option.c ,在 option_probe 函数中 `unsigned long device_flags = id->driver_info;` 一行后面加入如下代码:
|
||||
|
||||
```cpp
|
||||
if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2CB7) && serial->dev->descriptor.idProduct == cpu_to_le16(0x0104) && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
|
||||
{
|
||||
printk(KERN_INFO "Discover the 4th interface for fibocom\n");
|
||||
return ENODEV;
|
||||
}
|
||||
if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2CB7) && serial->dev->descriptor.idProduct == cpu_to_le16(0x010A) && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 2)
|
||||
{
|
||||
printk(KERN_INFO "Discover the 4th interface for fibocom\n");
|
||||
return ENODEV;
|
||||
}
|
||||
```
|
||||
|
||||
打开 SDK_PATH/build.sh (**该文件时间软连接到了 rk356x_linux/device/rockchip/common/build.sh**),在该文件的 build_kernel 函数中增加一行(函数起始位置大概在 481 行) :
|
||||
|
||||
```makefile
|
||||
make ARCH=$RK_ARCH menuconfig
|
||||
```
|
||||
|
||||

|
||||
|
||||
然后编译内核:
|
||||
|
||||
```
|
||||
<SDK_PATH>$ ./build.sh kernel
|
||||
```
|
||||
|
||||
menuconfig 时勾选上如下选项:(Device Drivers 下可以检索如下配置项 USB_SUPPORT、USB_SERIAL、USB_SERIAL_OPTION,?+回车可以快速找到 )
|
||||
|
||||

|
||||
|
||||
配置电源选项时,全部选择 3300000uV
|
||||
|
||||

|
||||
|
||||
如下表示配置成功:
|
||||
|
||||

|
||||
|
||||
最后显示 "Running build_kernel succeeded." 编译成功
|
||||
|
||||
### 1.7、编译 Recovery
|
||||
|
||||
```
|
||||
<SDK_PATH>$ sudo ./build.sh recovery
|
||||
```
|
||||
|
||||
需要特别注意 recovery.img 是包含 kernel.img,所以每次 Kernel 更改后,Recovery 是需要重新打包生成。如下:
|
||||
|
||||
```
|
||||
<SDK_PATH>$ source envsetup.sh rockchip_芯片名称
|
||||
<SDK_PATH>$ make recovery-rebuild
|
||||
<SDK_PATH>$ sudo ./build.sh recovery
|
||||
```
|
||||
|
||||
这一步需要从网上下载资源,比较耗时。
|
||||
|
||||
编译成功会显示"Running build_recovery succeeded."
|
||||
|
||||
### 1.8、编译 Debian
|
||||
|
||||
进入目录 ${SDK_PATH}
|
||||
|
||||
ubuntu16.04 及以后已不支持 `python-support`,需要手动安装:
|
||||
|
||||
```
|
||||
wget http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb
|
||||
sudo dpkg -i python-support_1.0.15_all.deb
|
||||
```
|
||||
|
||||
由于下载时可能因为被防火墙墙导致下载失败,在 ${SDK_PATH}/debian/ubuntu-build-service/buster-desktop-arm64/configure 文件中加入以下镜像网站配置
|
||||
|
||||
```
|
||||
echo "I: create configuration"
|
||||
export LB_BOOTSTRAP_INCLUDE="apt-transport-https gnupg"
|
||||
lb config \
|
||||
+ --mirror-bootstrap "http://mirrors.163.com/debian" \
|
||||
+ --mirror-chroot "http://mirrors.163.com/debian" \
|
||||
+ --mirror-chroot-security "http://mirrors.163.com/debian-security" \
|
||||
+ --mirror-binary "http://mirrors.163.com/debian" \
|
||||
+ --mirror-binary-security "http://mirrors.163.com/debian-security" \
|
||||
--apt-indices false \
|
||||
--apt-recommends false \
|
||||
--apt-secure false \
|
||||
```
|
||||
|
||||
编译文件系统:
|
||||
|
||||
```
|
||||
<SDK_PATH>$ ./build.sh debian
|
||||
```
|
||||
|
||||
若出现如下问题:
|
||||
|
||||
```
|
||||
noexec or nodev issue /usr/share/debootstrap/functions: line 1450:
|
||||
..../rootfs/ubuntu-build-service/buster-desktop-arm64/chroot/test-dev-null:
|
||||
Permission denied E: Cannot install into target '/rootfs/ubuntu-buildservice/buster-desktop-arm64/chroot' mounted with noexec or nodev
|
||||
```
|
||||
|
||||
解决方法:
|
||||
|
||||
```
|
||||
sudo mount -o remount,exec,dev /home
|
||||
```
|
||||
|
||||
若出现 live-build 相关的报错,尝试执行如下命令解决
|
||||
|
||||

|
||||
|
||||
考虑升级 live-build,参考 http://t.zoukankan.com/cute-p-15185054.html
|
||||
|
||||
若又出现若现如下问题:
|
||||
|
||||

|
||||
|
||||
执行如下操作进行解决:
|
||||
|
||||
```shell
|
||||
sudo apt-get install -f
|
||||
sudo apt-get install python-apt
|
||||
sudo dpkg -i debian/ubuntu-build-service/packages/*
|
||||
```
|
||||
|
||||
编译完成会显示:
|
||||
|
||||
Running build_debian succeeded.
|
||||
Running build_rootfs succeeded.
|
||||
|
||||
编译完成会在 debian/ 目录下生成:linaro-buster-alip-xxxxx-1.tar.gz(xxxxx 表示生成时间戳)。
|
||||
|
||||
### 1.9、生成镜像
|
||||
|
||||
```
|
||||
<SDK_PATH>$ sudo ./mkfirmware.sh
|
||||
<SDK_PATH>$ sudo ./build.sh updateimg
|
||||
```
|
||||
|
||||
生成 img 在 $SDK_PATH/rockdev 中,`update.img` 为整机镜像。
|
||||
|
||||

|
||||
|
||||
## 2. 烧录镜像及调试
|
||||
|
||||
Micro USB 连接上电脑
|
||||
|
||||

|
||||
|
||||
### 2.1、安装驱动 DriverAssitant_v5.11.zip
|
||||
|
||||
该文件在路径 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code/rk3568_linux/sdk/base 下的 som3568_base_0520.tar.gz 压缩包里,在 1.1 节解压后的目录里去取即可(在 rk356x_linux/tools/windows 目录下)。取出到自己的 windows 环境下解压压缩包,点击 DriverInstall.exe 进行安装。
|
||||
|
||||

|
||||
|
||||
### 2.2、打开 RKDevTool.exe
|
||||
|
||||
在 2.1 节相同的路径下取出 RKDevTool_Release_v2.84.zip 到自己的 windows 环境下,解压压缩包找到 RKDevTool.exe。
|
||||
|
||||
**`注:若一直提示找不到设备,按住 "Update" 按键并重新上电,会提示"发现一个 LOADER 设备",此时直接烧录即可 `(不需要执行图片中第 3 步的切换)**
|
||||
|
||||

|
||||
|
||||
1、连接设备
|
||||
|
||||
2、在打开工具的界面点击"升级固件"→“固件”,选择 1.9 节里编译生成的 update.img 文件,在 rk356x_linux\rockdev\ 路径下,选择固件后稍等片刻,等待固件版本、Loader 版本、芯片信息等加载出来
|
||||
|
||||
3、点击“切换”,等待切换完成
|
||||
|
||||
4、点击"升级",右侧会显示升级信息,等出现重启设备成功说明升级完成
|
||||
|
||||
**调试口在电源侧,从外向里分别为 `GND、TX、RX` 串口连接的波特率为 1500000**
|
||||
|
||||
板子的引脚图和实物图如下所示:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
**注意这里使用的串口模块是这种黑色串口模块,实验室的另一种白色串口模块连接不上。**
|
||||
|
||||

|
||||
|
||||
然后可以使用系统了,同样为了防止被墙,先更换下 apt 源,接上网线后更新一下 apt 源
|
||||
|
||||
第一步:打开 sources.list 文件
|
||||
|
||||
```
|
||||
sudo vim /etc/apt/sources.list
|
||||
```
|
||||
|
||||
第二步:将以下内容复制到 sources.list 文件(复制后在 vi 模式 ctrl+shift+v 进行复制)
|
||||
|
||||
```
|
||||
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
|
||||
deb http://mirrors.aliyun.com/debian-security buster/updates main
|
||||
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
|
||||
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
|
||||
|
||||
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
|
||||
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
|
||||
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
|
||||
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
|
||||
```
|
||||
|
||||
第三步:更新源和系统软件
|
||||
|
||||
```shell
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
```
|
||||
|
||||
**git 仓上保存了一份包含了已经编译好且包含 emmc 扩容后的 update.img 文件,可以不用进行编译直接拿来烧录使用。可以免去编译这一过程,但依然建议初次使用该文档的开发人员,从头至尾编译一边以加深印象。**
|
||||
|
||||
**update.img 保存路径:XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Reference_Doc/ 可直接烧录文件**
|
||||
|
||||
## 3. 5G 网卡调试
|
||||
|
||||
```
|
||||
sudo apt-get install microcom
|
||||
sudo apt-get install udhcpc
|
||||
```
|
||||
|
||||
**`注:先把 micro usb 烧录线拔下,否则 5G 卡无法识别!`**
|
||||
|
||||
先执行 lsusb 确认系统识别到 5G 网卡:
|
||||
|
||||

|
||||
|
||||
如果没有 lsusb 命令先执行如下命令进行安装
|
||||
|
||||
```shell
|
||||
sudo apt-get install usbutils
|
||||
```
|
||||
|
||||
再执行 ls /dev/tty\* 查看 tty 设备:
|
||||
|
||||

|
||||
|
||||
先关闭以太网卡:
|
||||
|
||||
```
|
||||
ifconfig eth0 down
|
||||
```
|
||||
|
||||
进入串口工具:
|
||||
|
||||
```
|
||||
microcom -s 115200 -p /dev/ttyUSB1
|
||||
```
|
||||
|
||||
切换到 ECM 拨号模式:
|
||||
|
||||
```
|
||||
at+gtusbmode=18
|
||||
```
|
||||
|
||||
查询 sim 卡是否插入:
|
||||
|
||||
```
|
||||
at+cpin?
|
||||
```
|
||||
|
||||
查看 5G 网络注册状态:
|
||||
|
||||
```
|
||||
at+cgreg?
|
||||
```
|
||||
|
||||
拨号:
|
||||
|
||||
```
|
||||
at+gtrndis=0,1
|
||||
at+gtrndis=1,1
|
||||
```
|
||||
|
||||
**在 AT 模式下退出该模式,ctrl+\然后输入 quit 即可退出。**
|
||||
|
||||
拨号完成后退出串口工具,自动获取 ip:
|
||||
|
||||
```
|
||||
udhcpc -i usb0
|
||||
ifconfig usb0 up
|
||||
```
|
||||
|
||||
此时 ifconfig 应该能看到 usb0 网卡状态:
|
||||
|
||||

|
||||
|
||||
ping 测试成功
|
||||
|
||||
```shell
|
||||
ping www.baidu.com
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 5. wifi 模块调试
|
||||
|
||||
WIFI 模块为 USB 接口,采用南方硅谷 ssv6x5x 芯片。
|
||||
|
||||
总体参考《南方硅谷 ssv6x5x 驱动移植用户指南\_20200818》
|
||||
|
||||
> ### 驱动编译
|
||||
|
||||
需要的驱动文件为 Source Code\Wifi\Wifi Related Tools\6155.6152 驱动.zip 这个压缩文件里,有个压缩文件 L.SMAC.19Q3.2042.02_FH.tar.gz,将该文件 copy 到 rk356x_linux/kernel/drivers/net/wireless/ 下,解压为 ssv6x5x 文件夹
|
||||
|
||||
```bash
|
||||
cd rk356x_linux/kernel/drivers/net/wireless/
|
||||
tar -zxvf L.SMAC.19Q3.2042.02_FH.tar.gz
|
||||
mv L.SMAC.19Q3.2042.02 ssv6x5x
|
||||
```
|
||||
|
||||
如果是移植到 Linux 平台,可参考 platforms 下 t20 平台的相关配置文件。
|
||||
|
||||
将以上平台相关文件 copy 到 ssv6x5x 目录,进入 ssv6x5x 目录下:
|
||||
|
||||
```bash
|
||||
cd ssv6x5x
|
||||
cp platforms/platform-config.mak .
|
||||
cp platforms/t20.cfg ssv6x5x.cfg
|
||||
cp platforms/t20-generic-wlan.c ssv6x5x-generic-wlan.c
|
||||
cp platforms/t20-wifi.cfg image/ssv6x5x-wifi.cfg
|
||||
cp platforms/t20-wifi.cfg ssv6x5x-wifi.cfg
|
||||
```
|
||||
|
||||
根据平台类型 copy 出一份正确的 makefile, 因为 ssv6x5x/makefile 默认驱动目录带的是 ubuntu 环境的 makefile 文件,不能直接使用。
|
||||
|
||||
```bash
|
||||
cp Makefile.cross_linux Makefile
|
||||
```
|
||||
|
||||
将 ssv6x5x 驱动存放在内核目录 rk356x_linux/kernel/drivers/net/wireless/ 路径下。
|
||||
|
||||
修改 drivers/net/wireless 目录的 Makefile,新增
|
||||
|
||||
```sh
|
||||
obj-$(CONFIG_SSV6X5X) += ssv6x5x/
|
||||
```
|
||||
|
||||

|
||||
|
||||
以及 Kconfig 文件,新增
|
||||
|
||||
```sh
|
||||
source "drivers/net/wireless/ssv6x5x/Kconfig"
|
||||
```
|
||||
|
||||

|
||||
|
||||
在 rk356x_linux/kernel 路径下重新配置内核 menuconfig:
|
||||
|
||||
```bash
|
||||
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-himix100-linux- menuconfig
|
||||
```
|
||||
|
||||
networking support -> RF switch subsystem support ->下面的都选上(在 Networking support 中快速检索,搜索 RFKILL)
|
||||
|
||||

|
||||
|
||||
networking support -> wireless ->cfg80211 - wireless configuration API
|
||||
|
||||
networking support -> wireless ->Generic ...(mac80211)
|
||||
|
||||

|
||||
|
||||
然后就可以选上驱动:
|
||||
|
||||
Device Drivers -> Network device support -> Wireless LAN -> SSV6X5X Wireless driver
|
||||
|
||||
(可在 device drivers 中快速检索,依次搜索 NETDEVICES、WLAN、SSV6X5X)
|
||||
|
||||

|
||||
|
||||
在在 rk356x_linux 根目录下编译驱动,并重新编译一遍内核和 recovery, 编译生成的 ssv6x5x.ko 在 kernel/drivers/net/wireless/ssv6x5x 下
|
||||
|
||||
```bash
|
||||
sudo ./build.sh modules
|
||||
sudo ./build.sh kernel (如果又进入menuconfig,那就检查一下上面几个项目是否全部勾选上了)
|
||||
sudo ./build.sh recovery
|
||||
```
|
||||
|
||||
同样,重新打包生成镜像文件:
|
||||
|
||||
```bash
|
||||
sudo ./mkfirmware.sh
|
||||
sudo ./build.sh updateimg
|
||||
```
|
||||
|
||||
按照烧录流程重新烧录
|
||||
|
||||
> ### 驱动运行
|
||||
|
||||
确认系统是否识别到 wifi,对于 usb wifi,执行 lsusb 可以看到如下则确认识别 (for 6155/6255 型号的芯片)
|
||||
|
||||
```
|
||||
Bus 005 Device 003: ID 8065:6000
|
||||
```
|
||||
|
||||
接入以太网安装相关包:
|
||||
|
||||
```bash
|
||||
sudo apt-get update && sudo apt-get install vim usbutils net-tools microcom udhcpc wireless-tools
|
||||
```
|
||||
|
||||
复制相关文件到板子的文件系统中
|
||||
|
||||
复制可以用 U 盘复制,拷贝到 U 盘后插入到矽灵通上,fdisk -l 查看找到 usb 设备,例如 /dev/sda1
|
||||
|
||||
执行挂载进行拷贝
|
||||
|
||||
```shell
|
||||
mkdir -p /mnt/usb
|
||||
mount /dev/sda1 /mnt/usb
|
||||
```
|
||||
|
||||
复制 ssv6x5x/image/ssv6x5x-wifi.cfg 到板子文件系统下 /etc/firmware/ (若无 firmware 文件夹新建即可)
|
||||
|
||||
复制 ssv6x5x.ko 到板子任意目录下
|
||||
|
||||
加载驱动 ssv6x5x.ko
|
||||
|
||||
执行如下指令:(stacfgpath= 路径请根据实际路径填写)
|
||||
|
||||
```bash
|
||||
insmod ssv6x5x.ko stacfgpath=/etc/firmware/ssv6x5x-wifi.cfg
|
||||
```
|
||||
|
||||
insmod 结束:
|
||||
|
||||

|
||||
|
||||
insmod 完成后 wifi 可能会重复扫描周围网络,暂时不用管,接着执行下面步骤可以解决:
|
||||
|
||||
ifconfig -a 查看网卡名称,这边是 wlxa47d9fb5b922 (具体要看板子)
|
||||
|
||||

|
||||
|
||||
为了后续操作方便,可以对网卡重命名为 wlan0 (非必要):
|
||||
|
||||
```
|
||||
ip link set wlxa47d9fb5b922 down
|
||||
ip link set wlxa47d9fb5b922 name wlan0
|
||||
ip link set wlan0 up
|
||||
```
|
||||
|
||||
执行: ifconfig eth0 down && ifconfig wlan0 up
|
||||
|
||||

|
||||
|
||||
> ### WIFI 网络连接
|
||||
|
||||
扫描周围无线网络:
|
||||
|
||||
```bash
|
||||
iwlist wlan0 scan
|
||||
```
|
||||
|
||||

|
||||
|
||||
连接网络:
|
||||
|
||||
```bash
|
||||
iwconfig wlan0 essid "AIIT-Guest"
|
||||
```
|
||||
|
||||

|
||||
|
||||
dhcp 获取 ip
|
||||
|
||||
```bash
|
||||
udhcpc -i wlan0
|
||||
```
|
||||
|
||||

|
||||
|
||||
ip 分配成功后,进行 ping 测试,需要 -I 指定网卡
|
||||
|
||||
```shell
|
||||
ping 114.114.114.114 -I wlan0
|
||||
ping www.baidu.com -I wlan0
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 5. USB 调试
|
||||
|
||||
首先通过 fdisk -l 查看插入的 usb 设备,如下我这里插入的 u 盘是 /dev/sda2
|
||||
|
||||
```shell
|
||||
Device Boot Start End Sectors Size Id Type
|
||||
/dev/sda2 2 15149055 15149054 7.2G c W95 FAT32 (LBA)
|
||||
```
|
||||
|
||||
进行挂载
|
||||
|
||||
```shell
|
||||
mkdir /root/udisk
|
||||
mount /dev/sda2 udisk
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 6. SD 卡调试
|
||||
|
||||
首先通过 fdisk -l 查看插入的 SD 卡,如下我这里插入的 SD 卡是 /dev/mmcblk1p1
|
||||
|
||||
```shell
|
||||
Device Boot Start End Sectors Size Id Type
|
||||
/dev/mmcblk1p1 8192 62333951 62325760 29.7G c W95 FAT32 (LBA)
|
||||
```
|
||||
|
||||
进行挂载
|
||||
|
||||
```shell
|
||||
mkdir /root/sdcard
|
||||
mount /dev/mmcblk1p1 sdcard/
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 7. 显示图片
|
||||
|
||||
烧入 Debian 镜像后,把要显示的图片通过 SD 卡或者 U 盘拷贝进板子,点击打开后全屏幕显示即可。
|
||||
|
||||
## 8. emmc 扩容
|
||||
|
||||
rk3568 配置的是 16GB 的 emmc,但初始只有 3.2GB:
|
||||
|
||||

|
||||
|
||||
为了充分利用剩余空间,需要修改烧录文件 rk356x_linux/rockdev/parameter.txt,该文件实际上软连接到了(rk356x_linux/device/rockchip/rk356x/rk356x/parameter-buildroot-dlm3568.txt)。在生成 update.img 之前先修改 parameter 为以下内容,其中 rootfs 一项即对应文件系统所占大小,格式为 "size@LBA(rootfs)"
|
||||
|
||||
```
|
||||
FIRMWARE_VER: 1.0
|
||||
MACHINE_MODEL: RK3568
|
||||
MACHINE_ID: 007
|
||||
MANUFACTURER: RK3568
|
||||
MAGIC: 0x5041524B
|
||||
ATAG: 0x00200800
|
||||
MACHINE: 0xffffffff
|
||||
CHECK_MASK: 0x80
|
||||
PWR_HLD: 0,0,A,0,1
|
||||
TYPE: GPT
|
||||
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00010000@0x00008000(boot),0x00010000@0x00018000(recovery),0x00010000@0x00028000(backup),0x017F6000@0x00038000(rootfs),0x00040000@0x0182E000(oem),0x0000A000@0x0186E000(userdata),-@0x01878000(data:grow)
|
||||
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9
|
||||
```
|
||||
|
||||
然后重新打包生成整机镜像:
|
||||
|
||||
```
|
||||
<SDK_PATH>$ sudo ./build.sh updateimg
|
||||
```
|
||||
|
||||
**烧录完成后,此时配置可能并未刷新,需要更新下 blocks:**
|
||||
|
||||
```
|
||||
resize2fs /dev/mmcblk0p6
|
||||
```
|
||||
|
||||

|
||||
|
||||
然后 df -h 可以看到文件系统大小已经扩容成为 12G:
|
||||
|
||||

|
||||
|
||||
## 9. AIM16T 从模式烧录
|
||||
|
||||
由于出厂时 AIM16T 镜像烧录错误,EP 模式烧成了 RC 模式,所以现在重新烧录,后盖有遮挡,需要去掉螺丝打开后盖。
|
||||
|
||||
使用 USB 转 TTL 串口,接入 AIM16T 烧录口(烧录口如下图所示的 JP4)
|
||||
|
||||

|
||||
|
||||
拨码开关拨到 on(拨码开关的位置如下图所示),拨码开关拨到 on 后需要重新上电
|
||||
|
||||

|
||||
|
||||
解压 fwu_tool_mlu220.rar 文件,压缩包位于**XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Reference_Doc/AIM16T_EP_Burn**下,解压后更改文件目录权限
|
||||
|
||||
如果没有 rar 相关的命令,需要先安装,如果有这一步忽略
|
||||
|
||||
```shell
|
||||
sudo apt-get install rar
|
||||
sudo apt-get install unrar
|
||||
```
|
||||
|
||||
把 fwu_tool_mlu220.rar 复制到 linux 环境下,进行解压
|
||||
|
||||
```
|
||||
unrar x fwu_tool_mlu220.rar
|
||||
chmod -R 777 fwu_tool_mlu220
|
||||
```
|
||||
|
||||
进入目录,执行 EP 模式镜像烧录
|
||||
|
||||
```
|
||||
cd fwu_tool_mlu220
|
||||
sudo ./start_burn.sh 3
|
||||
```
|
||||
|
||||
以下表示烧录完成
|
||||
|
||||

|
||||
|
||||
将拨码开关拨回 12,重新上电,在 rk3568 命令行中输入 lspci 命令,若能找到以下设备则表示 EP 模式烧录成功
|
||||
|
||||

|
||||
|
||||
接下来在 AIM16T 上运行 yolo_demo 来检验,这一步需要四个文件:
|
||||
|
||||
(1)firmware_sys.img、cambricon-drv.ko、cnmon 这三个文件位于 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code/AIM16T 下的 rk3568_aim16t.tar 压缩包内,从压缩包内取出
|
||||
|
||||
(2)yolo_demo_rk3568.tar.gz 位于 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code 下
|
||||
|
||||
这四个文件用 nfs 或 U 盘拷贝进板子(U 盘的挂载方式见第 4 节 USB 调试,如下 udisk 为挂载后的路径),把 AIM16T 驱动放在对应路径:
|
||||
|
||||
```
|
||||
mkdir -p /lib/firmware/cambricon/mlu220
|
||||
cp -a /root/udisk/firmware_sys.img /lib/firmware/cambricon/mlu220
|
||||
```
|
||||
|
||||
加载 AIM16T 模组:
|
||||
|
||||
```
|
||||
cp /root/udisk/cambricon-drv.ko /root
|
||||
cd /root
|
||||
insmod cambricon-drv.ko
|
||||
```
|
||||
|
||||
以下表示模组加载成功:
|
||||
|
||||

|
||||
|
||||
此时运行 cnmon 脚本可以查看到 mlu220 设备的一些信息:
|
||||
|
||||
```
|
||||
cp /root/udisk/cnmon /root
|
||||
chmod 777 cnmon
|
||||
./cnmon
|
||||
```
|
||||
|
||||

|
||||
|
||||
解压 yolo_demo 并运行推理测试:
|
||||
|
||||
```
|
||||
mkdir -p /root/yolo
|
||||
cp /root/udisk/yolo_demo_rk3568.tar.gz /root/yolo
|
||||
cd /root/yolo
|
||||
tar -zxf yolo_demo_rk3568.tar.gz
|
||||
cd yolo_demo
|
||||
source ./env.sh
|
||||
./cambricon_demo
|
||||
```
|
||||
|
||||
可以看到 demo 正常运行:
|
||||
|
||||

|
||||
|
||||
## 10.RISCV-K210 烧录、调试
|
||||
|
||||
烧录/调试:RISCV 调试引脚同烧录引脚,均为 CO_CPU_ISP_TX/CO_CPU_ISP_RX。除了这两根线外,还需要一根 GND。串口波特率均为 115200。
|
||||
|
||||
引脚图可以参考 2.2 节
|
||||
|
||||

|
||||
|
||||
用 K-Flash.exe 工具进行 bin 包的烧录。K-Flash.exe 工具位于 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Reference_Doc 目录下:
|
||||
|
||||

|
||||
|
||||
在 ① 选择串口 com 号
|
||||
|
||||
在 ② 处选择波特率,选择 115200
|
||||
|
||||
在 ③ 处选择编译出的 nuttx.bin 文件
|
||||
|
||||
设备在上电时确保 Boot 和 GND 短接,这是升级模式。
|
||||
|
||||
点击 ④ 处 Flash 开始烧录,显示烧录完成即可,中间有报错的话,重新 Flash。
|
||||
|
||||
烧写完毕重新上电,进入 shell。
|
||||
|
||||

|