diff --git a/KFS-2/Makefile b/KFS-2/Makefile deleted file mode 100644 index 81eb3cb..0000000 --- a/KFS-2/Makefile +++ /dev/null @@ -1,49 +0,0 @@ - -# -# (c) 2020 iomonad -# - -include rules/environment.mk -include rules/assembly.mk -include rules/compiler.mk -include rules/linker.mk - -TARGET = kfs.rom -TARGET_ISO = kfs.iso - -# ==== BEGIN RULES ==== - -prepare: - mkdir -p $(BUILD_DIR) - -bootloader: prepare - $(ASM) $(ASM_FLAGS) $(ASM_SRC) -o $(BOOTLOADER_TARGET) - -kernel: $(KERNEL_TARGETS) - -$(KERNEL_SRC_DIR)/%.o: $(KERNEL_SOURCES)/%.c - $(CC) $(CFLAGS) -c $< -o $@ - -rom: bootloader kernel - $(LINKER) $(LFLAGS) $(BOOTLOADER_TARGET) $(KERNEL_TARGETS) -o $(TARGET) - -post: - strip $(TARGET) - -iso: rom post - mkdir -p $(ISODIR_BOOT) - cp $(TARGET) $(ISODIR)/boot/$(TARGET) - cp boot/grub.cfg $(ISODIR_BOOT)/grub.cfg - grub-mkrescue -o $(TARGET_ISO) --compress=gz --themes="" --install-modules="multiboot" $(ISODIR) - -clean: - rm -fr $(BUILD_DIR) isodir - rm -f $(KERNEL_TARGETS) - -fclean: clean - rm -f $(TARGET) *.iso - -# ==== END RULES ===== - -.PHONY: prepare bootloader kernel rom post -.DEFAULT_GOAL := rom diff --git a/KFS-2/boot/boot.asm b/KFS-2/boot/boot.asm deleted file mode 100644 index 3745800..0000000 --- a/KFS-2/boot/boot.asm +++ /dev/null @@ -1,39 +0,0 @@ - ;; - ;; (c) 2020 iomonad - ;; This is part of the KFS Project - ;; See: https://github.com/iomonad/KFS - ;; - - bits 32 - - ;; Multiboot spec implementation: - ;;------------------------------- - ;; See: - ;; - https://wiki.osdev.org/Multiboot - ;; - https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Header-magic-fields - ;; - https://www.gnu.org/software/grub/manual/multiboot/html_node/boot_002eS.html#boot_002eS - section .text - align 4 - dd 0x1BADB002 ; MAGIC - ;; When 0 in the ‘flags’ word is set, then all boot modules loaded along - ;; with the operating system must be aligned on page (4KB) boundaries. - ;; Some operating systems expect to be able to map the pages containing boot - ;; modules directly into a paged address space during startup, and thus need - ;; the boot modules to be page-aligned. - dd 0x00 - ;; The field ‘checksum’ is a 32-bit unsigned value which, when added to - ;; the other magic fields (i.e. ‘magic’ and ‘flags’), - ;; must have a 32-bit unsigned sum of zero. - dd - (0x1BADB002 + 0x00) - - ;; Entrypoints - global kfs_entry - extern __kmain ; Symbol defined in sources - - ;; Basic Lifecycle - ;; See: - ;; - https://c9x.me/x86/html/file_module_x86_id_31.html - kfs_entry: - cli ; Clear Interrupt Flag - call __kmain - hlt ; Enter halt state diff --git a/KFS-2/boot/grub.cfg b/KFS-2/boot/grub.cfg deleted file mode 100644 index 3bdb094..0000000 --- a/KFS-2/boot/grub.cfg +++ /dev/null @@ -1,3 +0,0 @@ -menuentry "KFS" { - multiboot /boot/kfs.rom -} diff --git a/KFS-2/kernel/includes/kernel.h b/KFS-2/kernel/includes/kernel.h deleted file mode 100644 index c155b4e..0000000 --- a/KFS-2/kernel/includes/kernel.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#ifndef KERNEL_H -#define KERNEL_H - -#include - -/* SYSTEM CONSTANTS */ - -#define PAGE_SIZE 4096 -#define NULL 0 - -typedef enum { - QEMU, - VIRTUALBOX, - BARE_X86 -} __supported_platform; - -extern __supported_platform __running_platform; - -/* OPTMISATIONS */ -#define likely(x) __builtin_expect((x),1) -#define unlikely(x) __builtin_expect((x),0) - -/* ENTRYPOINT */ - -void __kmain(void); - -#endif /* KERNEL_H */ diff --git a/KFS-2/kernel/includes/keyboard.h b/KFS-2/kernel/includes/keyboard.h deleted file mode 100644 index 6905c6e..0000000 --- a/KFS-2/kernel/includes/keyboard.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#ifndef KEYBOARD_H -#define KEYBOARD_H - - -/* BEGIN KEY LIST */ - -#define KEY_A 0x1E -#define KEY_B 0x30 -#define KEY_C 0x2E -#define KEY_D 0x20 -#define KEY_E 0x12 -#define KEY_F 0x21 -#define KEY_G 0x22 -#define KEY_H 0x23 -#define KEY_I 0x17 -#define KEY_J 0x24 -#define KEY_K 0x25 -#define KEY_L 0x26 -#define KEY_M 0x32 -#define KEY_N 0x31 -#define KEY_O 0x18 -#define KEY_P 0x19 -#define KEY_Q 0x10 -#define KEY_R 0x13 -#define KEY_S 0x1F -#define KEY_T 0x14 -#define KEY_U 0x16 -#define KEY_V 0x2F -#define KEY_W 0x11 -#define KEY_X 0x2D -#define KEY_Y 0x15 -#define KEY_Z 0x2C -#define KEY_1 0x02 -#define KEY_2 0x03 -#define KEY_3 0x04 -#define KEY_4 0x05 -#define KEY_5 0x06 -#define KEY_6 0x07 -#define KEY_7 0x08 -#define KEY_8 0x09 -#define KEY_9 0x0A -#define KEY_0 0x0B -#define KEY_MINUS 0x0C -#define KEY_EQUAL 0x0D -#define KEY_SQUARE_OPEN_BRACKET 0x1A -#define KEY_SQUARE_CLOSE_BRACKET 0x1B -#define KEY_SEMICOLON 0x27 -#define KEY_BACKSLASH 0x2B -#define KEY_COMMA 0x33 -#define KEY_DOT 0x34 -#define KEY_FORESLHASH 0x35 -#define KEY_F1 0x3B -#define KEY_F2 0x3C -#define KEY_F3 0x3D -#define KEY_F4 0x3E -#define KEY_F5 0x3F -#define KEY_F6 0x40 -#define KEY_F7 0x41 -#define KEY_F8 0x42 -#define KEY_F9 0x43 -#define KEY_F10 0x44 -#define KEY_F11 0x85 -#define KEY_F12 0x86 -#define KEY_BACKSPACE 0x0E -#define KEY_DELETE 0x53 -#define KEY_DOWN 0x50 -#define KEY_END 0x4F -#define KEY_ENTER 0x1C -#define KEY_ESC 0x01 -#define KEY_HOME 0x47 -#define KEY_INSERT 0x52 -#define KEY_KEYPAD_5 0x4C -#define KEY_KEYPAD_MUL 0x37 -#define KEY_KEYPAD_Minus 0x4A -#define KEY_KEYPAD_PLUS 0x4E -#define KEY_KEYPAD_DIV 0x35 -#define KEY_LEFT 0x4B -#define KEY_PAGE_DOWN 0x51 -#define KEY_PAGE_UP 0x49 -#define KEY_PRINT_SCREEN 0x37 -#define KEY_RIGHT 0x4D -#define KEY_SPACE 0x39 -#define KEY_TAB 0x0F -#define KEY_UP 0x48 - -/* END KEY LIST */ - -/* BEGIN ASCII KEY TABLE */ - -typedef struct key_equivalence { - char k; char eq; -} __k_equivalence; - -extern __k_equivalence __ascii_key_table[]; - -/* END ASCII KEY TABLE */ - -#define KEYBOARD_PORT 0x60 - -/* PROTOTYPES */ - -char kgetkey(void); -void input_vga_showcase(void); - -#endif /* KEYBOARD_H */ diff --git a/KFS-2/kernel/includes/lifecycle.h b/KFS-2/kernel/includes/lifecycle.h deleted file mode 100644 index 561c11c..0000000 --- a/KFS-2/kernel/includes/lifecycle.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#ifndef LIFECYCLE_H -#define LIFECYCLE_H - -void __attribute__ ((cold)) kshutdown(void); - -#endif /* LIFECYCLE_H */ diff --git a/KFS-2/kernel/includes/stdlib.h b/KFS-2/kernel/includes/stdlib.h deleted file mode 100644 index ea4eae7..0000000 --- a/KFS-2/kernel/includes/stdlib.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#ifndef STDLIB_H -#define STDLIB_H - -/* STRING */ -uint32_t strlen(const char *buff); - -#endif /* STDLIB_H */ diff --git a/KFS-2/kernel/includes/time.h b/KFS-2/kernel/includes/time.h deleted file mode 100644 index 8d30950..0000000 --- a/KFS-2/kernel/includes/time.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#ifndef TIME_H -#define TIME_H - -#include - -#define KERNEL_STD_DELAY 0x02FFFFFF - -void ksleep(uint32_t time); - -#endif /* TIME_H */ diff --git a/KFS-2/kernel/includes/types.h b/KFS-2/kernel/includes/types.h deleted file mode 100644 index f90a6ba..0000000 --- a/KFS-2/kernel/includes/types.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#ifndef TYPES_H -#define TYPES_H - -/* Concrete types */ - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; - -#endif /* TYPES_H */ diff --git a/KFS-2/kernel/includes/vga.h b/KFS-2/kernel/includes/vga.h deleted file mode 100644 index 87afa20..0000000 --- a/KFS-2/kernel/includes/vga.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#ifndef VGA_H -#define VGA_H - -#include - -/* - * See: https://en.wikipedia.org/wiki/VGA_text_mode - */ - -#define VGA_ADDRESS 0xB8000 -#define VGA_BUFFER_SIZE 3200 - -enum vga_color { - BLACK = 0x0, - BLUE, - GREEN, - CYAN, - RED, - MAGENTA, - BROWN, - GREY, - DARK_GREY, - BRIGHT_BLUE, - BRIGHT_GREEN, - BRIGHT_CYAN, - BRIGHT_RED, - BRIGHT_MAGENTA, - YELLOW, - WHITE, -}; - -#define VGA_DEFAULT_BG BLACK -#define VGA_DEFAULT_FG WHITE - -/* Video Buffer */ -extern uint16_t *vga_buffer; - -/* INTERNAL FUNCTIONS */ - -void vga_clear_screen(void); -void vga_swrite(const char *buff, uint32_t nbytes, - uint8_t fg, uint8_t bg); -void vga_putcchar(const char c, uint8_t fg, uint8_t bg); -void vga_putchar(const char c); -void vga_delchar(void); -void vga_puts(const char *buff); -void vga_endl(void); - -#endif /* VGA_H */ diff --git a/KFS-2/kernel/sources/kernel.c b/KFS-2/kernel/sources/kernel.c deleted file mode 100644 index 6983ac5..0000000 --- a/KFS-2/kernel/sources/kernel.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#include -#include -#include -#include -#include - -/* Initialize video buffer */ -uint16_t *vga_buffer = (uint16_t*)VGA_ADDRESS; -uint16_t vga_buffer_cursor = 0x00; -uint16_t vga_buffer_line_pos = 0x01; - -/* Initialize platform */ -/* Need to auto determine in future */ -__supported_platform __running_platform = QEMU; - -void __kmain() -{ - vga_clear_screen(); - vga_puts("42"); - vga_endl(); - vga_puts("System is going to halt !"); - ksleep(4000000000); - return kshutdown(); -} diff --git a/KFS-2/kernel/sources/keyboard.c b/KFS-2/kernel/sources/keyboard.c deleted file mode 100644 index 3755c32..0000000 --- a/KFS-2/kernel/sources/keyboard.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#include -#include -#include -#include - -/* - * Qwerty Layout - */ -__k_equivalence __ascii_key_table[] = { - {0x1E, 'A'}, - {0x30, 'B'}, - {0x2E, 'C'}, - {0x20, 'D'}, - {0x12, 'E'}, - {0x21, 'F'}, - {0x22, 'G'}, - {0x23, 'H'}, - {0x17, 'I'}, - {0x24, 'J'}, - {0x25, 'K'}, - {0x26, 'L'}, - {0x32, 'M'}, - {0x31, 'N'}, - {0x18, 'O'}, - {0x19, 'P'}, - {0x10, 'Q'}, - {0x13, 'R'}, - {0x1F, 'S'}, - {0x14, 'T'}, - {0x16, 'U'}, - {0x2F, 'V'}, - {0x11, 'W'}, - {0x2D, 'X'}, - {0x15, 'Y'}, - {0x2C, 'Z'}, - {0x02, '1'}, - {0x03, '2'}, - {0x04, '3'}, - {0x05, '4'}, - {0x06, '5'}, - {0x07, '6'}, - {0x08, '7'}, - {0x09, '8'}, - {0x0A, '9'}, - {0x0B, '0'}, -}; - -/* - * Writer implementation - * https://pdos.csail.mit.edu/6.828/2011/readings/i386/IN.htm - */ -static inline uint8_t -input_kb(uint16_t kb_port) -{ - uint8_t read; - - asm volatile("inb %1, %0" : "=a"(read) : "d"(kb_port)); - return read; -} - -/* - * Reader implementation - * https://pdos.csail.mit.edu/6.828/2011/readings/i386/OUT.htm - */ -static inline void -output_kb(uint16_t kb_port, uint8_t data) -{ - asm volatile("outb %0, %1" : "=a"(data) : "d"(kb_port)); -} - -/* - * Get key input frow keyport - * hardware port - */ -char kgetkey(void) -{ - char c = 0; - - while ((c = input_kb(KEYBOARD_PORT)) != 0) { - if (likely(c >= 0)) { - goto _valid; - } - } -_valid: - return c; -} - -/* - * Convert input key to ascii - * equivalent - */ -char keytoascii(const char key) -{ - uint32_t tsize; - - tsize = sizeof(__ascii_key_table) / sizeof(__ascii_key_table[0]); - for (uint32_t i = 0; i < tsize; i++) { - if (__ascii_key_table[i].k == key) { - return __ascii_key_table[i].eq; - } - } - return 0x00; -} - - -void input_vga_showcase(void) { - - char ch = 0; - char keycode = 0; - - do { - keycode = kgetkey(); - if(keycode == KEY_ENTER) { - vga_endl(); - } else if (keycode == KEY_BACKSPACE) { - vga_delchar(); - } else { - ch = keytoascii(keycode); - vga_putchar(ch); - } - ksleep(KERNEL_STD_DELAY); - } while(ch >= 0); - -} diff --git a/KFS-2/kernel/sources/lifecycle.c b/KFS-2/kernel/sources/lifecycle.c deleted file mode 100644 index 3aff849..0000000 --- a/KFS-2/kernel/sources/lifecycle.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#include - -/* - * See: https://wiki.osdev.org/Shutdown - */ -void __attribute__ ((cold)) kshutdown(void) -{ - switch (__running_platform) { - case QEMU: - __asm__ __volatile__( "\n\ - movw $0x2000, %%ax;\n\ - movw $0x0604, %%dx;\n\ - outw %%ax, %%dx; \n" : : : "%eax", "%edx"); - break; - case VIRTUALBOX: - __asm__ __volatile__( "\n\ - movw $0x3400, %%ax;\n\ - movw $0x4004, %%dx;\n\ - outw %%ax, %%dx; \n" : : : "%eax", "%edx"); - break; - case BARE_X86: - asm volatile("mov %ax, 0x1000"); - asm volatile("mov %ax, %ss"); - asm volatile("mov %sp, 0xf000"); - asm volatile("mov %ax, 0x5307"); - asm volatile("mov %bx, 0x0001"); - asm volatile("mov %cx, 0x0003"); - asm volatile("int $0x15"); - break; - default: - asm volatile("ret"); - break; - } -} diff --git a/KFS-2/kernel/sources/stdlib.c b/KFS-2/kernel/sources/stdlib.c deleted file mode 100644 index 723c8ea..0000000 --- a/KFS-2/kernel/sources/stdlib.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#include - -/* STRING */ - -uint32_t strlen(const char *buff) -{ - uint32_t i; - - i = 0; - while (buff[i] != '\0') { - i++; - } - return i; -} - -uint32_t strcmp(const char *needle, - const char *haystack) -{ - while (*needle && (*needle == *haystack)) { - needle++, haystack++; - } - return *(const uint32_t*)needle - *(const uint32_t*)haystack; -} diff --git a/KFS-2/kernel/sources/time.c b/KFS-2/kernel/sources/time.c deleted file mode 100644 index aab1dae..0000000 --- a/KFS-2/kernel/sources/time.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#include - -static inline void -__kernel_block_io(uint32_t wait_for) -{ - for (;;) { - /* Prevent cpu wake up */ - asm volatile("nop"); - wait_for--; - if (likely(wait_for <= 0)) { - goto _done; - } - } -_done: - return ; -} - -/* - * Kernel space sleep implementation - */ -void ksleep(uint32_t time) -{ - return __kernel_block_io(time); -} diff --git a/KFS-2/kernel/sources/vga.c b/KFS-2/kernel/sources/vga.c deleted file mode 100644 index d99998c..0000000 --- a/KFS-2/kernel/sources/vga.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * - * (c) 2020 iomonad - * - * This is part of the KFS Project - * See: https://github.com/iomonad/KFS - * - */ -#include -#include -#include - -extern uint16_t *vga_buffer; -extern uint16_t vga_buffer_cursor; -extern uint16_t vga_buffer_line_pos; -/* - * Helper function to correctly - * apply colorset on the desired - * input character. - */ -static uint16_t vga_cook_char(unsigned char c, - uint8_t foreground, - uint8_t background) -{ - uint16_t ax; - uint8_t ah, al; - - /* - * 16 bit video buffer elements(register ax) - * ----------------------------------------- - * 8 bits(ah) higher : - * lower 4 bits - forec olor - * higher 4 bits - back color - * - * 8 bits(al) lower : - * 8 bits : ASCII character to print - */ - ax = ah = al = 0x0; - ah = background; - ah <<= 4; - ah |= foreground; - ax = ah; - ax <<= 8; - al = c; - ax |= al; - return ax; -} - -/* - * Reset Screen state - */ -void vga_clear_screen(void) -{ - for (uint32_t i = 0; i < VGA_BUFFER_SIZE; ++i) { - vga_buffer[i] = vga_cook_char(NULL, VGA_DEFAULT_FG, VGA_DEFAULT_BG); - } - vga_buffer_cursor = 0x0; -} - -/* - * Put char at position with color - */ -void vga_putcchar(const char c, uint8_t fg, uint8_t bg) { - vga_buffer[vga_buffer_cursor] = vga_cook_char(c, fg, bg); - vga_buffer_cursor++; -} - -/* - * Put char at position with default color - */ -void vga_putchar(const char c) { - vga_putcchar(c, VGA_DEFAULT_FG, VGA_DEFAULT_BG); -} - - -/* - * Delete char on vga - */ -void vga_delchar(void) { - if (vga_buffer_cursor == 0) { - return ; - } - if ((vga_buffer_cursor - 1) % 80 == 0) { - vga_buffer_line_pos--; - } - vga_buffer_cursor--; - vga_buffer[vga_buffer_cursor] = - vga_cook_char(NULL, VGA_DEFAULT_FG, VGA_DEFAULT_BG); -} - -/* - * Secure VGA Write - */ -void vga_swrite(const char *buff, uint32_t nbytes, - uint8_t fg, uint8_t bg) -{ - for (uint32_t i = 0; buff[i] != '\0' && i < nbytes; i++) { - if (buff[i] == 0x0A) { - vga_endl(); - continue ; - } else if (buff[i] == 0x09) { - vga_buffer_cursor += 0x08; - continue ; - } - vga_buffer[vga_buffer_cursor] = vga_cook_char(buff[i], fg, bg); - vga_buffer_cursor++; - } -} - -/* - * Write call wrapper - */ -void vga_puts(const char *buff) { - uint32_t len; - - len = strlen(buff); - vga_swrite(buff, len, VGA_DEFAULT_FG, VGA_DEFAULT_BG); -} - - -/* - * New line handler - */ -void vga_endl(void) -{ - /* - * Next Page Handling - */ - if (vga_buffer_line_pos >= 55) { - vga_buffer_line_pos = 0x0; - vga_clear_screen(); - } - vga_buffer_cursor = 80 * vga_buffer_line_pos; - vga_buffer_line_pos += 1; -} diff --git a/KFS-2/linker.ld b/KFS-2/linker.ld deleted file mode 100644 index 59e90e6..0000000 --- a/KFS-2/linker.ld +++ /dev/null @@ -1,35 +0,0 @@ -/* entry point of our kernel */ -ENTRY(kfs_entry) - -SECTIONS -{ - /* we need 1MB of space atleast */ - . = 1M; - - /* text section */ - .text BLOCK(4K) : ALIGN(4K) - { - *(.multiboot) - *(.text) - } - - /* read only data section */ - .rodata BLOCK(4K) : ALIGN(4K) - { - *(.rodata) - } - - /* data section */ - .data BLOCK(4K) : ALIGN(4K) - { - *(.data) - } - - /* bss section */ - .bss BLOCK(4K) : ALIGN(4K) - { - *(COMMON) - *(.bss) - } - -} diff --git a/KFS-2/rules/assembly.mk b/KFS-2/rules/assembly.mk deleted file mode 100644 index 21fa1d3..0000000 --- a/KFS-2/rules/assembly.mk +++ /dev/null @@ -1,4 +0,0 @@ -ASM = nasm -ASM_FLAGS = -f elf32 -ASM_SRC = boot/boot.asm -BOOTLOADER_TARGET = build/boot.o diff --git a/KFS-2/rules/compiler.mk b/KFS-2/rules/compiler.mk deleted file mode 100644 index da4fd41..0000000 --- a/KFS-2/rules/compiler.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# (c) 2020 iomonad -# - -CC = gcc -CFLAGS = -m32 -std=gnu99 \ - -fno-builtin -fno-exceptions \ - -fno-stack-protector \ - -nostdlib -nodefaultlibs \ - -Wshadow -Wunreachable-code -Wswitch-enum \ - -Wstrict-prototypes -Werror \ - -O2 -Wall -Wextra -c $(LIBS_FLAGS) - -LIBS_FLAGS = -I$(KERNEL_INC_DIR) -KERNEL_SRC_FILES = kernel.c vga.c keyboard.c stdlib.c time.c lifecycle.c -KERNEL_SOURCES = $(addprefix $(KERNEL_SRC_DIR), $(KERNEL_SRC_FILES)) -KERNEL_TARGETS = $(KERNEL_SOURCES:.c=.o) diff --git a/KFS-2/rules/environment.mk b/KFS-2/rules/environment.mk deleted file mode 100644 index 36e0266..0000000 --- a/KFS-2/rules/environment.mk +++ /dev/null @@ -1,7 +0,0 @@ -KERNEL_DIR = kernel/ -KERNEL_SRC_DIR = $(addprefix $(KERNEL_DIR), sources/) -KERNEL_INC_DIR = $(addprefix $(KERNEL_DIR), includes/) - -BUILD_DIR = build/ -ISODIR = isodir -ISODIR_BOOT = $(ISODIR)/boot/grub diff --git a/KFS-2/rules/linker.mk b/KFS-2/rules/linker.mk deleted file mode 100644 index e388bc0..0000000 --- a/KFS-2/rules/linker.mk +++ /dev/null @@ -1,2 +0,0 @@ -LINKER = ld -LFLAGS = -m elf_i386 -T linker.ld -nostdlib diff --git a/KFS-1/Makefile b/Makefile similarity index 100% rename from KFS-1/Makefile rename to Makefile diff --git a/KFS-1/boot/boot.asm b/boot/boot.asm similarity index 100% rename from KFS-1/boot/boot.asm rename to boot/boot.asm diff --git a/KFS-1/boot/grub.cfg b/boot/grub.cfg similarity index 100% rename from KFS-1/boot/grub.cfg rename to boot/grub.cfg diff --git a/KFS-1/kernel/includes/kernel.h b/kernel/includes/kernel.h similarity index 100% rename from KFS-1/kernel/includes/kernel.h rename to kernel/includes/kernel.h diff --git a/KFS-1/kernel/includes/keyboard.h b/kernel/includes/keyboard.h similarity index 100% rename from KFS-1/kernel/includes/keyboard.h rename to kernel/includes/keyboard.h diff --git a/KFS-1/kernel/includes/lifecycle.h b/kernel/includes/lifecycle.h similarity index 100% rename from KFS-1/kernel/includes/lifecycle.h rename to kernel/includes/lifecycle.h diff --git a/KFS-1/kernel/includes/stdlib.h b/kernel/includes/stdlib.h similarity index 100% rename from KFS-1/kernel/includes/stdlib.h rename to kernel/includes/stdlib.h diff --git a/KFS-1/kernel/includes/time.h b/kernel/includes/time.h similarity index 100% rename from KFS-1/kernel/includes/time.h rename to kernel/includes/time.h diff --git a/KFS-1/kernel/includes/types.h b/kernel/includes/types.h similarity index 100% rename from KFS-1/kernel/includes/types.h rename to kernel/includes/types.h diff --git a/KFS-1/kernel/includes/vga.h b/kernel/includes/vga.h similarity index 100% rename from KFS-1/kernel/includes/vga.h rename to kernel/includes/vga.h diff --git a/KFS-1/kernel/sources/kernel.c b/kernel/sources/kernel.c similarity index 100% rename from KFS-1/kernel/sources/kernel.c rename to kernel/sources/kernel.c diff --git a/KFS-1/kernel/sources/keyboard.c b/kernel/sources/keyboard.c similarity index 100% rename from KFS-1/kernel/sources/keyboard.c rename to kernel/sources/keyboard.c diff --git a/KFS-1/kernel/sources/lifecycle.c b/kernel/sources/lifecycle.c similarity index 100% rename from KFS-1/kernel/sources/lifecycle.c rename to kernel/sources/lifecycle.c diff --git a/KFS-1/kernel/sources/stdlib.c b/kernel/sources/stdlib.c similarity index 100% rename from KFS-1/kernel/sources/stdlib.c rename to kernel/sources/stdlib.c diff --git a/KFS-1/kernel/sources/time.c b/kernel/sources/time.c similarity index 100% rename from KFS-1/kernel/sources/time.c rename to kernel/sources/time.c diff --git a/KFS-1/kernel/sources/vga.c b/kernel/sources/vga.c similarity index 100% rename from KFS-1/kernel/sources/vga.c rename to kernel/sources/vga.c diff --git a/KFS-1/linker.ld b/linker.ld similarity index 100% rename from KFS-1/linker.ld rename to linker.ld diff --git a/KFS-1/rules/assembly.mk b/rules/assembly.mk similarity index 100% rename from KFS-1/rules/assembly.mk rename to rules/assembly.mk diff --git a/KFS-1/rules/compiler.mk b/rules/compiler.mk similarity index 100% rename from KFS-1/rules/compiler.mk rename to rules/compiler.mk diff --git a/KFS-1/rules/environment.mk b/rules/environment.mk similarity index 100% rename from KFS-1/rules/environment.mk rename to rules/environment.mk diff --git a/KFS-1/rules/linker.mk b/rules/linker.mk similarity index 100% rename from KFS-1/rules/linker.mk rename to rules/linker.mk