mirror of
https://github.com/cowmonk/cowos.git
synced 2025-10-27 14:33:27 +00:00
QEMU debugging via LLDB or optionally GDB
This commit is contained in:
parent
4a304f7b63
commit
93abdf8dac
10 changed files with 77 additions and 7 deletions
31
Makefile
31
Makefile
|
|
@ -1,22 +1,39 @@
|
|||
all: iso
|
||||
|
||||
iso: kernel limine
|
||||
@echo "Copying kernel to isodir..."
|
||||
cp -v ./kernel/bin/cowos ./isodir/boot/
|
||||
|
||||
@echo "Creating ISO image..."
|
||||
xorriso -as mkisofs -R -r -J -b boot/limine/limine-bios-cd.bin \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table -hfsplus \
|
||||
-apm-block-size 2048 --efi-boot boot/limine/limine-uefi-cd.bin \
|
||||
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||
isodir -o cowos.iso
|
||||
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table -hfsplus \
|
||||
-apm-block-size 2048 --efi-boot boot/limine/limine-uefi-cd.bin \
|
||||
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||
isodir -o cowos.iso
|
||||
@echo "Installing Limine BIOS..."
|
||||
./limine/limine bios-install cowos.iso
|
||||
|
||||
kernel:
|
||||
make -C ./kernel/ all
|
||||
@echo "Buliding kernel..."
|
||||
make -C ./kernel/
|
||||
|
||||
limine: kernel
|
||||
@echo "Setting up Limine..."
|
||||
./scripts/limine-git.sh
|
||||
|
||||
clean:
|
||||
@echo "Cleaning up..."
|
||||
rm cowos.iso
|
||||
make -C ./kernel/ clean
|
||||
|
||||
run:
|
||||
@echo "Running cowos in QEMU..."
|
||||
@if [ "$(DEBUG)" = "1" ]; then \
|
||||
echo "Debug mode: Starting QEMU with LLDB..."; \
|
||||
qemu-system-x86_64 -cdrom cowos.iso -m 512M -serial stdio -s -S & \
|
||||
echo "Launching LLDB..."; \
|
||||
lldb --arch x86_64 -o "gdb-remote localhost:1234" ./kernel/bin/cowos; \
|
||||
else \
|
||||
qemu-system-x86_64 -cdrom cowos.iso -m 512M -serial stdio; \
|
||||
fi
|
||||
|
||||
.PHONY: all iso kernel limine clean run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue