
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.
Everything you need to level up your coding skills.

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.

Write a Linux 6.12 pin controller driver: pinctrl_desc, pins, groups and functions, the set_mux callback, and the device tree states that consumers select.

Write a Linux 6.12 GPIO controller driver with struct gpio_chip: direction, get and set callbacks, locking, registration and the generic MMIO helper.

Load a firmware blob in a Linux 6.12 driver with request_firmware, validate it, copy it to the device, release it, and use the async variant for early probes.

Drive a PWM channel from a Linux 6.12 consumer driver with devm_pwm_get, struct pwm_state and pwm_apply_might_sleep, plus the device tree binding.

Write a Linux 6.12 RTC driver with rtc_class_ops, read_time and set_time using 64-bit time, range limits, and test it with hwclock and sysfs.

Write a Linux 6.12 watchdog driver with watchdog_device and watchdog_ops, handle the timeout and nowayout options, and see it through /dev/watchdog and wdctl.

Write a Linux 6.12 LED class driver with led_classdev, brightness_set_blocking, max_brightness and triggers, and see it appear under /sys/class/leds.

Write a Linux 6.12 input driver for a GPIO button: devm_input_allocate_device, capability bits, a threaded IRQ, debounce, and events visible to evtest.

Request, configure and drive GPIO lines from a Linux 6.12 platform driver with devm_gpiod_get and the descriptor API, including active-low handling.

What a Linux 6.12 device driver is, how it reaches hardware through registers, port I/O, DMA and interrupts, and how it presents the device to user space.

Where the Linux 6.12 firmware loader searches for blobs, in what order, how initramfs and built-in firmware fit in, and how to read the failure messages.
We send one email when a new post is published. No spam.