keystone-enclave / firemarshal-keystone

Firemarshal Keystone Workload
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Error building keystone with firemarshal #3

Open everetto89 opened 1 year ago

everetto89 commented 1 year ago

Hi, I'm trying to build keystone with firemarshal following the tutorial on https://docs.keystone-enclave.org/en/latest/Getting-Started/Running-Keystone-with-FireSim.html#.

Firemarshal I'm using with the current Chipyard version 1.8.1 related to the current setup tutorial https://chipyard.readthedocs.io/en/stable/Chipyard-Basics/Initial-Repo-Setup.html

Building keystone for firesim with the command

cd <chipyard repo>
cd software/firemarshal
./marshal -v build <path/to/keystone.json>

Gives me the following error:

DEBUG:` make[3]: Leaving directory '/home/user/RISC_V/frameworks/firemarshal-keystone/keystone/build'
DEBUG: make  -f examples/attestation/CMakeFiles/attestor-package.dir/build.make examples/attestation/CMakeFiles/attestor-package.dir/build
DEBUG: make[3]: Entering directory '/home/user/RISC_V/frameworks/firemarshal-keystone/keystone/build'
DEBUG: make[3]: *** No rule to make target 'sm.build/platform/generic/firmware/fw_jump.bin', needed by 'examples/attestation/pkg/fw_jump.bin'.  Stop.
DEBUG: make[3]: Leaving directory '/home/user/RISC_V/frameworks/firemarshal-keystone/keystone/build'
DEBUG: make[2]: *** [CMakeFiles/Makefile2:1057: examples/attestation/CMakeFiles/attestor-package.dir/all] Error 2
DEBUG: make[2]: Leaving directory '/home/user/RISC_V/frameworks/firemarshal-keystone/keystone/build'
DEBUG: make[1]: *** [CMakeFiles/Makefile2:665: examples/CMakeFiles/examples.dir/rule] Error 2
DEBUG: make[1]: Leaving directory '/home/user/RISC_V/frameworks/firemarshal-keystone/keystone/build'
DEBUG: make: *** [Makefile:335: examples] Error 2
TaskError - taskid:/home/user/RISC_V/frameworks/firemarshal-keystone/host-init.sh 
PythonAction Error
Traceback (most recent call last):
  File "/home/user/RISC_V/frameworks/chipyard/.conda-env/lib/python3.9/site-packages/doit/action.py", line 437, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "/home/user/RISC_V/frameworks/chipyard/software/firemarshal/wlutil/build.py", line 51, in handleHostInit
    wlutil.run([config['host-init'].path] + config['host-init'].args, cwd=config['workdir'])
  File "/home/user/RISC_V/frameworks/chipyard/software/firemarshal/wlutil/wlutil.py", line 531, in run
    raise sp.CalledProcessError(p.returncode, prettyCmd)
subprocess.CalledProcessError: Command '/home/user/RISC_V/frameworks/firemarshal-keystone/host-init.sh' returned non-zero exit status 2.

ERROR: Failed to build workload keystone.json

Can you please help here? Thanks in advance!

Best regards Christian

seceng-jan commented 1 year ago

I had the same issue, this helped: https://github.com/keystone-enclave/keystone-sdk/compare/master...zchn:keystone-sdk:dev-attest-dep-fix-pr

Cheers, Jan