DEV Community

Cover image for Como Criar um Simples Sistema Operacional(só o Kernel) com C++
Marcos Oliveira
Marcos Oliveira

Posted on

1

Como Criar um Simples Sistema Operacional(só o Kernel) com C++

🔊 Nesse vídeo mostrei passo a passo do processo para criar um kernel que é a base para um Sistema Operacional. O boot foi realizado na máquina física e conseguimos printar direto na VGA com um sistema de 32-bit feito com C++ e GNU Assembler.


Para construir na sua máquina

Use o gerenciador de pacotes para instalar o GCC, make, as e ld

sudo apt install build-essential
Enter fullscreen mode Exit fullscreen mode

Clone o repositório e compile:

Depois é só compilar:

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

Para testar no QEMU, por exemplo

sudo apt install qemu-kvm
Enter fullscreen mode Exit fullscreen mode

E então testar:

qemu-system-i386 -kernel terminal-root-os.bin
Enter fullscreen mode Exit fullscreen mode

Até com o qemu-system-x86-64 -kernel terminal-root-os.bin.

Se você tem uma máquina virtual ou física com GRUB Legacy, você pode mover pro /boot e editar o grub.cfg:

Exemplo:

sudo mv terminal-root-os.bin /boot/
sudo vim /boot/grub/grub.cfg
Enter fullscreen mode Exit fullscreen mode

Adicione uma nova entrada no GRUB:

### BEGIN TERMINALROOTOS

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

### END TERMINALROOTOS
Enter fullscreen mode Exit fullscreen mode

Assista ao Vídeo

Como Criar um Simples Sistema Operacional(só o Kernel) com C++

Clique na imagem para assistir o vídeo


Repositório do Terminal Root OS no GitHub: https://github.com/terroo/terminalroot-os.

Heroku

Amplify your impact where it matters most — building exceptional apps.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

Image of Timescale

PostgreSQL for Agentic AI — Build Autonomous Apps on One Stack ☝️

pgai turns PostgreSQL into an AI-native database for building RAG pipelines and intelligent agents. Run vector search, embeddings, and LLMs—all in SQL

Build Today

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay