Fixed .devcontainer to be as it is in original repo
This commit is contained in:
@@ -27,10 +27,10 @@
|
|||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
// Linux Setup (X11)
|
// Linux Setup (X11)
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
"mounts": [
|
//"mounts": [
|
||||||
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached"
|
//"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached"
|
||||||
],
|
//],
|
||||||
"containerEnv": {},
|
//"containerEnv": {},
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
|||||||
@@ -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",
|
"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",
|
"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",
|
||||||
|
|||||||
@@ -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 target for the kernel
|
||||||
add_executable(uiaos-kernel
|
add_executable(uiaos-kernel
|
||||||
# src/multiboot2.asm # TODO: Add multiboot2 support
|
src/multiboot2.asm # TODO: Add multiboot2 support
|
||||||
src/kernel.c
|
src/kernel.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
16
src/OSDev_18/include/kernel/terminal.h
Normal file
16
src/OSDev_18/include/kernel/terminal.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#include <libc/stdio.h>
|
||||||
|
#include <libc/stdint.h>
|
||||||
|
#include <libc/limits.h>
|
||||||
|
#include <libc/stddef.h>
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include <libc/stdint.h>
|
#include <libc/stdint.h>
|
||||||
|
|
||||||
void kernel_main(void) {
|
void main(void) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
__asm__ volatile ("hlt");
|
__asm__ volatile ("hlt");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 target for the kernel
|
||||||
add_executable(uiaos-kernel
|
add_executable(uiaos-kernel
|
||||||
# src/multiboot2.asm # TODO: Add multiboot2 support
|
src/multiboot2.asm # TODO: Add multiboot2 support
|
||||||
src/kernel.c
|
src/kernel.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user