/qemu-for-kernel-development
QEMU kernel development skill for driver and kernel testing. Use when booting custom kernels in QEMU, Buildroot/Yocto rootfs, virtio devices, or NFS root for driver iteration. Activates on queries about QEMU kernel dev, Buildroot QEMU, virtio block, kernel module test QEMU, or
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill qemu-for-kernel-development --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/qemu-for-kernel-development
Context preview
The summary Claude sees to decide when to auto-load this skill.
QEMU kernel development skill for driver and kernel testing. Use when booting custom kernels in QEMU, Buildroot/Yocto rootfs, virtio devices, or NFS root for driver iteration. Activates on queries about QEMU kernel dev, Buildroot QEMU, virtio block, kernel module test QEMU, or
SKILL.md
qemu-for-kernel-development.SKILL.mdname: qemu-for-kernel-development
description: QEMU kernel development skill for driver and kernel testing. Use when booting custom kernels in QEMU, Buildroot/Yocto rootfs, virtio devices, or NFS root for driver iteration. Activates on queries about QEMU kernel dev, Buildroot QEMU, virtio block, kernel module test QEMU, or -append root=
QEMU for Kernel Development
Purpose
Guide agents through QEMU-based kernel and driver development workflows: building/booting custom kernels, attaching virtio block/network, using Buildroot or minimal initramfs, and rapid module test cycles — focused on kernel dev vs general `skills/virtualization/qemu-kvm`.
When to Use
- Test kernel patch without bare metal
- Develop driver against virtio or emulated DT platform
- CI kernel boot smoke test
- NFS or 9p root for fast edit-compile-test
Workflow
1. Minimal direct kernel boot (arm64 virt)
qemu-system-aarch64 \
-machine virt -cpu cortex-a57 -smp 4 -m 2G \
-kernel arch/arm64/boot/Image \
-append "console=ttyAMA0 root=/dev/vda rw" \
-drive if=virtio,file=rootfs.ext4,format=raw \
-netdev user,id=net0 -device virtio-net-device,netdev=net0 \
-nographic
x86_64:
qemu-system-x86_64 -enable-kvm -m 4G -smp 4 \
-kernel arch/x86/boot/bzImage \
-append "console=ttyS0 root=/dev/vda rw" \
-drive file=rootfs.img,format=raw,if=virtio \
-nographic
2. Buildroot rootfs loop
cd buildroot
make qemu_aarch64_virt_defconfig
make
# output/images/Image, rootfs.ext4
Integrate custom kernel: set `BR2_LINUX_KERNEL_CUSTOM_VERSION` or external tree.
3. Out-of-tree module test
# on host — cross build
make -C $KERNEL_SRC M=$PWD modules
# in guest or via initramfs
insmod mydriver.ko
dmesg | tail
Share tree with 9p:
-fsdev local,id=dev,path=$PWD,security_model=none \
-device virtio-9p-pci,fsdev=dev,mount_tag=hostshare
# guest: mount -t 9p -o trans=virtio hostshare /mnt
4. GDB stub for kernel
qemu-system-aarch64 ... -s -S
gdb vmlinux
(gdb) target remote :1234
(gdb) break start_kernel
Use `CONFIG_KGDB` for live kernel debugging after boot.
5. Device tree overrides
qemu-system-aarch64 -machine virt -dtb myboard.dtb ...
virt machine provides virtio devices; platform drivers can target QEMU `-device` models.
6. Agent usage
/qemu-for-kernel-development Boot arm64 virt with custom Image and virtio rootfs for driver CI
Common Problems
| Symptom | Cause | Fix | |---------|-------|-----| | Kernel panic no root | Wrong `root=` | `root=/dev/vda` for virtio blk | | No console output | Missing `console=` on cmdline | `console=ttyAMA0` / `ttyS0` | | Module vermagic error | Built against wrong tree | Same `KERNEL_SRC` as booted image | | Slow without KVM | TCG emulation | `-enable-kvm` on x86 host | | DTB mismatch | Wrong machine | Use `virt` DTB from kernel `make dtbs` |
Related Skills
- `skills/virtualization/qemu-kvm` — KVM, VFIO, libvirt
- `skills/qemu/qemu-embedded-simulation` — bare-metal MCU QEMU
- `skills/kernel/kernel-testing` — KUnit, kselftest
- `skills/kernel-dev/device-tree` — DT for virt/platform
- `skills/debuggers/gdb` — remote GDB basics
Read more
name: qemu-for-kernel-development description: QEMU kernel development skill for driver and kernel testing. Use when booting custom kernels in QEMU, Buildroot/Yocto rootfs, virtio devices, or NFS root for driver iteration. Activates on queries about QEMU kernel dev, Buildroot QEMU, virtio block, kernel module test QEMU, or -append root=
QEMU for Kernel Development
Purpose
Guide agents through QEMU-based kernel and driver development workflows: building/booting custom kernels, attaching virtio block/network, using Buildroot or minimal initramfs, and rapid module test cycles — focused on kernel dev vs general `skills/virtualization/qemu-kvm`.
When to Use
- Test kernel patch without bare metal
- Develop driver against virtio or emulated DT platform
- CI kernel boot smoke test
- NFS or 9p root for fast edit-compile-test
Workflow
1. Minimal direct kernel boot (arm64 virt)
qemu-system-aarch64 \ -machine virt -cpu cortex-a57 -smp 4 -m 2G \ -kernel arch/arm64/boot/Image \ -append "console=ttyAMA0 root=/dev/vda rw" \ -drive if=virtio,file=rootfs.ext4,format=raw \ -netdev user,id=net0 -device virtio-net-device,netdev=net0 \ -nographic
x86_64:
qemu-system-x86_64 -enable-kvm -m 4G -smp 4 \ -kernel arch/x86/boot/bzImage \ -append "console=ttyS0 root=/dev/vda rw" \ -drive file=rootfs.img,format=raw,if=virtio \ -nographic
2. Buildroot rootfs loop
cd buildroot make qemu_aarch64_virt_defconfig make # output/images/Image, rootfs.ext4
Integrate custom kernel: set `BR2_LINUX_KERNEL_CUSTOM_VERSION` or external tree.
3. Out-of-tree module test
# on host — cross build make -C $KERNEL_SRC M=$PWD modules # in guest or via initramfs insmod mydriver.ko dmesg | tail
Share tree with 9p:
-fsdev local,id=dev,path=$PWD,security_model=none \ -device virtio-9p-pci,fsdev=dev,mount_tag=hostshare # guest: mount -t 9p -o trans=virtio hostshare /mnt
4. GDB stub for kernel
qemu-system-aarch64 ... -s -S gdb vmlinux (gdb) target remote :1234 (gdb) break start_kernel
Use `CONFIG_KGDB` for live kernel debugging after boot.
5. Device tree overrides
qemu-system-aarch64 -machine virt -dtb myboard.dtb ...
virt machine provides virtio devices; platform drivers can target QEMU `-device` models.
6. Agent usage
/qemu-for-kernel-development Boot arm64 virt with custom Image and virtio rootfs for driver CI
Common Problems
| Symptom | Cause | Fix | |---------|-------|-----| | Kernel panic no root | Wrong `root=` | `root=/dev/vda` for virtio blk | | No console output | Missing `console=` on cmdline | `console=ttyAMA0` / `ttyS0` | | Module vermagic error | Built against wrong tree | Same `KERNEL_SRC` as booted image | | Slow without KVM | TCG emulation | `-enable-kvm` on x86 host | | DTB mismatch | Wrong machine | Use `virt` DTB from kernel `make dtbs` |
Related Skills
- `skills/virtualization/qemu-kvm` — KVM, VFIO, libvirt
- `skills/qemu/qemu-embedded-simulation` — bare-metal MCU QEMU
- `skills/kernel/kernel-testing` — KUnit, kselftest
- `skills/kernel-dev/device-tree` — DT for virt/platform
- `skills/debuggers/gdb` — remote GDB basics
A curated suite of AI agent skills for systems and low-level programming — C/C++, Rust, Zig, GPU, bare-metal firmware, Linux kernel/driver development, computer architecture, compiler internals, HPC, and more.
Repo: mohitmishra786/low-level-dev-skills
Other skills on low-level-dev-skills.
- /custom-allocators
Custom allocator skill for memory allocation strategies. Use when implementing pool/slab/arena allocators, tuning jemalloc/mimalloc, writing Rust GlobalAlloc, or benchmarking allocator performance. Activates on queries about jemalloc, mimalloc, tcmalloc, arena allocator,
Open skill - /numa-programming
NUMA programming skill for multi-socket memory locality. Use when detecting NUMA topology, binding processes with numactl, using libnuma API, building NUMA-aware data structures, or measuring remote access penalties. Activates on queries about numactl, libnuma, NUMA topology,
Open skill - /af-xdp
AF_XDP skill for high-performance XDP sockets. Use when creating AF_XDP sockets, configuring UMEM and XSK rings, XDP_REDIRECT programs, copy vs zero-copy mode, or comparing with DPDK. Activates on queries about AF_XDP, xsk_umem, XDP_REDIRECT, libbpf xsk, or zero-copy XDP.
Open skill - /dpdk
DPDK skill for userspace packet I/O. Use when initializing EAL, configuring PMD drivers, using mbuf pools and rte_ring, setting up huge pages, RSS, or testpmd validation. Activates on queries about DPDK, EAL, rte_eth_rx_burst, hugepages, PMD, or testpmd.
Open skill - /io-uring
io_uring skill for Linux async I/O. Use when building high-performance servers with liburing, multi-shot operations, provided buffers, fixed files, zero-copy send, or tokio-uring. Activates on queries about io_uring, SQE/CQE, liburing, IORING_OP_PROVIDE_BUFFERS, or io_uring vs
Open skill - /adc-dac-baremetal
Bare-metal ADC and DAC skill. Use when configuring analog sampling, DMA-driven ADC, calibration, or DAC output on MCUs. Activates on queries about ADC bare-metal, sampling time, DMA ADC, or DAC channel setup.
Open skill

