O LuusOS é um projeto independente e focado em engenharia de sistemas operacionais nativos (OSDev), projetado para explorar o controle direto de hardware, inicialização bare-metal e desenvolvimento de estruturas fundamentais de kernel a partir do zero absoluto. O ecossistema é modularizado de modo flat e híbrido, suportando implementações robustas de baixo nível para x86 (IA-32) e portabilidade evolutiva para AArch64 (ARM64).
- Multiboot Integration: Suporte a especificações padrão Multiboot e carregadores como GRUB, chaveando com segurança para o Modo Protegido de 32-bits (ou inicialização customizada em ARM Exception Level 1).
-
VGA Text Mode Driver: Escrita direta no buffer mapeado em memória em
0xB8000para saída de texto clássica$80 \times 25$ com manipulação manual de bytes de atributos (cores e fontes). - Low-Level Memory Management: Implementação inicial da Global Descriptor Table (GDT), tabelas de paginação planas e isolamento preliminar de segmentos do Kernel (Ring 0).
- Dual-Language Engine: Lógica estruturada em C e Rust de alta performance apoiada por sub-rotinas cirúrgicas em Assembly (NASM / GNU As) para manipulação direta de registradores do processador.
| Componente | Endereço / Especificação Técnica | Descrição |
|---|---|---|
| VGA Video Buffer | 0xB8000 (Modo Texto) |
Manipulação direta de caracteres emparelhados a cores. |
| Bootloader Target | x86 Flat / IA-32 / AArch64 Virt | Alvo de emulação escalável via QEMU. |
| Kernel Stack Pointer | Espaço reservado pré-alocado | Configurado manualmente na inicialização inicial do Assembly. |
| Core Compilers | GCC / Clang / LLVM / NASM | Cross-compilação e linkagem estrita sem dependências da stdlib. |
⚠️ AVISO SOBRE EXECUTÁVEIS E ARQUIVOS DE TERCEIROS: Este repositório hospeda estritamente o código-fonte original e scripts de automação locais do LuusOS. Arquivos executáveis externos, compiladores cruzados e dependências locais da toolchain (como as pastas bináriastoolchain2,i686-elf,include,lib,libexec,share,srcou arquivos.exedo Windows) NÃO estão inclusos no repositório por razões de direitos autorais e integridade.
Para simplificar o desenvolvimento sem inflar o repositório, nossos scripts automatizados de compilação (build.sh e build.bat) realizam a busca e o download dinâmico de ferramentas de compilação cruzada Open Source consolidadas. O ecossistema baixa de forma transparente os seguintes pacotes:
- Nome do Projeto Base: i686-elf-tools (Mantido de forma pública por @lordmilko no GitHub).
- Binários Alvo: Binários isolados do
i686-elf-gcc(v7.1.0) e utilitários da tabela binária (binutils) estruturados estritamente para ambientes freestanding (sem dependências do sistema hospedeiro). - Links Oficiais Utilizados na Automação:
- Alvo Windows:
https://github.com/lordmilko/i686-elf-tools/releases/download/7.1.0/i686-elf-tools-windows.zip - Alvo Linux:
https://github.com/lordmilko/i686-elf-tools/releases/download/7.1.0/i686-elf-tools-linux.zip
- Alvo Windows:
Caso prefira não utilizar o script automatizado e queira instalar os compiladores globais ou locais manualmente por conta própria, execute as instruções padrão abaixo:
sudo apt update
sudo apt install build-essential nasm qemu-system-x86 qemu-system-arm xorriso grub-pc-bin cimg-dev clang lld
- Opção 1 (Recomendado - WSL2 com Ubuntu): Instale o WSL2 no prompt de comando (
wsl --install), abra a distribuição Linux instalada e execute o comando clássico do Linux acima. - Opção 2 (Nativo via MSYS2 / MinGW): Baixe os arquivos do pacote
i686-elf-toolslistados na tabela acima, extraia-os em uma pasta local do seu sistema (ex:toolchain2), adicione o caminho absoluto da pasta/binnas Variáveis de Ambiente do Windows, ou instale os pacotes de desenvolvimento direto no terminal MSYS2 (UCRT64):
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-nasm mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-qemu xorriso
O LuusOS inclui scripts de automação de texto integrados para simplificar o processo completo de montagem, compilação e linkagem estrita do Kernel, mapeando automaticamente as chamadas do compilador e gerando a imagem estável de forma transparente.
- Clone o repositório:
git clone [https://github.com/luispolis124/LuusOS.git](https://github.com/luispolis124/LuusOS.git)
cd LuusOS
- Execute a compilação total automatizada:
- No Linux / Termux: Dê permissão de execução e rode o script nativo:
chmod +x build.sh
./build.sh
- No Windows (Prompt/MSYS2): Execute o script em lote correspondente:
build.bat
- Nota: Caso prefira rodar os alvos do Makefile diretamente de forma manual, utilize o comando padrão:
make clean && make all
- Executando em x86 (Modo Padrão):
# Testando a ISO estável gerada pelo build system
qemu-system-i386 -cdrom build/luusos.iso
# Testando via Kernel direto (Multiboot)
qemu-system-i386 -kernel build/luusos.bin
- Executando em AArch64 (Modo ARM64 Virt):
qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -kernel target/LuusOS.bin
Para executar o LuusOS no seu celular usando o Limbo:
- Copie o arquivo gerado
build/luusos.isooubuild/luusos.binpara o armazenamento do seu dispositivo móvel. - Abra o Limbo PC Emulator, crie uma nova máquina virtual e configure a arquitetura para x86 (ou arm64 dependendo da build).
- Na aba Removable Drives, habilite a opção CDROM e selecione o arquivo luusos.iso (Consulte os campos de Kernel caso use o .bin direto).
- Defina a interface de vídeo como std ou vmware e clique em Play/Iniciar.
- Certifique-se de que o arquivo
build/luusos.isofoi gerado com sucesso. - Abra o VirtualBox e crie uma nova máquina virtual (Escolha o tipo Other / Other/Unknown).
- Vá em Configurações > Armazenamento, selecione o dispositivo óptico e anexe o luusos.iso.
- Garanta que a ordem de boot esteja configurada para iniciar pelo drive óptico e inicie a máquina.
# Linux / WSL2
sudo dd if=build/luusos.iso of=/dev/sdX bs=4M && sync
LuusOS is an independent hobbyist operating system kernel project (OSDev) designed for bare-metal system programming, hardware initialization, and developing fundamental kernel structures from scratch. The ecosystem features a modular flat and hybrid structure, targeting robust low-level implementations for x86 (IA-32) alongside evolutionary portability for AArch64 (ARM64).
- Multiboot Integration: Native support for standard Multiboot specifications and bootloaders like GRUB, safely switching into 32-bit Protected Mode (or custom initialization in ARM Exception Level 1).
-
VGA Text Mode Driver: Direct manipulation of the text video memory buffer mapped at
0xB8000for classic$80 \times 25$ output via custom attribute bytes (colors and fonts). - Low-Level Memory Management: Initial setup of the Global Descriptor Table (GDT), early paging tables, and basic isolation for high-privilege kernel segments (Ring 0).
- Dual-Language Engine: High-performance architectural core built using C and Rust, coupled with fine-tuned Assembly (NASM / GNU As) routines for direct CPU register interaction.
| Component | Target Address / Tech Specs | Description |
|---|---|---|
| VGA Video Buffer | 0xB8000 (Text Mode) | Direct buffer character and color manipulation. |
| Bootloader Target | x86 Flat / IA-32 / AArch64 Virt | Scalable emulation target via QEMU environments. |
| Kernel Stack Pointer | Pre-allocated reserved area | Set up manually during early Assembly initialization. |
| Core Compilers | GCC / Clang / LLVM / NASM | Freestanding cross-compilation with no stdlib links. |
⚠️ NOTICE REGARDING THIRD-PARTY EXECUTABLES & TOOLS: This repository strictly hosts the original source code and local automation build scripts for LuusOS. Pre-compiled third-party binaries, cross-compilers, or localized cross-compilation target folders (such astoolchain2,i686-elf,include,lib,libexec,share,srcdirectories or Windows.exeformats) ARE NOT bundled into the repository structure due to licensing restrictions and build system integrity.
To streamline the build system overhead, our plain-text setup automation files (build.sh & build.bat) fetch established open-source toolchain binaries on the fly. The continuous integration logic fetches components safely from:
- Target Open Source Project: i686-elf-tools (Maintained as an active open-source project by @lordmilko).
- Provided Binaries: Freestanding cross-compiled layers of
i686-elf-gcc(v7.1.0) and supporting binary utilities compiled without any localglibcbindings. - Direct Resource Links for Verification:
- Windows Deployment:
https://github.com/lordmilko/i686-elf-tools/releases/download/7.1.0/i686-elf-tools-windows.zip - Linux Deployment:
https://github.com/lordmilko/i686-elf-tools/releases/download/7.1.0/i686-elf-tools-linux.zip
If you wish to opt-out of the automatic downloader pipeline and manage cross-compilation tools globally or manually inside your environment, use the standard configuration paradigms below:
sudo apt update
sudo apt install build-essential nasm qemu-system-x86 qemu-system-arm xorriso grub-pc-bin cimg-dev clang lld
- Option 1 (Recommended - WSL2 with Ubuntu): Install WSL2 from your terminal (
wsl --install), log into your Linux instance and run the native Linux setup snippet above. - Option 2 (Native via MSYS2 / MinGW): Download the specific zip package from the
i686-elf-toolsassets specified above, map its internal/bindirectory absolute location inside your Windows Environment variables list, or trigger the compilation binaries directly via MSYS2 (UCRT64):
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-nasm mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-qemu xorriso
LuusOS wraps its freestanding compiler flags inside portable plain-text build scripts to streamline compilation, linking phases, and target storage generation.
- Clone the repository:
git clone [https://github.com/luispolis124/LuusOS.git](https://github.com/luispolis124/LuusOS.git)
cd LuusOS
- Run the automated compilation build pipeline:
- On Linux / Termux: Grant permissions and execute the shell deployment script:
chmod +x build.sh
./build.sh
- On Windows (Command Prompt / MSYS2): Call the native batch wrapper script:
build.bat
- Note: If you prefer to target specific rules inside the Makefile by yourself, just execute:
make clean && make all
- Running on x86 (Standard Mode):
# Testing the stable ISO image generated by the build system
qemu-system-i386 -cdrom build/luusos.iso
# Testing via raw Kernel binary (Multiboot)
qemu-system-i386 -kernel build/luusos.bin
- Running on AArch64 (ARM64 Virt Mode):
qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -kernel target/LuusOS.bin
To test LuusOS directly on an Android device using Limbo:
- Move the compiled
build/luusos.isoorbuild/luusos.binonto your target phone storage. - Launch Limbo PC Emulator, spin up a new machine, and map architecture properties to x86 (or arm64).
- Inside the Removable Drives section, toggle CDROM and load your luusos.iso file (or provide it inside the Kernel fields if using raw standalone binaries).
- Select your Video Display Interface (e.g., std or vmware) and hit the Play button.
- Ensure
build/luusos.isowas successfully compiled. - Open VirtualBox and create a new Virtual Machine (Set OS Type to Other / Other/Unknown).
- Open Settings > Storage, choose the Optical Device, and attach your local luusos.iso file.
- Verify Boot Priority settings and start up the instance.
# Linux / WSL2 environments
sudo dd if=build/luusos.iso of=/dev/sdX bs=4M && sync
💡 Nota / Note:
- PT: Os binários pré-compilados (.bin) e as imagens ópticas (.iso) serão disponibilizados na aba de Releases do GitHub assim que as primeiras builds estáveis forem publicadas. Você pode baixar os arquivos prontos diretamente por lá se preferir não compilar o código fonte localmente.
- EN: Pre-compiled standalone binaries (.bin) and bootable optical storage tags (.iso) will be published to the GitHub Releases section as stable milestones are established. You can fetch stable ready-to-run images directly from there if you wish to bypass local toolchain configuration.
# PT: Comando futuro para baixar a imagem ISO estável
# EN: Future script to fetch the latest stable bootable ISO
curl -L -O [https://github.com/luispolis124/LuusOS/releases/latest/download/luusos.iso](https://github.com/luispolis124/LuusOS/releases/latest/download/luusos.iso)
# PT: Comando futuro para capturar apenas o binário estático do Kernel
# EN: Future script to download the bare-metal raw Kernel binary
wget [https://github.com/luispolis124/LuusOS/releases/latest/download/luusos.bin](https://github.com/luispolis124/LuusOS/releases/latest/download/luusos.bin)
Licensed under the MIT License. Feel free to study, modify, fork, and use this codebase for educational and OSDev experimentation purposes. Feedback, issue tracking, and architecture discussions are highly appreciated!
