
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.
Tag
255 posts

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.

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.

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.

Compare the TinyGo -gc=conservative, -gc=leaking and -gc=none garbage collector settings, what each costs, and which one fits a given firmware.

Attach a handler to a pin edge with machine.Pin.SetInterrupt in TinyGo 0.37, keep the handler short with atomics, and debounce a button in the main loop.

Configure machine.I2C0 in TinyGo, scan the bus, read a chip ID register by hand, then read a BME280 with the tinygo.org/x/drivers package.

Choose between DriverKit, system extensions and legacy kexts on macOS 15: what each runs in, what it can reach, how it installs, and a decision table.

How XNU combines Mach, a BSD layer and IOKit in one kernel: what each part owns, how a process maps to a task, and how a read call crosses all three.

Port a driver from embedded-hal 0.2 to 1.0 with exact trait changes for I2C, SPI, GPIO and delays, plus the embedded-hal-compat bridge for mixed crates.

Build a TMP102 temperature driver generic over the embedded-hal 1.0 I2c trait, with typed errors, a release method and host unit tests using embedded-hal-mock.

Learn the layers of embedded Rust crates, from cortex-m and the PAC through the HAL to a board support crate, with one pin toggle written at each level.

Write a bitmap physical memory manager in C: place the bitmap in usable RAM, mark reserved and kernel frames, allocate and free 4 KiB frames, and allocate runs.