barrydevp / hos

H(obby) operating system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

H(obby) operating system

Hobby or hope?

Written in 3 maybe 4 programing languages, asm, C, Rust, Zig(future).

Prerequisites

For Ubuntu(Debian)-Linux only!

### RUST
#
# install rust nightly and some components
rustup toolchain install nightly

# setup nightly feature by default
# cd into project and run
rustup override set nightly

# add rust-src
rustup component add rust-src

### GCC cross compiler, according to https://wiki.osdev.org/GCC_Cross_Compiler
#
# base package
sudo apt install build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo

# let's build your cross compiler gcc
# your storage
mkdir -p $HOME/opt/cross
mkdir -p $HOME/opt/src

# specify your target, below example is "i686-elf"
export PREFIX="$HOME/opt/cross"
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"

# go to sources
cd $HOME/opt/src

# binutils
curl -O https://ftp.gnu.org/gnu/binutils/binutils-2.39.tar.xz
tar xf binutils-2.39.tar.xz

mkdir build-binutils
cd build-binutils
../binutils-2.39/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
make
make install

# gcc (binutils must completed first)
curl -O https://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz
tar xf gcc-12.2.0.tar.xz

# 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-12.2.0/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

# grub toolchains
sudo apt install grub-pc-bin xorriso mtools

Resources

OS-dev

Rust-kernel

OS Development Series BrokenThorn

Operating system from 0 to 1

Dreamos82 Osdev-Notes

Some other Kernel - OS

mentos <- mainly base on this code base

toaruos

mquy/mos

Dreamos64

About

H(obby) operating system


Languages

Language:C 95.4%Language:Assembly 2.8%Language:Makefile 0.9%Language:Roff 0.5%Language:Shell 0.2%Language:Rust 0.1%Language:GDB 0.0%