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

🚀 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.


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 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


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


cpp assembly


Share


YouTube channel

Subscribe


Marcos Oliveira

Marcos Oliveira

Software developer
https://github.com/terroo

Related articles