Files
FPGA-Core/Tutorial/phase-17-linux/phase-17.md
T
imple b008b37d49 Add phase-by-phase tutorial notes
Add a Tutorial tree that mirrors the roadmap from Phase 0 through Linux bring-up.
Each phase and subphase gets a short learning note with consistent sections for
context, goals, new concepts, mental model, learning tasks, pitfalls, tooling,
testing, and references.

The tutorial material is intentionally explanatory rather than implementation
code. It gives a systems-oriented learner enough FPGA, SystemVerilog, RISC-V,
firmware, and Linux bring-up context to approach each roadmap phase without
turning the notes into copy-paste RTL.
2026-04-28 12:11:23 +02:00

51 lines
1.6 KiB
Markdown

# Phase 17 - Linux
## Context
This is the summit: boot a minimal Linux kernel with a BusyBox initramfs to a shell over
UART on the CPU and SoC you built.
## Goals
- Build a kernel matching the implemented ISA and platform.
- Provide DTB and initramfs.
- Reach an interactive shell or a controlled init process.
## New Concepts
- Kernel config: set of build-time options selecting architecture and drivers.
- Initramfs: initial root filesystem bundled or loaded with the kernel.
- BusyBox: compact Unix userland used in embedded systems.
- Early console: minimal logging path before normal console drivers initialize.
- Root filesystem: filesystem mounted as `/` by Linux.
## How To Think About It
Linux bring-up is system debugging under poor visibility. Work from known-good layers:
CPU tests, DRAM test, boot firmware, DTB validation, early console, then userspace.
## Learning Tasks
- Understand the kernel image format and load addresses for RV32.
- Build the smallest kernel config that matches your hardware.
- Trace boot log milestones and map them to hardware dependencies.
## Pitfalls
- Debugging Linux before compliance tests and DRAM tests are clean.
- Enabling drivers for devices you do not actually implement.
- Losing console output because UART binding or clock frequency is wrong.
## Tooling And Testing
- Use earlycon/earlyprintk-style mechanisms where applicable.
- Keep kernel, DTB, firmware, and bitstream versions tied together.
- Save full boot logs and compare against previous attempts.
## References
- Linux RISC-V documentation: https://docs.kernel.org/arch/riscv/
- Buildroot: https://buildroot.org/
- BusyBox: https://busybox.net/