Crescent is a custom operating system distribution, that is going to come with its own set of userspace applications and a desktop environment.
This repository hosts the Crescent kernel and apps.
- Multithreaded pre-emptive custom kernel
- A set of custom userspace applications including a terminal, file manager, desktop environment, browser, media player and some games. (TODO, currently the only userspace application is a dummy echo "terminal")
- Works on real hardware and supports different kinds of devices
- Architectures supported: X86-64 (AArch64 support is planned)
Building the whole distribution is best done using xbstrap, the required tools for that are:
- C/C++ compiler
- xbstrap
- CMake/Meson/Ninja/Make depending on which packages are built
Downloads the prerequisites once by running:
xbstrap prereqs xbps
Clone the crescent bootstrap repository, and proceed with the instructions below in that directory.
Initialize the build directory:
mkdir build
cd build
xbstrap init ..
Installing packages is done using xbstrap install:
# install optinally accepts --rebuild argument for rebuilding the package
xbstrap install <name>
There is a set of meta-packages which you can use to build preselected sets of packages:
base
: includes the kernel and custom apps
Creating a bios/EFI bootable image:
# Create an empty image (usually only needed on a clean build)
xbstrap run create-image
# Sync the sysroot to the image
xbstrap run update-image
Booting the image in Qemu:
# Commands can be chained, for an example you can run
# `xbstrap run update-image qemu`
# to both update the image and launch qemu
xbstrap run qemu
It is also possible build the plain Crescent kernel, for that you need following tools:
- C compiler
- CMake
- Ninja (not strictly needed, but the build commands assume Ninja is used)
Note: If you want to cross-compile to a different architecture, then refer to CMake documentation on toolchain files and add the appropriate flags to below commands.
mkdir build
cd build
cmake -G Ninja ../kernel
ninja
- Basic logging
- Memory
- Page frame allocator
- Page table manager
- General purpose memory allocator
- Interrupt handling
- APIC
- Exceptions
- IO-APIC
- Kernel module loading
- Per-cpu multilevel feedback queue scheduler
- ACPI
- FADT
- MADT
- MCFG
- Power management
- Filesystems
- FAT32
- Ext4 read
- Ext4 write
- Drivers
- SMP
- AHCI SATA
- NVMe
- PS2
- Keyboard
- Mouse
- Generic PCI device interface
- Ethernet
- Realtek RTL8169
- USB
- Generic HCI interface abstraction
- HCI
- UHCI
- OHCI
- EHCI
- XHCI
- Keyboard
- Mouse
- Mass storage