diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 674f4a2..2390fca 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -27,10 +27,10 @@ //////////////////////////////////// // Linux Setup (X11) //////////////////////////////////// - "mounts": [ - "source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached" - ], - "containerEnv": {}, + //"mounts": [ + //"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached" + //], + //"containerEnv": {}, //////////////////////////////////// diff --git a/build/OSDev_18/compile_commands.json b/build/OSDev_18/compile_commands.json index ef8dee4..fe72fc9 100644 --- a/build/OSDev_18/compile_commands.json +++ b/build/OSDev_18/compile_commands.json @@ -1,4 +1,9 @@ [ +{ + "directory": "/workspaces/AdvOpSys/build/OSDev_18", + "command": "/usr/bin/nasm -I/workspaces/AdvOpSys/src/OSDev_18/include -f elf32 -o CMakeFiles/uiaos-kernel.dir/src/multiboot2.asm.o /workspaces/AdvOpSys/src/OSDev_18/src/multiboot2.asm", + "file": "/workspaces/AdvOpSys/src/OSDev_18/src/multiboot2.asm" +}, { "directory": "/workspaces/AdvOpSys/build/OSDev_18", "command": "/usr/local/bin/i686-elf-gcc -I/workspaces/AdvOpSys/src/OSDev_18/include -g -Wall -Wextra -nostdinc -nostdlib -fno-builtin -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m32 -march=i386 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Wno-main -g -Wno-unused-variable -Wno-unused-parameter -std=gnu99 -o CMakeFiles/uiaos-kernel.dir/src/kernel.c.o -c /workspaces/AdvOpSys/src/OSDev_18/src/kernel.c", diff --git a/src/OSDev_18/CMakeLists.txt b/src/OSDev_18/CMakeLists.txt index e7d725d..e653a82 100644 --- a/src/OSDev_18/CMakeLists.txt +++ b/src/OSDev_18/CMakeLists.txt @@ -58,7 +58,7 @@ set(OS_KERNEL_LINKER "${CMAKE_CURRENT_SOURCE_DIR}/src/arch/${OS_ARCH_TARGET}/lin # Add executable target for the kernel add_executable(uiaos-kernel - # src/multiboot2.asm # TODO: Add multiboot2 support + src/multiboot2.asm # TODO: Add multiboot2 support src/kernel.c ) diff --git a/src/OSDev_18/include/kernel/terminal.h b/src/OSDev_18/include/kernel/terminal.h new file mode 100644 index 0000000..ef76ca4 --- /dev/null +++ b/src/OSDev_18/include/kernel/terminal.h @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +const size_t VGA_HEIGHT = 25; +const size_t VGA_WIDTH = 80; + +static uint16_t* terminalBuffer = (uint16_t*) 0xB8000; + + + +void terminalEntryAt(char c, uint8_t colour, size_t x, size_t y){ + size_t index = y * VGA_WIDTH + x; + terminalBuffer[index] = vgaEntry(c, colour); +} \ No newline at end of file diff --git a/src/OSDev_18/src/kernel.c b/src/OSDev_18/src/kernel.c index 8776044..ab9c143 100644 --- a/src/OSDev_18/src/kernel.c +++ b/src/OSDev_18/src/kernel.c @@ -1,6 +1,6 @@ #include -void kernel_main(void) { +void main(void) { for (;;) { __asm__ volatile ("hlt"); } diff --git a/src/group_name/CMakeLists.txt b/src/group_name/CMakeLists.txt index e7d725d..e653a82 100644 --- a/src/group_name/CMakeLists.txt +++ b/src/group_name/CMakeLists.txt @@ -58,7 +58,7 @@ set(OS_KERNEL_LINKER "${CMAKE_CURRENT_SOURCE_DIR}/src/arch/${OS_ARCH_TARGET}/lin # Add executable target for the kernel add_executable(uiaos-kernel - # src/multiboot2.asm # TODO: Add multiboot2 support + src/multiboot2.asm # TODO: Add multiboot2 support src/kernel.c )