Este site também está em português.Ler em português

Kernel

Readable kernel, boot to shell

From boot to shell, readable and commented, with documentation in Portuguese.

Read the kernel

Pi 500boot, 4 cores, SD card, USB, audio and shell running on the real hardware
438 µsthe same read loop with cache on; without cache, 183,834 µs

Understand the path from boot to shell

  1. Boot and HDMI. The framebuffer comes from the firmware via the mailbox.
  2. Exceptions, GIC and timer.
  3. Memory: DTB, frames, MMU and heap.
  4. Processes: threads, EL0, syscalls and ELF.
  5. Multicore: all 4 cores via PSCI.
  6. SD card and FAT32.
  7. USB keyboard: PCIe, RP1 and xHCI.
  8. Shell and programs.
BoardUsed for
Raspberry Pi 500The real target
QEMU raspi4bMailbox, SDHCI, spin table
QEMU virtPCIe, xHCI, USB keyboard

Run it on QEMU

  1. Build: .\scripts\build.ps1.
  2. Install QEMU: winget install SoftwareFreedomConservancy.QEMU.
  3. Follow the README to pick the board (raspi4b or virt).

Go deeper

Not done yet

Read the kernel

Start with the roadmap and run the boot on QEMU.

Open PLAN.md

See also