mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
screenshot, vm to description, qemu debug non intrusive
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Linux Kernel Module Cheat
|
||||
|
||||
Run one command, get into QEMU Buildroot BusyBox with several minimal Linux kernel 4.9 module example tutorials with GDB and KGDB debug. Tested in x86 and ARM guests, Ubuntu 14.04 - 16.10 hosts.
|
||||
Run one command, get into QEMU Buildroot BusyBox virtual machine with several minimal Linux kernel 4.9 module example tutorials with GDB and KGDB debug. Tested in x86 and ARM guests, Ubuntu 14.04 - 16.10 hosts.
|
||||
|
||||

|
||||
|
||||
Usage:
|
||||
|
||||
|
||||
2
run
2
run
@@ -39,7 +39,7 @@ env \
|
||||
make \
|
||||
BR2_JLEVEL="$(($(nproc) - 2))" \
|
||||
HOST_QEMU_OPTS="--enable-debug --enable-sdl --with-sdlabi=2.0" \
|
||||
host-qemu-reconfigure \
|
||||
host-qemu-rebuild \
|
||||
kernel_module-rebuild \
|
||||
all \
|
||||
;
|
||||
|
||||
6
runqemu
6
runqemu
@@ -5,6 +5,7 @@ set -e
|
||||
# CLI handling.
|
||||
arch=x86_64
|
||||
debug=false
|
||||
debug_qemu=''
|
||||
kgdb=false
|
||||
nographic=false
|
||||
extra_append=''
|
||||
@@ -31,6 +32,9 @@ while getopts a:dkn OPT; do
|
||||
extra_flags="$extra_flags -nographic"
|
||||
nographic=true
|
||||
;;
|
||||
q)
|
||||
debug_qemu='gdb -q -ex start --args'
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift "$(($OPTIND - 1))"
|
||||
@@ -42,7 +46,7 @@ case "$arch" in
|
||||
if $kgdb; then
|
||||
extra_append="$extra_append kgdboc=ttyS0,115200"
|
||||
fi
|
||||
cmd="gdb -q -ex start --args ./buildroot/output/host/usr/bin/qemu-system-x86_64 \
|
||||
cmd="$debug_qemu ./buildroot/output/host/usr/bin/qemu-system-x86_64 \
|
||||
-M pc \
|
||||
-append 'root=/dev/vda $extra_append' \
|
||||
-drive file=${images_dir}/rootfs.ext2,if=virtio,format=raw \
|
||||
|
||||
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Reference in New Issue
Block a user