xuos-web/docs/doc/constructenv/bianyi.md

111 lines
4.0 KiB
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 编译环境
## 前言
<el-divider></el-divider>
<p style="text-indent:2em">本文档将介绍如何在个人pc设备上构建编译环境来编译 <B>XiUOS</B>
操作系统, 需要注意的是, 目前 <B>XiUOS</B> 暂时只支持在Linux系统上编译。</p>
## 硬件安装
<el-divider></el-divider>
> * 硬件要求
>> 64位系统磁盘空间大于40G。
> * linux内核下载
>> 因为<B>XiUOS</B>是在Ubuntu 16.04上开发与测试的(Ubuntu 18.04、20.04版本也支持因此我们推荐您使用Ubuntu 16.04版本的系统执行编译环境搭建。
> * Ubuntu下载网址
>> [here](https://ubuntu.com/download/desktop)
## 依赖包安装
<el-divider></el-divider>
$ 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
## 源码下载
<el-divider></el-divider>
> * 简要介绍
>> <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)
## 工具链
<el-divider></el-divider>
> * 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下烧写软件ST-LINK
>> 下载源码
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
## FAQ
<el-collapse v-model="activeName" accordion>
<el-collapse-item title="Question 1: XiUOS源码下载起来特别慢怎么办" name="1">
> 尝试借助gitee下载源码
</el-collapse-item>
<el-collapse-item title="Question 2: 编程过程是xxx错误" name="2">
> * Operation feedback: enable the users to clearly perceive their operations by style updates and interactive effects;
> * Visual feedback: reflect current state by updating or rearranging elements of the page.
</el-collapse-item>
<el-collapse-item title="Question 3" name="3">
> * Simplify the process: keep operating process simple and intuitive;
> * Definite and clear: enunciate your intentions clearly so that the users can quickly understand and make decisions;
> * Easy to identify: the interface should be straightforward, which helps the users to identify and frees them from memorizing and recalling.
</el-collapse-item>
<el-collapse-item title="Question 4" name="4">
> * Decision making: giving advices about operations is acceptable, but do not make decisions for the users;
> * Controlled consequences: users should be granted the freedom to operate, including canceling, aborting or terminating current operation.
</el-collapse-item>
</el-collapse>
<script>
export default {
data() {
return {
activeName: '1'
};
}
}
</script>