Skip to content
This repository was archived by the owner on Oct 16, 2026. It is now read-only.
cartesiPublic archive

About

Deprecated: Cartesi projects now build with the RISC-V cross-compilers from Debian and Ubuntu

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

8 watching

Forks

Repository files navigation

Cartesi Machine Image Toolchain

Warning

This repository is no longer maintained. Starting with machine-emulator v0.19.0 and machine-guest-tools v0.17.0, Cartesi projects build with the RISC-V cross-compilers packaged by Debian and Ubuntu (gcc-riscv64-linux-gnu, gcc-riscv64-unknown-elf) instead of this image. The cartesi/toolchain images on Docker Hub remain available for older projects. Do not use this repository for new development.

The Cartesi Image Toolchain is the repository that provides the Docker configuration files to build a image containing the RISC-V toolchain. This image is used to compile software for the Cartesi Machine Emulator reference implementation. The current toolchain is based on Debian Bookworm and GNU GCC 10.2.0. The target architecture is RISC-V RV64GC with ABI LP64D and RISC-V RV64IMA with ABI LP64.

Getting Started

Requirements

  • Docker 18.x
  • GNU Make >= 3.81

Build

$ make build

If you want to tag the image with custom name you can do the following:

$ make build TOOLCHAIN_TAG=mytag

If you want to remove the temporary downloaded files for a clean build:

$ make clean

To remove the generated images from your system, please refer to the Docker documentation.

Makefile targets

The following options are available as make targets:

  • build: builds the RISC-V gnu toolchain docker image
  • run: runs the generated image with current user UID and GID
  • run-as-root: runs the generated image as root
  • push: pushes the image to the registry repository
  • clean: cleans temporary downloaded files

Makefile container options

You can pass the following variables to the make target if you wish to use different docker image tags.

  • TOOLCHAIN_TAG: toolchain image tag
$ make build TOOLCHAIN_TAG=mytag

It's also useful if you want to use pre-built images:

$ make run TOOLCHAIN_TAG=latest

Usage

$ make run
  • KERNEL_VERSION: kernel version that the toolchain headers will be based upon.

Customize toolchain headers

You can select different kernel versions to extract the headers from. To do this download the linux source code and move it into the file: linux-$(KERNEL_VERSION).tar.gz.

Then call make with KERNEL_VERSION specified

make KERNEL_VERSION=5.15.63-ctsi-2

Contributing

Thank you for your interest in Cartesi! Head over to our Contributing Guidelines for instructions on how to sign our Contributors Agreement and get started with Cartesi!

Please note we have a Code of Conduct, please follow it in all your interactions with the project.

License

The image-toolchain repository and all contributions are licensed under APACHE 2.0. Please review our LICENSE file.

About

Deprecated: Cartesi projects now build with the RISC-V cross-compilers from Debian and Ubuntu

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages