Skip to content

carg-os/carg-os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CargOS

License: GPL v3

CargOS is an educational Unix-like operating system specifically designed for developers. The system is meticulously crafted to balance comprehensive functionality with simplicity. Targeting the expansive community of developers, CargOS aims to establish a development environment from scratch, supporting its own evolution while maintaining efficiency for deployment on low-cost embedded systems. Engaging with and contributing to the development of CargOS offers substantial benefits for those looking to enrich their development experience!

Build and Emulate

CargOS utilizes C23, the latest revision of C. Though it's not currently compatible with the RISC-V GNU toolchains provided by most major Linux distributions. Consequently, users have the option to either compile it from the source or use our pre-compiled binaries. Additional details can be found at carg-os/riscv-gnu-toolchain.

To build CargOS, execute the following commands. Keep in mind that you can specify the path of your compiler by adjusting cmake/toolchain.cmake if CargOS wasn't compiled successfully.

git clone https://github.com/carg-os/carg-os.git
cd carg-os
make

You can emulate CargOS using QEMU (only the subset targeting RV64 is required), which can be done using the following instruction.

make run

Components

CargOS is a repository containing only a single Makefile that automatically finishes the process of cloning, building, and linking all the system components. It resembles the commonly-applied monorepo paradigm, though it differs in that all components are only stored together when being using locally.

Karg is the kernel of CargOS. It abstracts the low-level interfaces of devices and implements the core functionalities of the system. Essential features such as process management, I/O management and file system are all provided by it.

Init is the first process that starts running after the initialization of the kernel. It initializes portions of the system that was not set up by the kernel. After the system initialization, a shell providing interactive and intuitive access to the system is started, with several commands available.

Libc is the C standard library implementation for CargOS. It is designed to adhere rigorously to standard specifications, this ensures the ease of porting applications relying solely on the standard library to CargOS.