Cheribuild

cheribuild

Guide lines from github issue

If you’re using one of the CMake-based builds, you have two options:

  • cross-compiled examples in /cheribuild/pycheribuild/projects/cross
  • Copy one of them and modify the project name and git repository, and then cutting out most of the CMake options
  • Once the *.py file in the cross directory is created, cheribuild will find it (you can verify with ./cheribuild.py –list-targets). Then you can just try to build it like any other target (e.g., ./cheribuild.py openssl).

defaultconfig.py

//pycheribuild/config/defaultconfig.py:62

class DefaultCheriConfig(CheriConfig):
    def __init__(self, loader: ConfigLoaderBase, availableTargets: list): ...
  • boolean flags: quiet, q; verbose, v; clean, c; force, f; logfile; skip-update; foree-update; skip-configure; reconfigure; -force-configure;
    • compilation-db-in-source-dir;
    • cross-compile-for-mips;
    • cross-compile-for-host: make cross compile projects target the host systems, use cheri clang to compile (tests that we don’t break x86)
    • make-without-nice;
    • make-jobs, j, type=int;
  • Configure paths:
    • source-root; output-root; build-root;
  • all options added to loader: ConfigLoaderBase object.

class ConfigLoaderBase:

defined in pycheribuild/config/loader.py

  • argument groups:
    • actionGroup
    • pathGroup
    • crossCompileOptionsGroup
    • testsGroup
    • benchmarkGroup
    • run_group
    • freebsdGroup
    • dockerGroup

projects source

  • project
    • contains: warning options.
  • bear
  • binutils
  • bmake
  • bsdtar
  • build_qemu
  • cheri_afl
  • cherios
  • cherisim
  • cheritrace
  • cherivis
  • cmake
  • disk_image
  • effectivesan
  • elftoolchain
  • gnustep
  • go
  • kdevelop
  • llvm
  • makefs_linux
  • ninja
  • qtcreator
  • run_fpga
  • run_qemu
  • sail
  • samba
  • sdk
  • soaap
  • softboundcerts
  • spike
  • syzkaller
  • valgrind

cheribsd

pycheribuild/projects/cross/cheribsd.py pycheribuild/boot_cheribsd/init.py

cherios

pycheribuild/projects/cherios.py

disk-image

pycheribuild/projects/disk_image.py

llvm

pycheribuild/projects/llvm.py

cross-compiling source

  • asio
  • bbl
  • benchmarks
  • bodiagsuite
  • cheribsd
  • cheritest
  • compiler-rt
  • crosscompilerproject
  • dlmalloc
  • gdb
  • juliet_test_suite
  • libcxx
  • libemwalk
  • llvm_test_suite
  • mrs
  • newlib
  • nginx
  • opensbi
  • postgres
  • python
  • qt5
  • rsync
  • simple_benchmark
  • snmalloc
  • sqlite

gdb

nginx

two files:

  • pycheribuild/projects/cross/crosscompilerproject.py
  • pycheribuild/projects/cross/nginx.py

openssl

Created Apr 8, 2020 // Last Updated Apr 24, 2020

If you could revise
the fundmental principles of
computer system design
to improve security...

... what would you change?