
Boot Linux on RISC-V in QEMU With OpenSBI and U-Boot
Build OpenSBI, U-Boot and a Linux 6.12 Image for riscv64, boot them on QEMU virt in the real firmware chain and load the kernel from an ext4 disk with booti.
Practical coding tutorials and techniques for hardware and computer systems.

Build OpenSBI, U-Boot and a Linux 6.12 Image for riscv64, boot them on QEMU virt in the real firmware chain and load the kernel from an ext4 disk with booti.
Processes, threads, files, memory mapping, signals, IPC and sockets through POSIX and Win32: the core every other kind of system is built on.
Linux kernel modules and drivers, system calls, schedulers, bootloaders and UEFI, and writing a hobby operating system from the first instruction.
Bare-metal firmware on STM32, ESP32, RP2040, AVR, nRF and RISC-V: GPIO, UART, SPI, I2C, DMA, interrupts, timers, low power and over-the-air updates.
FreeRTOS, Zephyr, NuttX, ThreadX and RTEMS: tasks, priorities, queues, timing analysis, devicetree and Kconfig, and when a superloop is enough.
Yocto, Buildroot, U-Boot, device trees and board support packages: building a small, bootable Linux for Raspberry Pi, i.MX and custom hardware.
x86-64, ARM, AArch64 and RISC-V assembly, calling conventions, SIMD, pipelines, caches and memory ordering, and reading the disassembly your compiler wrote.
GCC, LLVM and Clang, the ARM GNU toolchain, linkers and linker scripts, ELF, cross-compiling, Make, CMake, Meson and Bazel, and writing a compiler of your own.
OpenGL, Vulkan, Apple Metal, CUDA and OpenCL: graphics pipelines, compute kernels, shaders and GPU memory, from the first triangle to a tuned kernel.
IBM Z and z/OS: COBOL, JCL, REXX, HLASM and PL/I, CICS, Db2 and IMS, datasets and batch jobs, and modernising code that still runs the world's payments.
Allocators, cache-friendly data layout, profiling with perf, VTune and Instruments, benchmarking that means something, and memory safety without losing speed.
Threads, atomics, memory models, lock-free structures, async runtimes and actor systems such as Erlang/OTP, and the races each one invites.
Sockets, epoll, kqueue and io_uring, eBPF and XDP, DPDK, and protocol stacks written from the packet up.

Open windows, read keyboard, mouse and gamepad input, handle resizes and high-DPI, and choose between GLFW 3.4 and SDL 3.2 for OpenGL and Vulkan programs.

Write a complete Linux 6.12 PCI driver: probe, BAR mapping, MSI interrupts, DMA with a restricted mask, a user-space interface, error recovery and testing.

Learn how UART, SPI, I2C, APB, Wishbone, AXI4-Lite, AXI4 and AXI-Stream move data on wires and inside chips, with Verilog for each and a way to choose.

Print Q15 and Q16.16 numbers as decimals in C with integer arithmetic only: split, round, pad the fraction, carry, handle the sign, skip printf float code.

Call the RISC-V SBI from supervisor mode: probe extensions, print through DBCN, set timers, start harts and shut down, with the ecall rules and errors.

Convert floats to Q15 and back in C with rounding, saturation and NaN handling, build compile-time Q15 constants, and convert whole sample blocks safely.

Build the smallest RISC-V kernel that boots on QEMU virt: a linker script at 0x80200000, an entry stub, a C main printing through the UART, and a GDB check.

Learn what Q15, Q31 and Q16.16 mean, how a stored integer maps to a real value, and how to compute the range and resolution of any Q format in C.

A tour of the RISC-V supervisor CSRs a kernel touches: sstatus, sie, stvec, scause, sepc, stval, satp and sscratch, with instructions and exact bits.
We send one email when a new post is published. No spam.