Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
duo-buildroot-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
duo-buildroot-sdk
Commits
b773d8a7
Commit
b773d8a7
authored
Jul 05, 2023
by
carbon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme: Ubuntu 22.04 env setup
parent
bb782c05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
7 deletions
+88
-7
README.md
README.md
+88
-7
No files found.
README.md
View file @
b773d8a7
...
...
@@ -7,6 +7,11 @@
# 项目简介
-
Milk-V Duo是一个基于CV1800B芯片的超紧凑嵌入式开发平台。它可以运行Linux和RTOS,为专业人士、工业ODM厂商、AIoT爱好者、DIY爱好者和创作者提供了一个可靠、低成本和高性能的平台。
## 硬件参数
-
处理器: CVITEK CV1800B (C906@1Ghz + C906@700MHz)
-
内存: 64MB
-
网口: 10/100Mbps 以太网 (需外接扩展板)
<br>
# SDK目录结构
...
...
@@ -32,11 +37,15 @@
# 快速开始
## 准备编译环境
-
使用本地的Ubuntu系统,推荐
`Ubuntu 20.04 LTS`
(也可以使用虚拟机中的Ubuntu系统、Windows中WSL安装的Ubuntu、基于Docker的Ubuntu系统)
-
使用本地的Ubuntu系统,推荐
`Ubuntu 20.04 LTS`
<br>
(也可以使用虚拟机中的Ubuntu系统、Windows中WSL安装的Ubuntu、基于Docker的Ubuntu系统)
-
安装串口工具:
`mobarXterm`
或者
`Xshell`
或者其他
-
安装编译依赖的工具:
### Ubuntu 20.04 LTS 下需要安装的工具
安装编译依赖的工具:
```
sudo apt install pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils
android-sdk-ext4-utils jq python3-distutils tclsh scons parallel ssh-client tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtoo
ls
sudo apt install pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils
jq python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtools tclsh ssh-client android-sdk-ext4-uti
ls
```
注意:
`cmake`
版本最低要求
`3.16.5`
...
...
@@ -52,13 +61,36 @@ cmake version 3.16.3
```
wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh
chmod +x cmake-3.26.4-linux-x86_64.sh
sudo
./
cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr/local/
sudo
sh
cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr/local/
```
手动安装的
`cmake`
在
`/usr/local/bin`
中,此时用
`cmake --version`
命令查看其版本号, 应为
```
cmake version 3.26.4
```
### Ubuntu 22.04 LTS 下需要安装的工具
安装编译依赖的工具:
```
sudo apt install pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils jq python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtools tcl openssh-client cmake
```
另外,SDK中的mkimage命令依赖的libssl1.1,在Ubuntu22.04中已不存在,需要手动安装,以下两种方法都可以
1.
补源安装
```
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt update
sudo apt install libssl1.1
```
2.
手动下载deb包安装
```
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.23_amd64.deb
sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.23_amd64.deb
```
<br>
## 获取SDK
```
git clone https://github.com/milkv-duo/duo-buildroot-sdk.git
...
...
@@ -74,6 +106,19 @@ cd duo-buildroot-sdk/
*注: 第一次编译会自动下载所需的工具链,大小为840M左右,下载完会自动解压到SDK目录下的`host-tools`目录,下次编译时检测到已存在`host-tools`目录,就不会再次下载了*
如有需要分步编译,可依次输入如下命令
```
export MILKV_BOARD=milkv-duo
source milkv/boardconfig-milkv-duo.sh
source build/milkvsetup.sh
defconfig cv1800b_milkv_duo_sd
clean_all
build_all
pack_sd_image
```
生成的固件位置:
`install/soc_cv1800b_milkv_duo_sd/milkv-duo.img`
## SD卡烧录
> 注意: 将镜像写入TF卡会擦除卡中原有数据,记得在烧录前备份重要的数据!!!
...
...
@@ -85,9 +130,32 @@ cd duo-buildroot-sdk/
## 开机
-
将烧录好镜像的TF卡插入 Milk-V Duo 的TF卡槽中
-
接好串口线
-
接好串口线
(可选)
-
将平台上电,Duo会正常开机进入系统
-
串口工具中可以看到开机日志,进系统后可通过串口登入终端,执行Linux下的相关命令
-
如有接串口线,在串口工具中可以看到开机日志,进系统后可通过串口登入终端,执行Linux下的相关命令
### 登陆到Duo终端的方法
-
通过串口线
-
通过USB网卡(RNDIS)方式
-
通过以太网接口(需要扩展板支持)
登陆Duo终端的用户名和密码分别为
```
root
milkv
```
### 禁用LED闪烁
上电后LED会自动闪烁,这个是通过开机脚本实现的,如果需要禁用LED闪烁功能,在Duo的终端中执行:
```
mv /mnt/system/blink.sh /mnt/system/blink.sh_backup && sync
```
也就是将LED闪烁脚本改名,重启Duo后,LED就不闪了
<br>
如果需要恢复LED闪烁,再将其名字改回来,重启即可
```
mv /mnt/system/blink.sh_backup /mnt/system/blink.sh && sync
```
<br>
...
...
@@ -99,7 +167,20 @@ cd duo-buildroot-sdk/
2.
为什么查看RAM只显示28M?
因为有一部分RAM被分配绐了
[
ION
](
https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/default/dts/cv180x/cv180x_default_memmap.dtsi#L15
)
,您可以修改这个
[
ION_SIZE
](
https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/cv180x/cv1800b_milkv_duo_sd/memmap.py#L43
)
的值然后重新编译生成固件.
因为有一部分RAM被分配绐了
[
ION
](
https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/default/dts/cv180x/cv180x_default_memmap.dtsi#L15
)
,是在使用摄像头跑算法时需要占用的内存。如果不使用摄像头,您可以修改这个
[
ION_SIZE
](
https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/cv180x/cv1800b_milkv_duo_sd/memmap.py#L43
)
的值为
`0`
然后重新编译生成固件
<br>
## 芯片原厂一些资料的链接
-
CV181x/CV180x MMF SDK 开发文档汇总
<br>
[
https://developer.sophgo.com/thread/471.html
](
https://developer.sophgo.com/thread/471.html
)
-
CV系列芯片 TPU SDK 开发资料汇总
<br>
[
https://developer.sophgo.com/thread/473.html
](
https://developer.sophgo.com/thread/473.html
)
<br>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment