This guide provides step-by-step instructions to set up, build, and configure Linux kernel version 6.14 with Rust support on an Ubuntu 24.04 virtual machine (VM) running in QEMU. It includes version prerequisites, enabling Rust support, and building/testing sample Rust kernel modules (rust_mymodule
and rust_usb_serial
). The setup supports a physical QinHeng CH340 USB-serial device (0x1a86:0x7523
) passed through to the VM and a virtual USB device (0x1234:0x5678
) for testing.
- OS: Ubuntu 24.04 LTS (VM disk:
u22s_rust.qcow2
) - CPU: x86_64 architecture (QEMU with
-cpu host
) - Memory: 16 GB RAM (QEMU with
-m 16G
)