# ChinOS **Repository Path**: jingjin666/ChinOS ## Basic Information - **Project Name**: ChinOS - **Description**: ChinOS....................... - **Primary Language**: C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-15 - **Last Updated**: 2024-08-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ChinOS #### 介绍 ChinOS是为了研究SeL4微内核自己魔改的微内核操作系统,仅供学习使用。 #### 构建环境 * 主机:Ubuntu18.04LTS * 编译器:ARM-GCC * 编译工具:GN + Ninja * 内核配置工具:Kconfig(menuconfig) #### 软件架构 软件架构说明 #### 编译流程 * ./configure.sh sun8iw11p * make menuconfig * make 固件最后生成在out/image/文件夹里 #### 环境构建 ##### Ninja构建 安装依赖 ```shell sudo apt install re2c re2c --version ``` 下载Ninja ```shell git clone https://github.com/ninja-build/ninja.git ``` 编译安装 ```shell ./configure.py --bootstrap sudo cp ninja /usr/bin ninja --version ``` ##### GN构建 安装依赖 ```shell sudo apt-get install clang-7 ``` 修改软连接 ```shell cd /usr/bin sudo ln -s clang-7 clang sudo ln -s clang++-7 clang++ sudo ln -s clang-cpp-7 clang-cpp clang++ --version ``` 下载GN ```shell git clone https://github.com/timniederhausen/gn.git ``` 编译安装 ```shell ./build/gen.py ninja -C out sudo cp ./out/gn /usr/bin gn --version ``` ##### Kconfig构建 依赖安装 ```shell sudo apt install \ bison flex gettext texinfo libncurses5-dev libncursesw5-dev \ gperf automake libtool pkg-config build-essential gperf genromfs \ libgmp-dev libmpc-dev libmpfr-dev libisl-dev binutils-dev libelf-dev \ libexpat-dev gcc-multilib g++-multilib picocom u-boot-tools util-linux ``` 下载Kconfig ```shell git clone https://bitbucket.org/nuttx/tools.git ``` 编译安装 ```shell cd tools/kconfig-frontends ./configure --enable-mconf --disable-nconf --disable-gconf --disable-qconf make # make isntall must use sudo sudo make isntall ``` 添加环境变量 ```shell vim ~/.bashrc export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH source ~/.bashrc ``` ##### Toolchain构建 编译链下载 ```shell # Download url https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads # Linux x86_64 Tarball gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 ``` 编译链安装 ```shell tar xvf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 ``` 添加环境变量 ```shell vim ~/.bashrc export PATH=/home/luffy/Workspace/tools/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH source ~/.bashrc ``` #### VMA ![输入图片说明](Virtual%20Address%20Space.png)