Go to file
2024-09-20 12:41:25 +02:00
boot feature: kalloc_frame and demo in the main 2024-09-19 17:04:35 +02:00
config makefile: add rule: iso creation && run_iso 2024-09-07 11:56:18 +02:00
headers Merge branch 'main' of git.chauvet.pro:starnakin/42_KFS 2024-09-20 12:41:25 +02:00
libbozo feature: log level on kprintf (color) 2024-09-20 12:40:36 +02:00
src Merge branch 'main' of git.chauvet.pro:starnakin/42_KFS 2024-09-20 12:41:25 +02:00
.clang-format style: clang-format on all files 2024-09-18 22:30:11 +02:00
.gitignore feature: functional shell with help and merdella commands 2024-09-10 20:03:33 +02:00
.gitmodules ratio submodule 2024-09-07 14:40:46 +02:00
Makefile feature: print_stack working (dont use opti flags, else the stack is broken) 2024-09-17 11:10:41 +02:00
README.md add: readme 2024-09-17 11:55:42 +02:00

KFS (Kernel From Scratch)

This project aims to explore how a kernel works by building our own, gaining hands-on experience with core concepts like memory management, interrupt, keyboard driver, etc

INSTALLATION

Cross compile the compile

THE DOCUMENTATION

export PREFIX="$HOME/opt/cross"
export TARGET=i386-elf
export PATH="$PREFIX/bin:$PATH"
mkdir $HOME/src
cd $HOME/src
tar xf [your binutils archive]
tar xf [your gcc archive]
tar xf [your gdb archive]
  • (protips use -j [nb core])
  • Compile binutils
cd $HOME/src
mkdir build-binutils

cd build-binutils
../binutils-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
make
make install
  • Compile gdb
cd $HOME/src
mkdir build-gdb

cd build-gdb
../gdb.x.y.z/configure --target=$TARGET --prefix="$PREFIX" --disable-werror
make all-gdb
make install-gdb
make
make install
  • Compile gcc
cd $HOME/src

# The $PREFIX/bin dir _must_ be in the PATH. We did that above.
which -- $TARGET-as || echo $TARGET-as is not in the PATH

mkdir build-gcc
cd build-gcc
../gcc-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers
make all-gcc
make all-target-libgcc
make install-gcc
make install-target-libgcc

Compile and the start the kernel

make run