Let's start!
C language and x86 assembly
Of course, you only need a simple assembly foundation. As for C language, you don’t need a lot of knowledge to understand the process from source files to executable files.
Basic linux commands
In simple kernel compilation, we used some tools under linux , such as nasm , and of course there are also them in windows , including gcc . But the compilation process is done in linux virtual machine.
What tools will we use?
Notepad++ , sublime , etc., the simplest notepad is OK.sublime tool itself can be displayed in 16 form, and the virtual machine also has tools to help us parse.linux virtual machine, we are using Ubuntu i386 here. Need to install tools nasm , vim , gcc , readelf , etc.Of course, you don’t have to worry. When using these tools or materials, there will be hyperlinks in the article, you can download and review it. At the same time, there is also a lot of information on the Internet for you to read.
What's the final result?
Finally, of course, it is not a very complete operating system. This is more like a research exploration and understanding of OS , as well as the relationship between C language and assembly, and finally, it is an understanding of how hardware and software deal with it.
In 7 parts, we only completed power-on and power-on, loading the main boot sector, and then loading more information into memory. Finally, we simply implemented the implementation of the protection mode from real mode. That's all, but the prototype of the operating system is roughly the same.
Throughout the process, we referenced some videos and electronic textbooks
[1] " 30 -day homemade operating system"
[2] "Implementation of an Oranges Operating System"
[3] 51CTO
etc.
The main reference is e-books [2] . The content in [1] is more comprehensive, and the final result is more complete.
The source files and notes are uploaded to GitHub together. If you have any questions, you can also contact me at [email protected] . Each folder is an independent structure, and the compiled binary files are not uploaded, but the source code and tools are uploaded.