Implementation practices of an operating system
I recently looked at the implementation of an operating system and encountered many problems. However, they have all been resolved, so I am writing a blog here and hope it will be helpful to my friends.
First, we need to write the operating system in the Linux system, so I installed the Vwmare Virtual Machine and Ubuntu system.
After installing nasm, bochs, gcc, g ++, and build-essential tail, we started to build our own environment.
When building the environment, you will encounter the following problems:
1: ROM: couldn't open ROM image file '/usr/share/bochs/BIOS-bochs-latest
We need to change: romimage: file =/usr/share/bochs/BIOS-bochs-latest to romimage: file =/usr/local/share/bochs/BIOS-bochs-latest #/usr/share/bochs/BIOS-bochs-latest
2: Can not stat keymap file '/usr/share/... map' (too lazy to hit all)
We need:
Keyboard_mapping: enabled = 1, map =/usr/share/bochs/keymaps/x11-pc-us.map changed to keyboard_mapping: enabled = 1, map =/usr/local/share/bochs/keymaps/x11-pc-us.map #/usr/share/bochs/keymaps/x11-pc-us.map
Finally, we can change dump_cpu to r at runtime.
The last figure is shown below: