capablevms / CHERI-ELF-comp

Other
4 stars 1 forks source link

Trying to use this for Morello Linux on Morello Board #8

Closed HelpDesperatelyNeeded closed 1 year ago

HelpDesperatelyNeeded commented 1 year ago

I have Morello Linux running on the Morello Board. How can I start to use this project with it? It isn't clear from the README what I should do/run first.

Will it simply only run on CHERIBSD?

0152la commented 1 year ago

This is currently a work-in-progress, meaning there are still certain features missing, at least for our planned usage. I don't know your use case, the needed features might already be present, you'll have to see.

I have not used it on Morello Linux, but I don't expect it to not work. I am developing on CheriBSD hybrid, from cheribuild, so I'd expect it to work there (it is a few months old cheribuild build). The compiler would be the main question - the one I'm using is (I believe, can double check) cheribsd-morello-hybrid from cheribuild.

At this point, writing detailed usage instructions is a bit difficult, as we are still developing it. However, I suggest looking at the tests folder to get an idea (particularly the manager_* files), and try to build and run the tests via cmake and ctest. Here is (roughly) my compilation script, to give you a start (you can also look at .buildbot.sh, which is our CI script, used to build and run our tests):

export CC=/home/cheriworker/cheri/output/morello-sdk/bin/clang
export CFLAGS="--config cheribsd-morello-hybrid.cfg -DARM"
export ASMFLAGS="--config cheribsd-morello-hybrid.cfg"
export LDFLAGS="--config cheribsd-morello-hybrid.cfg"

build_dir="$(pwd)/build"
src_dir="$(pwd)/"

cmake \
        -G Ninja \
        -DCMAKE_BUILD_TYPE=DEBUG \
        -B $build_dir \
        -S $src_dir
cmake --build $build_dir -v
0152la commented 1 year ago

Since there's been no new updates here, I'll be closing this issue. Do feel free to re-open it, or ask further questions if you need any more help.