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

CheriBSD Morello FVP Pure-Capability - How to cross-compile from source?

Hi there,

I am trying to cross-compile curl from source to CheriBSD Morello FVP Pure-Capability. I have made a note of all the library and package dependencies listed here: https://packages.ubuntu.com/focal/curl and downloaded the original source files for each using the download links provided.

Normally, when compiling for the host system I'm on, I would just use the ./configure scripts provided with each source download, then run make to compile, and make install to install the software. How would I go about cross-compiling curl for CheriBSD Pure-Capability with the Morello FVP? I heard it is possible to make a new target for cheribuild, but looking at the wiki and the guide there on how to do so, I have no idea where to start or what is required. Or maybe it is still possible to use the ./configure scripts, but cross-compile with them?

Thanks in advance!

Parents
  • Once I have created the myproject.py file in cheribuild/pycheribuild/projects/cross, do I have to run the script with ./myproject.py

    That will not work, and that's not how you use any of the other targets so that's not how you use an additional target you've added.

    or does the file only have to be in that directory so it can be used by cheribuild?

    Any .py file in projects/ and projects/cross/ is automatically picked up.

    Another question, is there a way I can keep the machine online, so that I can close the terminal and not have to wait 10 minutes for ./cheribuild run-fvp-morello-purecap to run when I want to boot up again?

    screen/tmux? There's nothing special about cheribuild in this regard.

Reply
  • Once I have created the myproject.py file in cheribuild/pycheribuild/projects/cross, do I have to run the script with ./myproject.py

    That will not work, and that's not how you use any of the other targets so that's not how you use an additional target you've added.

    or does the file only have to be in that directory so it can be used by cheribuild?

    Any .py file in projects/ and projects/cross/ is automatically picked up.

    Another question, is there a way I can keep the machine online, so that I can close the terminal and not have to wait 10 minutes for ./cheribuild run-fvp-morello-purecap to run when I want to boot up again?

    screen/tmux? There's nothing special about cheribuild in this regard.

Children
  • Another question, is there a way I can keep the machine online, so that I can close the terminal and not have to wait 10 minutes for ./cheribuild run-fvp-morello-purecap to run when I want to boot up again?

    screen/tmux? There's nothing special about cheribuild in this regard.

    Although you may be interested in our Morello QEMU port. cheribuild morello-qemu will build it, and cheribuild run-morello-purecap (no -fvp) will run it using the same disk image. It is still a bit experimental but it has been able to run CheriBSD for a couple of months now. There are still some bugs in more obscure parts of the ISA, but rarely anything that should affect userspace development, and given it is many times faster than the FVP you may find it a much more pleasant environment to work in. We are using it in our day-to-day work rather than Arm's FVP, and it is being used in our CI environment for testing CheriBSD changes.