基于树莓派3和ARMv8-AArch64架构,实现一个微型操作系统内核。
工程采用 overview + subprojects 的方式进行组织, overview存放所有的代码,各个subproject按照自身的需求使用这些代码,包括过滤掉不需要的文件(将它们排除在编译之外)。
工程使用现代C++语言开发,主要的目标体系结构是ARMv8。工程所使用的编译器是g++,因此代码中会包含一些g++的语法扩展,比如__attribute__, __asm__。
此外,编译
此工程基于eclipse (version >= 4.6.3), 在编译时,你需要使用合适的eclipse版本,在Windows,Linux或者MacOS上,选择 File -> Open Projects from File System -> 点击Directory,选择该工程所在的目录,打开 -> Finish 即可
工程有多个子工程,其中主要有:host,qemu_virt,raspi3和user_space。
这些个配置分别对应的目标(架构)是:基于宿主主机操作系统的开发(主要用于测试内存管理和其他架构无关的功能),基于QEMU的模拟的开发(用于测试虚拟内存、中断等),基于树莓派3的开发(用于综合验证),用户空间的程序。
所有的子工程均位于subprojects下。
工程配置了一些特殊的构建目标。参见工程的Build Targets。
在内核中,避免使用全局变量 实际上可以专门使用一个初始化所有需要定义的全局变量 那些变量使用方便不过是因为它们在编译期已经分配好了空间。如果一定要使用,在定义处定义一次,同时在初始化函数中重新定义一次。
如果更改了工程的配置,必须重新开启新的命令行,因为所有的eclipse环境都会被导出。
工程进度总览参考 Progress_Current.md
工程记录参考 RECORDING_NOTE.md
子工程的结构和配置,参考 subprojects/README.md
In Progress(maybe MIT-LICENCE, but may be closed again, it now is half-open and half-closed).
No, make it POSIX instead.
-
Follow some coding rules that may be laterly referenced here
-
Read the document that may be laterly published
-
Using qemu to debug some demostration program
-
Try to change kernel's code,rerun.
-
Then, git add -A && git commit && git push !
see here, also see external document.
rsp3-armv8-baremetal , the original project.
linux , Linux, officially.
qemu , an emulator that helps a lot.
gVisor , a user space kernel, by Google, in Go.
User Mode Linux(UML) , as its name says.
x2 , an ancient kernel on Bochs.
raspi3 tutorial, by bzt, very useful for beginners.
armv8 hello world, hello world example for armv8,based on QEMU,useful for beginners.