1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

Stuff I don't remember

This commit is contained in:
Julian Barathieu 2019-03-11 14:07:16 +01:00
parent a0bf1215b1
commit 882aaa3844
4 changed files with 31 additions and 6 deletions

View File

@ -37,7 +37,24 @@ OBJDIR=build/obj
BINDIR=build/bin
# Object to link (temp)
l_objects=./build/obj/kaleid/crtlib/memory.o ./build/obj/kaleid/crtlib/rand.o ./build/obj/kaleid/crtlib/string.o ./build/obj/kaleid/crtlib/ultoa.o ./build/obj/kaleid/crtlib/strtol.o ./build/obj/kaleid/crtlib/utoa.o ./build/obj/kaleid/crtlib/status.o ./build/obj/kaleid/crtlib/atoul.o ./build/obj/kaleid/crtlib/atol.o ./build/obj/kaleid/crtlib/itoa.o ./build/obj/kaleid/crtlib/ltoa.o ./build/obj/kaleid/crtlib/atou.o ./build/obj/kaleid/crtlib/arith.o ./build/obj/kaleid/crtlib/atoi.o ./build/obj/kaleid/extras/prog.o ./build/obj/kaleid/extras/argv.o ./build/obj/kaleid/kernel/init/table.o ./build/obj/kaleid/kernel/init/init.o ./build/obj/kaleid/kernel/io/vga.o ./build/obj/kaleid/kernel/io/cursor.o ./build/obj/kaleid/kernel/io/term.o ./build/obj/kaleid/kernel/ke/panic.o ./build/obj/boot/loader.o
l_objects=./build/obj/kaleid/crtlib/memory.o \
./build/obj/kaleid/crtlib/rand.o \
./build/obj/kaleid/crtlib/string.o \
./build/obj/kaleid/crtlib/ultoa.o \
./build/obj/kaleid/crtlib/utoa.o \
./build/obj/kaleid/crtlib/ctype.o \
./build/obj/kaleid/crtlib/itoa.o \
./build/obj/kaleid/crtlib/ltoa.o \
./build/obj/kaleid/crtlib/sprintf.o \
./build/obj/kaleid/extras/prog.o \
./build/obj/kaleid/extras/argv.o \
./build/obj/kaleid/kernel/init/table.o \
./build/obj/kaleid/kernel/init/init.o \
./build/obj/kaleid/kernel/io/vga.o \
./build/obj/kaleid/kernel/io/cursor.o \
./build/obj/kaleid/kernel/io/term.o \
./build/obj/kaleid/kernel/ke/panic.o \
./build/obj/boot/loader.o
#Color codes
CL='\033[0;32m'
@ -92,18 +109,18 @@ make_disk:
@echo ${CL2}[make_disk]${CL} OK${CL3}
test: kernel loader
@qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm
test32: kernel loader
@qemu-system-i386 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
qemu-system-i386 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm
debug: kernel loader
@qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -s -S -enable-kvm 2> qemu.log &
qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -s -S -enable-kvm 2> qemu.log &
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm

View File

@ -27,7 +27,7 @@
// The madman's Makefile
#include "build/preproc.h"
CCNAME="/opt/cross-cc/bin/x86_64-elf-gcc"
CCNAME=x86_64-elf-gcc
CC2NAME=gcc
COPTIM=-O2
CWARNS=-Wall -Wextra // -Werror=implicit-function-declaration

View File

@ -230,6 +230,7 @@ size_t vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
// Unknown/unsupported modifier :|
*str++ = mod;
ret++;
break;
}

View File

@ -28,11 +28,18 @@
//
// Entry point of the Kaleid kernel
//
noreturn void StartKern(void* multibooot_info, int multiboot_magic)
noreturn void StartKern(void *mbInfo, int mbMagic)
{
(void)mbInfo;
(void)mbMagic;
// We're not ready to deal with interrupts
DisableIRQs();
volatile ushort *vga = (volatile ushort *)0xB8000;
*vga++ = 'AA';
// Kernel terminals
InitTerms();