-
-
Notifications
You must be signed in to change notification settings - Fork 0
Making
The easiest way to make the file is though Make.
Just make sure you have all essential components (see Dependencies) and run simple command:
make -s floppy_imageAll make options are:
-
all- makes Floppy Disk image with all tools -
floppy_image- makes Floppy Disk image without any tools -
kernel- only makes kernel files -
bootloader- only makes bootloader files -
clean- cleans build folder (THIS WILL PERNAMENTLY DELETE ALL FILES FROMbuildFOLDER) -
always- makes working environment (creates folders) -
tools_fat- makes tools related to FAT filesystem
Please use any Debian/Ubuntu based linux (you can use WSL if you're on Windows)
You will need:
-
Make (part of
build-essential) -
GCC for compiling tools from C (
.c&.h) (part ofbuild-essential) -
NASM for all assembly files (
.asm&.inc) -
mtools for manipulating
.imgfile -
projectOS toolchain is a special set of tools for compiling C (
.c&.h)
apt install build-essential nasm mtools -yprojectOS toolchain is a special set of tools, compilers, headers and utilities that allow compiling C (.c & .h) and making .bin files targeting i686-elf with full support for projectOS
-
Binutils
- using version:
2.41 - additional settings:
with-sysrootdisable-nls
- using version:
-
GCC Cross Compiler for
projectOS- using version:
13.2.0 - languages:
C,C++ - additional settings:
disable-nlswithout-headers
- using version:
Just run (it may take some time):
apt build-dep gcc-12 -y
make toolchainIf it isn't your first-time deploying run this before above:
make clean-toolchainAnd if you used manual deployment please run this instead:
make clean-toolchain-all
apt remove build-essential -y
apt build-dep gcc-12 -y
apt autoremove -y
make toolchainIf you encounter any errors during deploying projectOS toolchain follow these steps:
- Install
build-essentialpackage and check what versions of tools have native support for your OS.
apt install build-essential wget -y
gcc --version
ld --version-
Change
BINUTILS_VERSION&GCC_VERSIONinbuild_scripts/config.mkfor these versions. -
Cleanup after your previous attempt, install dependencies for install, and finally make you toolchain.
make clean-toolchain-all
apt remove build-essential -y
apt build-dep gcc-10 -y
apt autoremove -y
make toolchainIf it doesn't work, you can try manual installation.
Please remember to change {} brackets into what they ask you (it may take some time)
-
GCC linkshould be gotten from https://ftp.gnu.org/gnu/gcc/ -
BINUTILS linkshould be gotten from https://ftp.gnu.org/gnu/binutils/
mkdir toolchain
cd toolchain
apt install build-essential wget -y
apt build-dep gcc-12 -y
wget {GCC link}
wget {BINUTILS link}
tar -xf {GCC tar.gz}
tar -xf {BINUTILS tar.gz}
mkdir binutils-build
cd binutils-build
../{BINUTILS folder name}/configure --target=i686-elf --prefix="{absolute path to toolchain}/i686-elf" --with-sysroot --disable-nls --disable-werror
make -j 8
make install
cd ..
mkdir gcc-build
cd gcc-build
../{GCC folder name}/configure --target=i686-elf --prefix="{absolute path to toolchain}/i686-elf" --disable-nls --enable-languages=c,c++ --without-headers --disable-werror
make -j8 all-gcc
make -j8 all-target-libgcc
make install-gcc
make install-target-libgccIf you've deployed toolchain previously, please run this command before:
rm -rf toolchain
apt remove build-essential -y
apt autoremove -y