DragonOS/docs/introduction/build_system.md

32 lines
1.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

# 构建DragonOS
## 软件依赖
- GNU make
- GCC >= 8.3.0
- xorriso
- grub 2.06
## 开发环境
目前DragonOS在Deepin V20上进行开发。经测试在Debian bullseye上可以正常编译、运行。建议使用Docker运行debian镜像进行开发。后期将会发布开发环境的docker镜像
## 运行环境
1. qemu 6.2.0编译安装并启用gdb调试选项
2. gdb
3. VNC Viewer
## 编译DragonOS
1. 安装编译及运行环境
2. 进入DragonOS文件夹
3. 输入命令:`make -j 16`即可编译
## 运行DragonOS
在运行DragonOS之前需要先使用tools目录下的脚本创建一至少为16MB磁盘镜像类型选择raw。并建立MBR分区表然后将第一个分区格式化为FAT32分区。
在完成以上操作后将创建的磁盘文件移动至bin文件夹若不存在则需要您手动创建并将其重命名为“disk.img”
最后在DragonOS目录下运行 `bash run.sh`脚本将会完成编译、文件拷贝、内核镜像打包、启动qemu虚拟机的全过程。当qemu虚拟机启动后即可使用VNC Viewer连接到虚拟机。