Ciro Santilli 六四事件 法轮功 包卓轩 6b0f89a8b4 aosp
2018-01-25 15:26:35 +00:00
2017-11-01 14:11:18 +00:00
2017-11-16 23:59:08 +00:00
2017-11-11 14:11:23 +00:00
2017-12-28 12:54:24 +00:00
2017-11-18 19:05:40 +00:00
2018-01-25 15:26:35 +00:00
2017-12-29 13:34:13 +00:00
2018-01-02 18:15:07 +00:00
2017-08-08 11:56:01 +01:00
2018-01-20 09:58:21 +00:00
2017-12-28 12:54:24 +00:00
2018-01-16 17:30:22 +00:00
2017-12-31 20:54:10 +00:00
2017-11-13 14:25:24 +00:00
2017-11-13 14:25:24 +00:00
2018-01-02 18:15:07 +00:00
2018-01-16 17:27:14 +00:00
bak
2017-10-08 17:49:01 +01:00
2017-10-08 21:20:21 +01:00
2017-10-08 11:38:30 +01:00
2017-12-31 20:54:10 +00:00
2017-12-28 12:54:24 +00:00
2017-07-27 09:21:40 +01:00
2017-09-26 09:50:55 +01:00

Linux Kernel Module Cheat

Run one command, get a QEMU Buildroot BusyBox virtual machine built from source with several minimal Linux kernel 4.14 module development example tutorials with GDB and KGDB step debugging and minimal educational hardware models. Limited GEM5 full system support. "Tested" in x86, ARM and MIPS guests, Ubuntu 17.10 host.

Reserve 12Gb of disk and run:

git clone https://github.com/cirosantilli/linux-kernel-module-cheat
cd linux-kernel-module-cheat
./configure && ./build && ./run

The first build will take a while (GCC, Linux kernel), e.g.:

  • 2 hours on a mid end 2012 laptop
  • 30 minutes on a high end 2017 desktop

If you don't want to wait, you could also try to compile the examples and run them on your host computer as explained on the "Run on host" section, but as explained on that section, that is dangerous, limited, and will likely not work.

After QEMU opens up, you can start playing with the kernel modules:

root
insmod /hello.ko
insmod /hello2.ko
rmmod hello
rmmod hello2

This should print to the screen:

hello init
hello2 init
hello cleanup
hello2 cleanup

which are printk messages from init and cleanup methods of those modules.

All available modules can be found in the kernel_module directory.

See the getting started section for further details.

  1. Getting started
  2. Action
    1. Step debugging
      1. GDB step debugging
      2. KGDB
      3. gdbserver
    2. Other architectures
    3. modprobe
    4. X11
    5. Count boot instructions
    6. GEM5
    7. ftrace
    8. QEMU user mode
  3. Failed action
    1. Record and replay
  4. Insane action
    1. Run on host
    2. Hello host
  5. Conversation
    1. kmod
    2. Device tree
    3. Maintainers
    4. Bibliography
Description
The perfect emulation setup to study and develop the Linux kernel v5.4.3, kernel modules, QEMU, gem5 and x86_64, ARMv7 and ARMv8 userland and baremetal assembly, ANSI C, C++ and POSIX. GDB step debug and KGDB just work. Powered by Buildroot and crosstool-NG. Highly automated. Thoroughly documented. Automated tests. "Tested" in an Ubuntu 24.04 host.
Readme 25 MiB
Languages
Python 37.3%
C 33.8%
Assembly 13.6%
C++ 8.6%
Shell 3.7%
Other 2.8%