Skip to content

Building an OS in C++17 Bare Metal, implementing some STL functionalities

License

Notifications You must be signed in to change notification settings

JuaniRaggio/CCOS

Repository files navigation

CCOS - Custom C++ Operating System
===============================================================================

This is a https://github.com/JuaniRaggio/Ares.git fork.

Prerequisites:
  - docker
  - qemu (qemu-system-x86_64)
  - make

===============================================================================
Compilation setup:
===============================================================================

1. Build Docker image:

  > docker build -t ccos-toolchain .

  This generates an image Debian Bookworm based with:
    - g++-x86-64-linux-gnu (cross-compiler C++17 for x86_64)
    - gcc-x86-64-linux-gnu
    - binutils-x86-64-linux-gnu
    - nasm
    - make
    - qemu-utils

2. Create a new container:

  > docker run -d -v ${PWD}:/root --security-opt seccomp:unconfined -it \
    --name CCOS ccos-toolchain

===============================================================================
Compile and execute:
===============================================================================

3. Compile project:

  > ./compile_in_container.sh

4. Clean compile artifacts:

  > ./clean_in_container.sh

5. Execute in QEMU:

  > ./run.sh

  GDB (port 1234):

  > ./run.sh -d

===============================================================================
Notes:
===============================================================================

- Scripts use "CCOS" as container name by default.
  If you want to have a custom container name:
    ./compile_in_container.sh <CUSTOM_CONTAINER_NAME>

- Rebuild docker image:
    docker build -t ccos-toolchain .

- Toolchain/ModulePacker compiles w/ host's gcc inside the container
  (no need of C++).

===============================================================================

About

Building an OS in C++17 Bare Metal, implementing some STL functionalities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published