Hi,
I am trying to run CheriBSD on Morello FVP. I am using Ubuntu 18.04 and the latest version of cmake. When I try to run "./cheribuild.py run-fvp-morello-purecap" I am receiving the error "Fatal error (in target run-fvp-morello-purecap): Firmware path /home/oliver/cheri/output/morello-sdk/firmware/morello-fvp is invalid, set the --run-fvp-morello-purecap/firmware-path config option!".
I'm unsure how to solve this, could I please be advised how to set the config option if that's what I need to do?
Many thanks.
Did you already run that with -d? Without -d (--include-dependencies) it won't have done any of the pre-requisite steps, like build CheriBSD, install the FVP and download the FVP firmware. That error's printed when the FVP firmware isn't present at the expected path.
Hi Jessica, thanks for your reply. I have tried this to install the FVP and dependencies using -d, however that gave me this error:
"Fatal error (in target gmp-morello-hybrid-for-purecap-rootfs): Command `hg --noninteractive --config ui.merge=diff3 --config 'merge-tools.diff3.args=$local $base $other -m > $output' clone https://gmplib.org/repo/gmp /home/oliver/cheri/gmp` failed with non-zero exit code 2. Working directory was /Standard error was:[Errno 2] No such file or directory: 'hg': 'hg' "
When I then attempted to run again without -d, I again received the previous error about the firmware-path config option.
I'm not sure how much it matters, but it appears bmake is being denied permission for some activities. Also, it seems to find an installed copy of the FVP, stating "Morello FVP version detected as (0, 11, 27)Expected FVP version 0.11.27 is already installed. Run with --clean to reinstall."
I hope this extra info helps discern the problem.
oirvin99 said:Hi Jessica, thanks for your reply. I have tried this to install the FVP and dependencies using -d, however that gave me this error: "Fatal error (in target gmp-morello-hybrid-for-purecap-rootfs): Command `hg --noninteractive --config ui.merge=diff3 --config 'merge-tools.diff3.args=$local $base $other -m > $output' clone https://gmplib.org/repo/gmp /home/oliver/cheri/gmp` failed with non-zero exit code 2. Working directory was /Standard error was:[Errno 2] No such file or directory: 'hg': 'hg' "
Install Mercurial; the newer version of GDB we're using requires GMP, for which the official upstream is a Mercurial repository.
oirvin99 said:When I then attempted to run again without -d, I again received the previous error about the firmware-path config option.
That's expected, the morello-firmware target ends up being attempted after GMP and GDB so you still won't yet have installed it.
oirvin99 said:I'm not sure how much it matters, but it appears bmake is being denied permission for some activities.
Those are known and harmless.
oirvin99 said:Also, it seems to find an installed copy of the FVP, stating "Morello FVP version detected as (0, 11, 27)Expected FVP version 0.11.27 is already installed. Run with --clean to reinstall."
That's expected, the first thing it'll do is try to install the FVP, but it sees the expected version is already installed so skips it and prints an informational message. There's no need to reinstall, it's just telling you how to force it if you really want to. Note that the FVP and the firmware for the FVP are entirely separate, so having the FVP installed says nothing about whether you have firmware for it installed.
Out of interest, is there a reason you're choosing to use the FVP? We have a Morello port in our QEMU which is significantly faster and nicer to use, at the expense of not being so closely aligned with the Morello board/SoC, only the instruction set. For most things this doesn't matter, it's only important if you're writing an operating system to run on a Morello board and want to test it in an emulator. If you want to use QEMU instead then use run-morello-purecap without the -fvp in there, though the FVP should work and does have value thanks to its board-level emulation and being the official emulator from Arm.
Hi Jessica,
Thanks, I've made 'some' progress it seems. I installed Mercurial and ran with -d again. When I attempt run-fvp-morello-purecap now (with or without -d), I receive a blank terminal window titled "Fast Models - Morello HDLCD (Morello)", as well as another window "Fast Models - Morello" which appears to be displaying live hardware info about the FVP." The original terminal window also outputs the following statements among other text. I'm again unsure of whether or not they may indicate an issue:
"Note: Configuration file /home/oliver/.config/cheribuild.json does not exist, using only command line arguments.
Warning: Morello_Top: GPU model fails to read settings.ini! Default configuration options will be used.In file: (unknown):0
Info: Morello_Top: Morello_Top.soc.scp_qspi_loader: FlashLoader: Loaded 122 kB from file '/home/oliver/cheri/output/morello-sdk/firmware/morello-fvp/scp_ap_image.bin'
Info: Morello_Top: Morello_Top.soc.mcp_qspi_loader: FlashLoader: Loaded 28 kB from file '/home/oliver/cheri/output/morello-sdk/firmware/morello-fvp/mcp_image.bin'sh: 1: xterm: not foundsh: 1: xterm: not foundsh: 1: xterm: not foundsh: 1: xterm: not found"
I am using the FVP as this is all for a university project where I will later be using a physical Morello board instead of an emulator, this is just to allow me to try out CHERI programs and see how they function compared to other programs before that stage. Hope that makes sense!
oirvin99 said:Info: Morello_Top: Morello_Top.soc.mcp_qspi_loader: FlashLoader: Loaded 28 kB from file '/home/oliver/cheri/output/morello-sdk/firmware/morello-fvp/mcp_image.bin'sh: 1: xterm: not foundsh: 1: xterm: not foundsh: 1: xterm: not foundsh: 1: xterm: not found"
This is your problem; Arm's FVP by default will spawn a bunch of terminal windows using xterm for the various serial consoles, and cheribuild will use that by default unless it detects you don't have X11 available (i.e. the DISPLAY environment variable isn't set). You should either install xterm or use --run-fvp/force-headless to turn that off and get just the main serial console in the current terminal window.
oirvin99 said:I am using the FVP as this is all for a university project where I will later be using a physical Morello board instead of an emulator, this is just to allow me to try out CHERI programs and see how they function compared to other programs before that stage. Hope that makes sense!
QEMU is almost certainly better for that; normal programs should function identically on the FVP and QEMU since they just care about the ISA. It's only the operating system and firmware that really cares about what it's running on, and even then most of the operating system parts are about the ISA still, not the specific device drivers. I would therefore still recommend QEMU, but the FVP should still work.
I tried running with QEMU and it seems to have worked first time! I am going to see if I am able to use this as I see no reason why not. Thanks so much for your help.