This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to build Pure-Capability CheriBSD for the Morello Platform to compile, debug and execute software

Hi all,

I apologise in advance, this might be long-winded as I am fairly new to CheriBSD and Morello. I have an AWS machine running Ubuntu 18 on an Intel x64 system.

My aim is to have a CheriBSD instance running the Arm Morello FVP, and to then compile, debug and run various pieces of software. Obviously, some of the source code will have to be amended to account for the CHERI changes to pointers and accepted data types.

A quick read of the CheriBSD GitHub tells me that ./ is my go-to for building all things CheriBSD. I've cloned the cheribuild GitHub repo so that I can use the script to install what I need.

At the moment, I'm running:

./ run-morello-purecap -d

...but my questions are:

What is that coming with? Do I already have everything I need as part of the development toolchain to compile (Clang/LLVM), debug (gdb)? Does that create a disk image? How do I find everything that is being included when running that command?

How do I find the dependencies that are being included and built when using -d?

When running ./ --list-targets, it displays multiple of what look like closely similar options. How do I know which one I need to specify? What is the difference between llvm-native, llvm-morello-purecap, morello-llvm-morello-purecap and llvm, for example? Are some of these simply aliases and mean the same thing? Are some being added to the host machine, and some being added to the CheriBSD instance?

How do the disk-images work with ./cheribuild disk-image-<architecture>? Can I boot from this to save the machine state? How can I save the state of the machine so that I can reboot, and pick back up from where I left off? This would be nice to know so I don't have to build every time I exit or have to use a command like screen, or is this simply not possible.

What is the difference between ./ run-morello-purecap -d  and ./ cheribsd-morello-purecap -d?

If I build using ./cheribuild run-morello-purecap -d and then realise I would like to build another target such as Nginx for example and add it to the instance already built, do I simply run: ./cheribuild nginx-morello-purecap, and it will "amend" the CheriBSD instance, or is there another method I should be using instead?

Does all compilation, debugging etc. take place on the host machine, rather than CheriBSD itself?


I appreciate there are a lot of questions here and a lot to go through, so I appreciate anyone offering help to somebody new to the area! 

If there is any documentation, guides or tutorials that answers my questions, please post the link as I am trying to be a self-learner as much as possible :)