kernel
克隆,defconfig,menuconfig
kernel hacking → compile-time checks → debug info→ rely on toolchain
→ enable full section mismatch analysis
buildroot

Buildroot - Making Embedded Linux Easy
The buildroot repository can be browsed online at https://gitlab.com/buildroot.org/buildroot/.
下载后解压,defconfig,menuconfig,开ext4
qemu
qemu-system-x86_64 -kernel arch/x86_64/boot/bzImage -nographic -append "console=ttyS0”
qemu-system-x86_64 -kernel arch/x86_64/boot/bzImage -nographic -append "console=ttyS0 nokaslr root=/dev/vda rw" -drive file=/home/hezhengyu/program/git/buildroot/buildroot-2025.02/output/images/rootfs.ext4,if=virtio,format=raw
gdb
gdb vmlinux
target remote :1234