4.0 KiB
Executable File
编译环境
前言
本文档将介绍如何在个人pc设备上构建编译环境来编译 XiUOS 操作系统, 需要注意的是, 目前 XiUOS 暂时只支持在Linux系统上编译。
硬件安装
- 硬件要求
64位系统,磁盘空间大于40G。
- linux内核下载
因为XiUOS是在Ubuntu 16.04上开发与测试的(Ubuntu 18.04、20.04版本也支持),因此我们推荐您使用Ubuntu 16.04版本的系统执行编译环境搭建。
- Ubuntu下载网址
依赖包安装
$ 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
源码下载
- 简要介绍
XiUOS的源码和相关文档介绍使用git进行集成管理,建议开发者使用git工具进行版本控制和分支管理
- git配置
$ git config --global user.name "your name"
$ git config --global user.email "your email"
工具链
- ARM下编译需要安装arm-none-eabi编译工具, 安装到Ubuntu的默认路径/usr/bin/arm-none-eabi-
- 命令行下载
$ sudo apt-get install gcc-arm-none-eabi
- 源码下载
- RISC-V下编译需要安装riscv-none-embed-编译工具, 安装到Ubuntu的默认路径/opt/
下载网址, 根据需求选择不同的版本 操作方法,以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
尝试借助gitee下载源码
- 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.
- 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.
- 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.