hzcx998 / Xbook2
Licence: mit
xbook2是一个基于x86处理器的32位操作系统,实现了大量的基础功能,可以拿来学习操作系统知识。
Stars: ✭ 273
Programming Languages
c
50402 projects - #5 most used programming language
Projects that are alternatives of or similar to Xbook2
Macaron
A sweet hobby made operating system written in C++ for x86 CPUs with GUI
Stars: ✭ 34 (-87.55%)
Mutual labels: kernel, os, x86
TravorOS
A simple OS running on Intel x86 architecture | No longer updating
Stars: ✭ 24 (-91.21%)
Mutual labels: kernel, os, x86
RocketOS
RocketOS is a Unix based OS that uses legacy BIOS and GRUB and is written in C17. It is being developed for educational purposes primarily, but it still is a serious project. It is currently in its infancy.
Stars: ✭ 23 (-91.58%)
Mutual labels: kernel, os, x86
Ghost
Ghost, a micro-kernel based hobby operating system for the x86 architecture.
Stars: ✭ 353 (+29.3%)
Mutual labels: x86, kernel, os
Toaru Nih
NOTICE: The ToaruOS-NIH Project has been MERGED UPSTREAM. This repository is now archived.
Stars: ✭ 66 (-75.82%)
Mutual labels: x86, kernel, os
Dennix
Dennix is a unix-like hobbyist operating system written from scratch.
Stars: ✭ 53 (-80.59%)
Mutual labels: x86, kernel, os
Toaruos
A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
Stars: ✭ 4,687 (+1616.85%)
Mutual labels: x86, kernel, os
Reactos
A free Windows-compatible Operating System
Stars: ✭ 10,216 (+3642.12%)
Mutual labels: x86, kernel, os
nightingale
A small operating system where I experiment and learn osdev.
Stars: ✭ 86 (-68.5%)
Mutual labels: kernel, os
Sigma
Abandoned overcomplicated Microkernel using modern x86_64 features
Stars: ✭ 36 (-86.81%)
Mutual labels: kernel, os
KnutOS
An x86_64 hobbyist OS written in C and Assembly
Stars: ✭ 16 (-94.14%)
Mutual labels: kernel, os
LanOS
one mini operating system simplified from linux0.12
Stars: ✭ 61 (-77.66%)
Mutual labels: os, x86
GENADEV OS
An AArch64 hobbyist OS for the Raspberry Pi 3 B+
Stars: ✭ 14 (-94.87%)
Mutual labels: kernel, os
xbook2操作系统内核
xbook2操作系统内核是一个基于intel x86平台的32位处理器的系统内核,可运行在qemu,bochs,virtual box,vmware等虚拟机中。也可以在物理机上面运行(需要有系统支持的驱动才行)
xbook2被设计成一个跨处理器平台的架构,有ARCH目录,可以在里面添加一个新的处理器平台。不过目前也是尽量将平台相关的分离到arch里面,并为完全分离出来,待后面多实现几个平台后,才能更好的让处理器平台和内核部分进行更优化的分离。
内核结构示意图:
USER MODE:
+---------------------------+
| libs | apps |
+---------------------------+
KERNEL MODE:
+---------------------------+
| FSAL |
+---------------------------+
+---------------------------+
|task | ipc | vmm | drivers |
+---------------------------+
| arch |
+---------------------------+
\ /
+---------------------------+
| hardware |
+---------------------------+
目录 | 描述 |
---|---|
develop | 开发时用到的磁盘镜像,ROM文件系统内容等 |
doc | 操作系统相关的文档 |
scripts | 用到的xbuild脚本和其它配置文件 |
src | xbook2内核的源码 |
tools | 内核开发需要用到的工具 |
user | 和用户相关的内容,库,应用程序等 |
系统功能列表:
多进程,内核多线程,用户多线程
虚拟内存管理,分页内存管理,物理内存管理
管道通信,共享内存,消息队列,信号量
IDE硬盘驱动,PS/2鼠标,键盘驱动,VBE视频驱动
UART串口驱动
FATFS文件系统
PTHREAD线程库
开发环境准备(Windows/Linux):
整体思路:
1. 用git从仓库克隆源码或者直接下载源码。
2. 配置最基础的工具集:gcc, nasm, ld, dd, rm, objdump, objcopy。
3. 配置虚拟机:qemu(默认),bochs,virtual box, vmware任选其一。
5. 进入xbook2的根目录目录,打开终端或者命令行,输入命令make build先构建环境,然后make run编译运行。
Windows环境搭建
1.下载我提取的工具包:http://www.book-os.org/tools/BuildTools-v7.zip, 下载后配置解压目录环境变量到系统环境变量Path里面。(注意,如果你的电脑上已经有mingw或者cygwin环境,请把这个工具包的环境变量放到靠前的位置,不然不会执行工具包里面的程序)
2.下载qemu最新版:https://www.qemu.org/ 下载后安装,配置安装目录环境变量到系统环境变量Path里面,或者下载我提取的版本:http://www.book-os.org/tools/Qemu-i386.rar,下载后配置解压目录环境变量到系统环境变量Path里面。
3.下载windows下面的qemu加速扩展程序HAXM v7.6.5:https://github.com/intel/haxm/releases,下载后安装即可.
Linux环境搭建
1.安装gcc, nasm:
Ubuntu/Kali Linux: sudo apt-get install gcc nasm
Red hat/Fedora/Centos: sudo yum install gcc nasm
2.安装qemu虚拟机:
Ubuntu/Kali Linux: sudo apt-get install qemu-system-x86
Red hat/Fedora/Centos: sudo yum install qemu-system-x86
编译时build后直接run即可(可加-jn参数多线程编译,n是线程数。):
> make build # 构建环境
> make run # 编译并运行,默认使用qemu虚拟机运行
编译时可用的命令:
> make # 只编译源码
> make build # 构建环境
> make debuild # 清理环境
> make run # 编译并运行,默认使用qemu虚拟机运行
> make qemu # 使用qemu虚拟机运行
> make clean # 清除编译产生的对象文件以及可执行文件
> make user # 只编译用户程序(在开发应用时常用)
> make user_clean # 只清除用户态生成的内容
联系方式:
开源官网:www.book-os.org
E-mail: [email protected]
个人邮箱:[email protected]
个人QQ: 2323168280
开发交流QQ群:913813452
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].