modify the content of appdev/env.md
This commit is contained in:
parent
6d709ca3f5
commit
90324b8dfc
|
@ -1,67 +1,80 @@
|
|||
# 开发环境
|
||||
|
||||
## 前言
|
||||
<p style="text-indent:2em">本文档将介绍如何在个人pc设备上构建编译环境来编译 <B>XiUOS</B>
|
||||
本文档将介绍如何在个人pc设备上构建编译环境来编译 <B>XiUOS</B>
|
||||
操作系统, 需要注意的是, 目前 <B>XiUOS</B> 暂时只支持在Linux系统上编译。</p>
|
||||
|
||||
## 硬件安装
|
||||
> * 硬件要求
|
||||
>> 64位系统,磁盘空间大于40G。
|
||||
> * linux内核下载
|
||||
>> 因为<B>XiUOS</B>是在Ubuntu 16.04上开发与测试的(Ubuntu 18.04、20.04版本也支持),因此我们推荐您使用Ubuntu 16.04版本的系统执行编译环境搭建。
|
||||
> * Ubuntu下载网址
|
||||
>> [here](https://ubuntu.com/download/desktop)
|
||||
* 硬件要求
|
||||
64位系统,磁盘空间大于40G。
|
||||
* linux内核下载
|
||||
因为<B>XiUOS</B>是在Ubuntu 16.04上开发与测试的(Ubuntu 18.04、20.04版本也支持),因此我们推荐您使用Ubuntu 16.04版本的系统执行编译环境搭建。
|
||||
* Ubuntu下载网址
|
||||
[here](https://ubuntu.com/download/desktop)
|
||||
|
||||
|
||||
## 依赖包安装
|
||||
$ sudo apt-get install gcc
|
||||
$ sudo apt-get install make
|
||||
$ sudo apt-get install libncurses5-dev
|
||||
$ sudo apt-get install openssl
|
||||
$ sudo apt-get install libssl-dev
|
||||
$ sudo apt-get install build-essential
|
||||
$ sudo apt-get install pkg-config
|
||||
$ sudo apt-get install libc6-dev
|
||||
$ sudo apt-get install bison
|
||||
$ sudo apt-get install flex
|
||||
$ sudo apt-get install libelf-dev
|
||||
$ sudo apt-get install autoconf
|
||||
$ sudo apt-get install libtool
|
||||
$ sudo apt-get install gpref
|
||||
## 源码下载
|
||||
> * 简要介绍
|
||||
>> <B>XiUOS</B>的源码和相关文档介绍使用git进行集成管理,建议开发者使用git工具进行版本控制和分支管理
|
||||
> * git配置
|
||||
|
||||
$ git config --global user.name "your name"
|
||||
$ git config --global user.email "your email"
|
||||
> * [XiUOS源码网址](https://ubuntu.com/download/desktop)
|
||||
```shell
|
||||
$ sudo apt-get install gcc
|
||||
$ sudo apt-get install make
|
||||
$ sudo apt-get install libncurses5-dev
|
||||
$ sudo apt-get install openssl
|
||||
$ sudo apt-get install libssl-dev
|
||||
$ sudo apt-get install build-essential
|
||||
$ sudo apt-get install pkg-config
|
||||
$ sudo apt-get install libc6-dev
|
||||
$ sudo apt-get install bison
|
||||
$ sudo apt-get install flex
|
||||
$ sudo apt-get install libelf-dev
|
||||
$ sudo apt-get install autoconf
|
||||
$ sudo apt-get install libtool
|
||||
$ sudo apt-get install gpref
|
||||
```
|
||||
## 源码下载
|
||||
<B>XiUOS</B>的源码和相关文档介绍使用git进行集成管理,建议开发者使用git工具进行版本控制和分支管理
|
||||
|
||||
git配置执行以下命令
|
||||
```shell
|
||||
$ git config --global user.name "your name"
|
||||
$ git config --global user.email "your email"
|
||||
```
|
||||
其中,源码下载网址点击该链接[XiUOS源码网址](https://ubuntu.com/download/desktop)
|
||||
|
||||
## 工具链
|
||||
> * ARM下编译需要安装<B>arm-none-eabi</B>编译工具, 安装到Ubuntu的默认路径/usr/bin/arm-none-eabi-
|
||||
>> 1. 命令行下载
|
||||
>>> $ sudo apt-get install gcc-arm-none-eabi
|
||||
>> 2. 源码下载
|
||||
>>> [ARM官网下载](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
|
||||
> * RISC-V下编译需要安装<B>riscv-none-embed-</B>编译工具, 安装到Ubuntu的默认路径/opt/
|
||||
>> [下载网址](https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/), 根据需求选择不同的版本
|
||||
>> 操作方法,以xpack-riscv-none-embed-gcc-linux-x64.tar.gz为例
|
||||
>>> $ tar -zxvf xpack-riscv-none-embed-gcc-linux-x64.tar.gz -C /opt/
|
||||
* ARM下编译需要安装<B>arm-none-eabi</B>编译工具, 安装到Ubuntu的默认路径/usr/bin/arm-none-eabi-,使用如下命令行下载
|
||||
|
||||
```shell
|
||||
$ sudo apt-get install gcc-arm-none-eabi
|
||||
```
|
||||
|
||||
* 源码下载,下载网址
|
||||
[ARM官网下载](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
|
||||
RISC-V下编译需要安装<B>riscv-none-embed-</B>编译工具, 安装到Ubuntu的默认路径/opt/
|
||||
[下载网址](https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/), 根据需求选择不同的版本
|
||||
操作方法,以xpack-riscv-none-embed-gcc-linux-x64.tar.gz为例
|
||||
|
||||
```shell
|
||||
$ tar -zxvf xpack-riscv-none-embed-gcc-linux-x64.tar.gz -C /opt/
|
||||
```
|
||||
## 烧写工具
|
||||
> * ARM下烧写软件(ST-LINK)
|
||||
>> 下载源码
|
||||
|
||||
git clone https://github.com/texane/stlink.git
|
||||
* ARM下烧写软件(ST-LINK)
|
||||
下载源码
|
||||
|
||||
```shell
|
||||
git clone https://github.com/texane/stlink.git
|
||||
```
|
||||
|
||||
|
||||
> * RISC-V下烧写软件(KFLASH)
|
||||
|
||||
$ sudo pip3 install kflash
|
||||
// 如果在安装工具失败,则执行一下命令
|
||||
$ sudo python -m pip install kflash
|
||||
$ sudo python3 -m pip install kflash
|
||||
$ sudo pip install kflash
|
||||
$ sudo pip2 install kflash
|
||||
* RISC-V下烧写软件(KFLASH)
|
||||
|
||||
```shell
|
||||
$ sudo pip3 install kflash
|
||||
// 如果在安装工具失败,则执行一下命令
|
||||
$ sudo python -m pip install kflash
|
||||
$ sudo python3 -m pip install kflash
|
||||
$ sudo pip install kflash
|
||||
$ sudo pip2 install kflash
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
|
Loading…
Reference in New Issue