基於树莓派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.