Skip to content

Commit

Permalink
Disable KVM, log everything to serial, fix Makefile
Browse files Browse the repository at this point in the history
Disable KVM, as GDB breakpoints stopped working.
Makefile: two unquoted paths caused issues, now that my ~/Programming/exscapeOS is a symlink to a path with a space in its name.
Bochs: use ./bootable.iso instead of an absolute path
Serial: Add serial_send_byte(c) to putchar(), to allow for easy scrolling in panic messages etc.
  • Loading branch information
exscape committed Nov 16, 2014
1 parent 7cc7d3b commit a89e279
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -32,7 +32,8 @@ ALLFILES := $(SRCFILES) $(HDRFILES) $(AUXFILES) $(ASMFILES)
QEMU := qemu-system-i386

# Make sure this is blank if the host OS is not Linux / KVM is not supported
KVM := -machine accel=kvm
#KVM := -machine accel=kvm
KVM :=

all: $(OBJFILES)
@set -e; if [ ! -d "initrd/bin" ]; then \
Expand All @@ -57,7 +58,7 @@ clean:
-$(RM) $(wildcard $(OBJFILES) $(DEPFILES) kernel.bin bootable.iso misc/initrd.img)
@for prog in $(USERSPACEPROG); do \
make -C $$prog clean; \
rm -f initrd/bin/`basename $$prog` ; \
rm -f initrd/bin/`basename "$$prog"` ; \
done
@rm -f initrd/bin/sh

Expand Down
3 changes: 2 additions & 1 deletion exscapeos.bochs
Expand Up @@ -11,7 +11,8 @@ floppy_bootsig_check: disabled=0
# no floppyb
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata1-master: type=cdrom, path="/home/serenity/exscapeOS/bootable.iso", status=inserted, biosdetect=auto, model="Generic 1234"
#ata1-master: type=cdrom, path="/home/serenity/Programming/exscapeOS/bootable.iso", status=inserted, biosdetect=auto, model="Generic 1234"
ata1-master: type=cdrom, path="./bootable.iso", status=inserted, biosdetect=auto, model="Generic 1234"
ata2: enabled=0
ata3: enabled=0
pci: enabled=0
Expand Down
3 changes: 3 additions & 0 deletions src/kernel/console.c
Expand Up @@ -8,6 +8,7 @@
#include <kernel/list.h>
#include <kernel/timer.h>
#include <kernel/time.h>
#include <kernel/serial.h>

/* A character representing empty space on the screen */
static const uint16 blank = (0x7 << 8 /* grey on black */) | 0x20 /* space */;
Expand Down Expand Up @@ -465,6 +466,8 @@ int putchar(int c) {
cursor = &con->cursor;
assert(cursor != NULL);

serial_send_byte(c);

if (c == '\n') {
// c == newline
cursor->x = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/userspace/.user_Makefile
Expand Up @@ -12,7 +12,7 @@ SRCFILES := $(shell find . -type f -name '*.c')
OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
DEPFILES := $(patsubst %.c,%.d,$(SRCFILES))

OUTNAME := $(shell basename `pwd`)
OUTNAME := $(shell basename "`pwd`")

all: $(OBJFILES)
@$(LD) $(LDFLAGS) -o $(OUTNAME) $(OBJFILES)
Expand Down
Empty file modified toolchain/build_newlib_only.sh 100644 → 100755
Empty file.

0 comments on commit a89e279

Please sign in to comment.