The perfect emulation setup to study and develop the Linux kernel v5.9.2, kernel modules, QEMU, gem5 and x86_64, ARMv7 and ARMv8 userland and baremetal assembly, ANSI C, C++ and POSIX. EVERYTHING is built from source. GDB step debug and KGDB just work. Powered by Buildroot and crosstool-NG. Highly automated. Thoroughly documented. Automated tests. "Tested" in an Ubuntu 20.04 host.
TL;DR: Section 2.2.1, “QEMU Buildroot setup getting started” tested on Ubuntu 24.04:
git clone https://github.com/cirosantilli/linux-kernel-module-cheat cd linux-kernel-module-cheat sudo apt install docker python3 -m venv .venv . .venv/bin/activate ./setup ./run-docker create ./run-docker sh
This leaves you inside a Docker shell. Then inside Docker:
./build --download-dependencies qemu-buildroot ./run
and you are now in a Linux userland shell running on QEMU with everything built fully from source.
The source code for this page is located at: https://github.com/cirosantilli/linux-kernel-module-cheat. Due to a GitHub limitation, this README is too long and not fully rendered on github.com, so either use:
https://github.com/cirosantilli/china-dictatorship | https://cirosantilli.com/china-dictatorship/xinjiang
- 1.
--china
- 2. Getting started
- 3. GDB step debug
- 4. KGDB
- 5. gdbserver
- 6. CPU architecture
- 7. init
- 8. initrd
- 9. Device tree
- 10. KVM
- 11. User mode simulation
- 12. Kernel module utilities
- 13. Filesystems
- 14. Graphics
- 15. Networking
- 16. Operating systems
- 17. Linux kernel
- 18. FreeBSD
- 19. RTOS
- 20. Xen
- 21. U-Boot
- 22. Emulators
- 23. QEMU
- 24. gem5
- 25. Gensim
- 26. Buildroot
- 27. Userland content
- 28. Userland assembly
- 29. x86 userland assembly
- 30. ARM userland assembly
- 31. ELF
- 32. IEEE 754
- 33. Baremetal
- 34. Android
- 35. Benchmark this repo
- 36. Compilers
- 37. Computer architecture
- 38. About this repo