InfOS is the Informatics research operating system, designed specifically for the UG3 Operating Systems course.
This project aims to port Doom over to InfOS, the main goal is to extend InfOS with user space graphics.
Before we can attempt to the port, the kernel must be extended. The two main hurdles as of 12 Mar 2021 are:
- Kernel currently uses VGA text mode and does not have framebuffer graphics.
- User space memory allocation is not supported.
- Add multiboot framebuffer graphics support.
- Add memory mapped IO and user space page allocation with
mmap
. - Add framebuffer console output and font rendering.
- Add user space memory allocator.
- Implement frame drawing function in Doom.
- Implement player input functions in Doom.
- Add mouse device support (optional).
The InfOS project builds with a Makefile. This project builds the kernel with the original Makefile but uses CMake for other binaries. To build and generate the a bootable ISO, you would also need GRUB.
Install the dependencies on Ubuntu (ninja is optional)
sudo apt install grub2 xorriso build-essential ninja-build
This project would compile userspace binaries with a different compiler toolchain that needs setup.
Follow https://wiki.osdev.org/GCC_Cross-Compiler to build this, we need to name it x86_64-elf-infos-*
.
On MacOS you can install x86_64-elf-gcc
with Homebrew.
brew install x86_64-elf-gcc
Create a directory to store the toolchain, make sure that it is in your path. This is a quick hack to link the compiler with the correct name.
mkdir $HOME/opt/bin
for elf_bin in /usr/local/bin/x86_64-elf-*
do ln $elf_bin ~/opt/bin/x86_64-elf-infos-${elf_bin##*x86_64-elf-}
done
export PATH="$HOME/opt/bin:$PATH"
This might not be able to build the kernel due to an issue with the toolchain, so if it fails, try compiling the kernel first with make -C infos/
.
mkdir build
cd build
cmake -G Ninja ..
cmake --build . --target grub-bootable-iso rootfs
./run.sh