|
il y a 8 ans | |
---|---|---|
buildroot @ 083c0735e9 | il y a 8 ans | |
host | il y a 8 ans | |
kernel_module | il y a 8 ans | |
rootfs_overlay | il y a 8 ans | |
.gitignore | il y a 8 ans | |
.gitmodules | il y a 8 ans | |
README.md | il y a 8 ans | |
bibliography.md | il y a 8 ans | |
build.md | il y a 8 ans | |
busybox_config_fragment | il y a 8 ans | |
introduction.md | il y a 8 ans | |
kernel_config_fragment | il y a 8 ans | |
kmod.md | il y a 8 ans | |
run | il y a 8 ans |
Run one command, get into QEMU Buildroot BusyBox with several minimal Linux kernel module example tutorials. Tested in Ubuntu 14.04.
Usage:
./run
First build will take a while (GCC, Linux kernel).
QEMU opens up, and you can run:
insmod /hello.ko
insmod /hello2.ko
rmmod hello
rmmod hello2
Each module comes from a C file under kernel_module/
. head *.c
for module usage.
The Linux kernel version can be found with:
grep BR2_LINUX_KERNEL_VERSION buildroot/.config
We use printk
a lot, and it shows on the QEMU terminal by default. If that annoys you (e.g. you want to see stdout separately), do:
dmesg -n 1
See also: https://superuser.com/questions/351387/how-to-stop-kernel-messages-from-flooding-my-console