Browse Source

Add readme files.

lihm 3 years ago
commit
1f0b0f205d
2 changed files with 60 additions and 0 deletions
  1. BIN
      ice_evb_book_20210110_v0.1.pdf
  2. 60 0
      riscv yocto 仓库构建说明.md

BIN
ice_evb_book_20210110_v0.1.pdf


+ 60 - 0
riscv yocto 仓库构建说明.md

@@ -0,0 +1,60 @@
+# Riscv Yocto 仓库构建说明
+
+## 仓库下载
+
+1. 为了加速软件下载,所有用到的软件仓库都放在 `https://gitee.com/thead-yocto` 下。
+
+2. 因为要使用 repo 管理,下载软件仓库,需要在 PC 上预先安装好 git,repo 等工具。
+
+   repo 建议使用清华源加速,安装设置参考:`https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/`
+
+3. 软件仓库下载:
+
+   ```bash
+   mkdir riscv_yocto
+   cd riscv_yocto
+   repo init -u git@gitee.com:thead-yocto/meta-riscv.git  -b master -m tools/manifests/riscv-yocto.xml
+   repo sync -c -d -j16
+   ```
+
+
+
+## 工具链安装
+
+1. 下载工具链 + sysroot 软件:host.gcc-8.1.0.tar.gz
+
+2. 安装工具链
+
+   ```bash
+   mkdir ~/.thead
+   
+   # 将下载的 host.gcc-8.1.0.tar.gz 解压到 ~/.thead
+   tar zxf host.gcc-8.1.0.tar.gz -C ~/.thead
+   
+   # 也可以将工具链放到其他位置,同时修改 meta_riscv/conf/machine/include/thead-base.inc 即可
+   ```
+
+
+
+## 编译
+
+1. 编译
+
+   ```bash
+   source meta-riscv/setup.sh
+   
+   # 确认 downloads 文件夹:设置一个存放 yocto 下载文件的共享目录 SHARE_YOCTO_DOWNLOAD_FILE_FOLDER
+   ln -s SHARE_YOCTO_DOWNLOAD_FILE_FOLDER/ downloads
+   
+   # 编译:MACHINE 也可以在配置文件中设置为默认 ice
+   MACHINE=ice bitbake core-image-minimal
+   ```
+
+2. 输出
+
+   ```bash
+   # 镜像文件
+   ./build/tmp-glibc/deploy/images/ice
+   ```
+
+