You are on page 1of 3

GitHub - nanobyte-dev/nanobyte_os: OS tutorial from Nanobyte You... https://github.

com/nanobyte-dev/nanobyte_os

nanobyte-dev / nanobyte_os Public

OS tutorial from Nanobyte YouTube channel.

Unlicense license

394 stars 64 forks Branches Tags Activity

Code Issues 6 Pull requests 5 Actions Projects Wiki Security Insights

1z3 04.02.2024, 19:07


GitHub - nanobyte-dev/nanobyte_os: OS tutorial from Nanobyte You... https://github.com/nanobyte-dev/nanobyte_os

3 Branches 16 Tags Go to file

chibicitiberiu Update README.md last year

.vscode Start implementing core library in C++ 2 years ago

build_scripts Python 3.8 compatibility (removesuffix issue) 2 years ago

image Start implementing core library in C++ 2 years ago

scripts Various fixes 2 years ago

src Memory detection 2 years ago

tools/fat Simplified Makefile 3 years ago

.gitignore Changed build system to scons 2 years ago

LICENSE Change LICENSE to "unlicense" 2 years ago

README.md Update README.md last year

SConstruct Memory detection 2 years ago

requirements.txt Various fixes 2 years ago

README Unlicense license

nanobyte_os
This repository contains the code from the "Building an OS" series on the "Nanobyte" YouTube channel.

Building
First, install the following dependencies:

# Ubuntu, Debian:
sudo apt install build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo wget \
nasm mtools python3 python3-pip python3-parted scons dosfstools libguestfs-tools qemu-system-x86

# Fedora:
sudo dnf install gcc gcc-c++ make bison flex gmp-devel libmpc-devel mpfr-devel texinfo wget \
nasm mtools python3 python3-pip python3-pyparted python3-scons dosfstools guestfs-tools qemu-system-x86

# Arch & Arch-based:


paru -S gcc make bison flex libgmp-static libmpc mpfr texinfo nasm mtools qemu-system-x86 python3 scons

NOTE: to install all the required packages on Arch, you need an AUR helper.

Then you must run python3 -m pip install -r requirements.txt

Next, modify the configuration in build_scripts/config.py . The most important is the toolchain='../.toolchains' option which sets
where the toolchain will be downloaded and built. The default option is in the directory above where the repo is cloned, in a .toolchains
directory, but you will get an error if this directory doesn't exist.

After that, run scons toolchain , this should download and build the required tools (binutils and GCC). If you encounter errors during this
step, you might have to modify scripts/setup_toolchain.sh and try a different version of binutils and gcc. Using the same version as the
one bundled with your distribution is your best bet.

Finally, you should be able to run scons . Use scons run to test your OS using qemu.

Links
Discord channel
Patreon

2z3 04.02.2024, 19:07


GitHub - nanobyte-dev/nanobyte_os: OS tutorial from Nanobyte You... https://github.com/nanobyte-dev/nanobyte_os

Releases

16 tags

Packages

No packages published

Contributors 6

Languages

C 65.0% Assembly 14.7% Python 9.8% C++ 6.8% Shell 3.4% Makefile 0.3%

3z3 04.02.2024, 19:07

You might also like