From b76babf7dbca2cb528a66cf78b723906df7c267f Mon Sep 17 00:00:00 2001 From: jdah <20308439+jdah@users.noreply.github.com> Date: Fri, 30 Apr 2021 18:22:26 +0200 Subject: [PATCH 1/2] Fix $(IMG) in Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 112faff..744c2a6 100644 --- a/Makefile +++ b/Makefile @@ -56,8 +56,8 @@ kernel: $(KERNEL_OBJS) img: dirs bootsect kernel dd if=/dev/zero of=$(IMG) bs=512 count=2880 - dd if=./bin/$(BOOTSECT) of=boot.img conv=notrunc bs=512 seek=0 count=1 - dd if=./bin/$(KERNEL) of=boot.img conv=notrunc bs=512 seek=1 count=2048 + dd if=./bin/$(BOOTSECT) of=$(IMG) conv=notrunc bs=512 seek=0 count=1 + dd if=./bin/$(KERNEL) of=$(IMG) conv=notrunc bs=512 seek=1 count=2048 qemu-mac: img qemu-system-i386 -drive format=raw,file=boot.img -d cpu_reset -monitor stdio -device sb16 -audiodev coreaudio,id=coreaudio,out.frequency=48000,out.channels=2,out.format=s32 From c82d2d141c18763c145dbda433edddbcadd3ce0c Mon Sep 17 00:00:00 2001 From: jdah <20308439+jdah@users.noreply.github.com> Date: Fri, 30 Apr 2021 18:24:01 +0200 Subject: [PATCH 2/2] Switch QEMU commands to use $(IMG) --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 744c2a6..d736a56 100644 --- a/Makefile +++ b/Makefile @@ -60,14 +60,14 @@ img: dirs bootsect kernel dd if=./bin/$(KERNEL) of=$(IMG) conv=notrunc bs=512 seek=1 count=2048 qemu-mac: img - qemu-system-i386 -drive format=raw,file=boot.img -d cpu_reset -monitor stdio -device sb16 -audiodev coreaudio,id=coreaudio,out.frequency=48000,out.channels=2,out.format=s32 + qemu-system-i386 -drive format=raw,file=$(IMG) -d cpu_reset -monitor stdio -device sb16 -audiodev coreaudio,id=coreaudio,out.frequency=48000,out.channels=2,out.format=s32 qemu-pulse: img - qemu-system-i386 -drive format=raw,file=boot.img -d cpu_reset -monitor stdio -device sb16 -audiodev pulseaudio,id=pulseaudio,out.frequency=48000,out.channels=2,out.format=s32 + qemu-system-i386 -drive format=raw,file=$(IMG) -d cpu_reset -monitor stdio -device sb16 -audiodev pulseaudio,id=pulseaudio,out.frequency=48000,out.channels=2,out.format=s32 qemu-sdl: img - qemu-system-i386 -display sdl -drive format=raw,file=boot.img -d cpu_reset -monitor stdio -audiodev sdl,id=sdl,out.frequency=48000,out.channels=2,out.format=s32 -device sb16,audiodev=sdl + qemu-system-i386 -display sdl -drive format=raw,file=$(IMG) -d cpu_reset -monitor stdio -audiodev sdl,id=sdl,out.frequency=48000,out.channels=2,out.format=s32 -device sb16,audiodev=sdl qemu-no-audio: img - qemu-system-i386 -drive format=raw,file=boot.img -d cpu_reset -monitor stdio + qemu-system-i386 -drive format=raw,file=$(IMG) -d cpu_reset -monitor stdio