Programs: loading, 1 fake syscall.. (bad) #12

Merged
xamidev merged 9 commits from programs into main 2024-09-23 16:41:44 +02:00
21 changed files with 8 additions and 8 deletions
Showing only changes of commit 87bb1d96fd - Show all commits

View File

@@ -7,14 +7,14 @@ ASFLAGS = -f elf
SRC_DIR = src SRC_DIR = src
KERNEL_DIR = $(SRC_DIR)/kernel KERNEL_DIR = $(SRC_DIR)/kernel
LIBC_DIR = $(SRC_DIR)/libc LIBC_DIR = $(SRC_DIR)/libc
PROGRAMS_DIR = $(SRC_DIR)/programs UTILS_DIR = $(SRC_DIR)/utils
DRIVERS_DIR = $(SRC_DIR)/drivers DRIVERS_DIR = $(SRC_DIR)/drivers
INCLUDE_DIR = include INCLUDE_DIR = include
FONTS_DIR = $(INCLUDE_DIR)/fonts FONTS_DIR = $(INCLUDE_DIR)/fonts
OBJ_DIR = build OBJ_DIR = build
C_SOURCES = $(wildcard $(KERNEL_DIR)/*.c) $(wildcard $(LIBC_DIR)/*.c) $(wildcard $(PROGRAMS_DIR)/*.c) $(wildcard $(DRIVERS_DIR)/*.c) C_SOURCES = $(wildcard $(KERNEL_DIR)/*.c) $(wildcard $(LIBC_DIR)/*.c) $(wildcard $(UTILS_DIR)/*.c) $(wildcard $(DRIVERS_DIR)/*.c)
ASM_SOURCES = $(wildcard $(KERNEL_DIR)/*.s) $(wildcard $(LIBC_DIR)/*.s) $(wildcard $(PROGRAMS_DIR)/*.s) $(wildcard $(DRIVERS_DIR)/*.s) ASM_SOURCES = $(wildcard $(KERNEL_DIR)/*.s) $(wildcard $(LIBC_DIR)/*.s) $(wildcard $(UTILS_DIR)/*.s) $(wildcard $(DRIVERS_DIR)/*.s)
OBJECTS = $(patsubst $(SRC_DIR)/%, $(OBJ_DIR)/%, $(C_SOURCES:.c=.o) $(ASM_SOURCES:.s=.o)) OBJECTS = $(patsubst $(SRC_DIR)/%, $(OBJ_DIR)/%, $(C_SOURCES:.c=.o) $(ASM_SOURCES:.s=.o))
@@ -28,7 +28,7 @@ all: $(OBJ_DIR) kernel.elf
$(OBJ_DIR): $(OBJ_DIR):
mkdir -p $(OBJ_DIR) mkdir -p $(OBJ_DIR)
mkdir -p $(OBJ_DIR)/kernel $(OBJ_DIR)/libc $(OBJ_DIR)/programs $(OBJ_DIR)/drivers $(OBJ_DIR)/fonts mkdir -p $(OBJ_DIR)/kernel $(OBJ_DIR)/libc $(OBJ_DIR)/utils $(OBJ_DIR)/drivers $(OBJ_DIR)/fonts
kernel.elf: $(OBJECTS) $(FONT_OBJ) kernel.elf: $(OBJECTS) $(FONT_OBJ)
ld $(LDFLAGS) $(OBJECTS) $(FONT_OBJ) -o kernel.elf ld $(LDFLAGS) $(OBJECTS) $(FONT_OBJ) -o kernel.elf

View File

@@ -15,7 +15,7 @@
#include "multiboot2.h" #include "multiboot2.h"
#include "kheap.h" #include "kheap.h"
#include "initrd.h" #include "initrd.h"
#include "../programs/programs.h" #include "../utils/utils.h"
#include "../libc/crypto.h" #include "../libc/crypto.h"
void kmain(multiboot2_info *mb_info) void kmain(multiboot2_info *mb_info)

View File

@@ -6,7 +6,7 @@
#include "system.h" #include "system.h"
#include "../libc/stdio.h" #include "../libc/stdio.h"
#include "../libc/string.h" #include "../libc/string.h"
#include "../programs/programs.h" #include "../utils/utils.h"
#include "../libc/crypto.h" #include "../libc/crypto.h"
#include <stdint.h> #include <stdint.h>
#include "../drivers/rtc.h" #include "../drivers/rtc.h"

View File

@@ -3,8 +3,8 @@
// Licensed under the Unlicense. See the repo below. // Licensed under the Unlicense. See the repo below.
// https://github.com/xamidev/blankos // https://github.com/xamidev/blankos
#ifndef PROGRAMS_H #ifndef UTILS_H
#define PROGRAMS_H #define UTILS_H
void program_words(); void program_words();
void program_primes(); void program_primes();