CeDOS - Commit 822c0078

Merge branch 'hotfix-make'
Celina Sophie Kalus
Sat, 25 Nov 2023 21:07:38 +0100
3 files changed, 10 insertions(+), 7 deletions(-)
M README.mdREADME.md

@@ -5,13 +5,12 @@ ## Software Requirements

* GNU make * [https://wiki.osdev.org/GCC_Cross-Compiler](GCC Cross Compiler + matching binutils), tailored for freestanding i686-elf-targets * Doxygen: If you want to build the documentation -* QEMU: To emulate an x86 system +* QEMU: To emulate an x86 system. More specifically, `qemu-system-i386`, available via apt. ## Make commands -### Debug build -```make debug``` +Release builds are the default. For debug builds, use `make DEBUG=1 [...]`. You will need to add `DEBUG=1` to all commands, including `run`, otherwise, the release version is run. -### Release build +### Build ```make build``` ### Run (in an emulator)
M makefilemakefile

@@ -56,7 +56,7 @@ export GLOBAL_BUILD

MODULES := boot kernel libcedos shell OBJECTS := $(patsubst %,$(LOCAL_BUILD)/%.o,$(MODULES)) $(LOCAL_BUILD)/apps_raw.o -DIRS := $(LOCAL_BUILD) +DIRS := $(LOCAL_BUILD) $(LOG_DIR) $(MODULES): | $(DIRS) $(DIRS):

@@ -73,7 +73,7 @@ > mkdir -p ./mnt

> sudo mount $@ ./mnt > sudo cp $(LOCAL_BUILD)/kernel.bin ./mnt > sudo cp $(LOCAL_BUILD)/bin/* ./mnt -> sudo cp ./img-contents/* ./mnt +> sudo cp ./img-contents/* ./mnt || echo "No img-contents folder; Skipping." > du -csh ./mnt/* > sudo umount ./mnt
M run.shrun.sh

@@ -1,1 +1,5 @@

-qemu-system-i386 -drive index=0,if=floppy,format=raw,file=${1} -m 64 -monitor stdio -no-reboot -d int,cpu_reset,exec,in_asm -vga std -vnc :0 2> log/run_err.log +if [ -z "$QEMU_VNC" ]; then + qemu-system-i386 -drive index=0,if=floppy,format=raw,file=${1} -m 64 -monitor stdio -no-reboot -d int,cpu_reset,exec,in_asm -vga std 2> log/run_err.log +else + qemu-system-i386 -drive index=0,if=floppy,format=raw,file=${1} -m 64 -monitor stdio -no-reboot -d int,cpu_reset,exec,in_asm -vga std -vnc :0 2> log/run_err.log +fi