diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-07 09:42:54 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-07 09:43:26 +0000 |
commit | d8819e19a60019fb922ba7193104be634948fbcd (patch) | |
tree | 2da938d4454898a097dceff81be9a01997bbec7c | |
parent | f5fc8d42f8b9f3e62e71b8c3359997366fe0760e (diff) | |
download | spectrum-d8819e19a60019fb922ba7193104be634948fbcd.tar spectrum-d8819e19a60019fb922ba7193104be634948fbcd.tar.gz spectrum-d8819e19a60019fb922ba7193104be634948fbcd.tar.bz2 spectrum-d8819e19a60019fb922ba7193104be634948fbcd.tar.lz spectrum-d8819e19a60019fb922ba7193104be634948fbcd.tar.xz spectrum-d8819e19a60019fb922ba7193104be634948fbcd.tar.zst spectrum-d8819e19a60019fb922ba7193104be634948fbcd.zip |
Enable kernel debugging in QEMU make run targets
Signed-off-by: Alyssa Ross <hi@alyssa.is>
-rw-r--r-- | host/initramfs/Makefile | 3 | ||||
-rw-r--r-- | host/rootfs/Makefile | 3 | ||||
-rw-r--r-- | img/app/Makefile | 3 | ||||
-rw-r--r-- | vm/sys/net/Makefile | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/host/initramfs/Makefile b/host/initramfs/Makefile index 8dcf420..15eefb8 100644 --- a/host/initramfs/Makefile +++ b/host/initramfs/Makefile @@ -71,10 +71,11 @@ run: $(dest) build/rootfs.verity.roothash $(RUN_IMAGE) $(QEMU_KVM) -m 4G \ -kernel $(KERNEL) \ -initrd $(dest) \ - -append "ro console=ttyS0 ext=vda intel_iommu=on roothash=$$(< build/rootfs.verity.roothash)" \ + -append "ro console=ttyS0 ext=vda intel_iommu=on roothash=$$(< build/rootfs.verity.roothash) nokaslr" \ -cpu host \ -machine q35,kernel-irqchip=split \ -display gtk,gl=on \ + -gdb unix:build/gdb.sock,server,nowait \ -device intel-iommu,intremap=on \ -device virtio-vga-gl \ -device qemu-xhci \ diff --git a/host/rootfs/Makefile b/host/rootfs/Makefile index 44c8070..8a48512 100644 --- a/host/rootfs/Makefile +++ b/host/rootfs/Makefile @@ -141,12 +141,13 @@ run: build/live.img $(EXT_FS) build/rootfs.verity.roothash exec $(QEMU_KVM) -cpu host -m 2G \ -machine q35,kernel=$(KERNEL),kernel-irqchip=split,initrd=$(INITRAMFS) \ -display gtk,gl=on \ + -gdb unix:build/gdb.sock,server,nowait \ -qmp unix:build/vmm.sock,server,nowait \ -monitor vc \ -parallel none \ -drive file=build/live.img,if=virtio,format=raw,readonly=on \ -drive file=/proc/self/fd/3,if=virtio,format=raw \ - -append "console=ttyS0 roothash=$$(< build/rootfs.verity.roothash) ext=/dev/vdb intel_iommu=on" \ + -append "console=ttyS0 roothash=$$(< build/rootfs.verity.roothash) ext=/dev/vdb intel_iommu=on nokaslr" \ -device intel-iommu,intremap=on \ -device virtio-vga-gl \ -device vhost-vsock-pci,guest-cid=3 diff --git a/img/app/Makefile b/img/app/Makefile index 3e2c0ce..1ea0d66 100644 --- a/img/app/Makefile +++ b/img/app/Makefile @@ -87,7 +87,8 @@ run-qemu: $(imgdir)/appvm/blk/root.img start-virtiofsd @../../scripts/run-qemu.sh -m 128 -cpu host -kernel $(KERNEL) -vga none \ -drive file=$(imgdir)/appvm/blk/root.img,if=virtio,format=raw,readonly=on \ -drive file=$(RUN_IMG),if=virtio,format=raw,readonly=on \ - -append "root=PARTLABEL=root" \ + -append "root=PARTLABEL=root nokaslr" \ + -gdb unix:build/gdb.sock,server,nowait \ -netdev user,id=net0 \ -device virtio-net,netdev=net0,mac=0A:B3:EC:00:00:00 \ -chardev socket,id=virtiofsd,path=build/virtiofsd.sock \ diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile index 50c7b29..bbeb40b 100644 --- a/vm/sys/net/Makefile +++ b/vm/sys/net/Makefile @@ -94,7 +94,8 @@ build/etc/s6-rc: $(VM_S6_RC_FILES) run-qemu: build/host/data/netvm/blk/root.img @../../../scripts/run-qemu.sh -m 128 -cpu host -kernel $(KERNEL) -vga none \ -drive file=build/host/data/netvm/blk/root.img,if=virtio,format=raw,readonly=on \ - -append "root=PARTLABEL=root" \ + -append "root=PARTLABEL=root nokaslr" \ + -gdb unix:build/gdb.sock,server,nowait \ -netdev user,id=net0 \ -device e1000e,netdev=net0 \ -netdev user,id=net1 \ |