How to Create a Simple Operating System (Kernel Only) with C++

🔊 In this video I showed step by step the process to create a kernel which is the basis for an Operating System. The boot was performed on the physical machine and we were able to print directly to the VGA with a 32-bit system made with C++ and GNU Ass…


This content originally appeared on DEV Community and was authored by Marcos Oliveira

🔊 In this video I showed step by step the process to create a kernel which is the basis for an Operating System. The boot was performed on the physical machine and we were able to print directly to the VGA with a 32-bit system made with C++ and GNU Assembler.

To build on your machine

Use the package manager to install GCC, make, as and ld

sudo apt install build-essential

Clone the repository and compile:

Then just compile:

git clone https://github.com/terroo/terminalroot-os
cd terminal-root-os/
make

To test on QEMU, for example

sudo apt install qemu-kvm

And then test:

qemu-system-i386 -kernel terminal-root-os.bin

Even with qemu-system-x86-64 -kernel terminal-root-os.bin.

If you have a virtual or physical machine with GRUB Legacy, you can move to /boot and edit grub.cfg:

Example:

sudo mv terminal-root-os.bin /boot/
sudo vim /boot/grub/grub.cfg

Add a new entry to GRUB:

### BEGIN TERMINALROOTOS

menuentry 'Terminal Root OS' {
  multiboot /boot/terminal-root-os.bin
  boot
}
### END TERMINALROOTOS

Watch the Video

The video is in Portuguese, but you can use Youtube's automatic translator

How to Create a Simple Operating System (Kernel Only) with C++

Click on the image to watch the video

Terminal Root OS repository on GitHub: https://github.com/terroo/terminalroot-os.


This content originally appeared on DEV Community and was authored by Marcos Oliveira


Print Share Comment Cite Upload Translate Updates
APA

Marcos Oliveira | Sciencx (2025-02-14T21:30:33+00:00) How to Create a Simple Operating System (Kernel Only) with C++. Retrieved from https://www.scien.cx/2025/02/14/how-to-create-a-simple-operating-system-kernel-only-with-c/

MLA
" » How to Create a Simple Operating System (Kernel Only) with C++." Marcos Oliveira | Sciencx - Friday February 14, 2025, https://www.scien.cx/2025/02/14/how-to-create-a-simple-operating-system-kernel-only-with-c/
HARVARD
Marcos Oliveira | Sciencx Friday February 14, 2025 » How to Create a Simple Operating System (Kernel Only) with C++., viewed ,<https://www.scien.cx/2025/02/14/how-to-create-a-simple-operating-system-kernel-only-with-c/>
VANCOUVER
Marcos Oliveira | Sciencx - » How to Create a Simple Operating System (Kernel Only) with C++. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/14/how-to-create-a-simple-operating-system-kernel-only-with-c/
CHICAGO
" » How to Create a Simple Operating System (Kernel Only) with C++." Marcos Oliveira | Sciencx - Accessed . https://www.scien.cx/2025/02/14/how-to-create-a-simple-operating-system-kernel-only-with-c/
IEEE
" » How to Create a Simple Operating System (Kernel Only) with C++." Marcos Oliveira | Sciencx [Online]. Available: https://www.scien.cx/2025/02/14/how-to-create-a-simple-operating-system-kernel-only-with-c/. [Accessed: ]
rf:citation
» How to Create a Simple Operating System (Kernel Only) with C++ | Marcos Oliveira | Sciencx | https://www.scien.cx/2025/02/14/how-to-create-a-simple-operating-system-kernel-only-with-c/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.