From 3fca6e5a1db78d43882341d11b49725efcd45770 Mon Sep 17 00:00:00 2001 From: carbon Date: Wed, 14 Jun 2023 14:45:38 +0800 Subject: [PATCH] update the readme file --- README.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ef00b686c..6bdd1a112 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,89 @@
# 项目简介 -- Milk-V Duo is an ultra-compact embedded development platform based on the CV1800B chip. It can run Linux and RTOS, providing a reliable, low-cost, and high-performance platform for professionals, industrial ODMs, AIoT enthusiasts, DIY hobbyists, and creators. +- Milk-V Duo是一个基于CV1800B芯片的超紧凑嵌入式开发平台。它可以运行Linux和RTOS,为专业人士、工业ODM厂商、AIoT爱好者、DIY爱好者和创作者提供了一个可靠、低成本和高性能的平台。 + +
+ +# SDK目录结构 +``` +├── build // 编译目录,存放编译脚本以及各board差异化配置 +├── build_milkv.sh // Milk-V Duo 一键编译脚本 +├── buildroot-2021.05 // buildroot开源工具 +├── freertos // freertos系统 +├── fsbl // fsbl启动固件,prebuilt形式存在 +├── install // 执行一次完整编译后,临时存放各image路径 +├── isp_tuning // 图像效果调试参数存放路径 +├── linux_5.10 // 开源linux内核 +├── middleware // 自研多媒体框架,包含so与ko +├── milkv // 存放 Milk-V Duo 相关配置及脚本文件的目录 +├── opensbi // 开源opensbi库 +├── out // Milk-V Duo 最终生成的SD卡烧录镜像所在目录 +├── ramdisk // 存放最小文件系统的prebuilt目录 +└── u-boot-2021.10 // 开源uboot代码 +``` + +
+ +# 快速开始 + +## 准备编译环境 +- 使用本地的Ubuntu系统,推荐 `Ubuntu 20.04 LTS` (也可以使用虚拟机中的Ubuntu系统、Windows中WSL安装的Ubuntu、基于Docker的Ubuntu系统) +- 安装串口工具: `mobarXterm` 或者 `Xshell` 或者其他 +- 安装编译依赖的工具: +``` +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 +``` +注意:`cmake` 版本最低要求 `3.16.5` + +查看系统中 `cmake` 的版本号 +``` +cmake --version +``` +当前`Ubuntu 20.04`中用apt安装的cmake版本号为 +``` +cmake version 3.16.3 +``` +不满足此SDK最低要求,需要手动安装目前最新的`3.26.4`版本 +``` +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/ +``` +手动安装的`cmake`在`/usr/local/bin`中,此时用`cmake --version`命令查看其版本号, 应为 +``` +cmake version 3.26.4 +``` + +## 获取SDK +``` +git clone https://github.com/milkv-duo/milkv-duo-buildroot-sdk.git +``` + +## 一键编译 +- 执行一键编译脚本`build_milkv.sh` +``` +cd milkv-duo-buildroot-sdk/ +./build_milkv.sh +``` +- 编译成功后可以在`out`目录下看到生成的SD卡烧录镜像`milkv-duo-XXX.img` + +*注: 第一次编译会自动下载所需的工具链,大小为840M左右,下载完会自动解压到SDK目录下的`host-tools`目录,下次编译时检测到已存在`host-tools`目录,就不会再次下载了* + +## SD卡烧录 + +> 注意: 将镜像写入TF卡会擦除卡中原有数据,记得在烧录前备份重要的数据!!! +- Window下使用`balenaEtcher`或者`Rufus`或者`Win32 Disk Imager`等工具将生成的镜像写入TF卡中 +- Linux下使用`dd`命令将生成的镜像写入TF卡中,**请务必仔细确认`of`设备`/dev/sdX`为要烧录的TF卡** + ``` + sudo dd if=milkv-duo-XXX.img of=/dev/sdX + ``` + +## 开机 +- 将烧录好镜像的TF卡插入 Milk-V Duo 的TF卡槽中 +- 接好串口线 +- 将平台上电,Duo会正常开机进入系统 +- 串口工具中可以看到开机日志,进系统后可通过串口登入终端,执行Linux下的相关命令