In this article we will learn to setting up and Debugging Embedded Linux Kernel using Qemu.
3. dtb file
Above images and rootfs can be compiled and built from these Tutorial
In 1st terminal execute below command:
qemu-system-arm -M vexpress-a9 -dtb linux/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -kernel linux/arch/arm/boot/zImage -append "root=/dev/nfs nfsroot=10.0.2.2:/rootfs_ES rw ip=10.0.2.15::10.0.2.1:255.255.255.0 init=/linuxrc console=ttyAMA0" -serial stdio -s -S
Using the “-s” option: makes qemu listen on port tcp::1234, which you can connect to as localhost:1234 if you are on the same machine.
Qemu’s “-S”option: makes Qemu stop execution until you give the continue command.
Open one more terminal i.e in 2nd terminal execute below command as shown in image
arm-none-linux-gnueabi-gdb path to vmlinux
arm-none-linux-gnueabi-gdb linux/vmlinux target remote :1234 b start_kernel
For more options and debugging please refer online gdb tutorial.