keystone-enclave / keystone

Keystone Enclave (QEMU + HiFive Unleashed)
Other
470 stars 135 forks source link

Compile failed without docker #287

Open jxq96 opened 2 years ago

jxq96 commented 2 years ago

I followed the keystone document to try run keystone on qemu. And I got "RISC-V toolchain and Keystone SDK have been fully setup" after setup. But when I tried to make, failed for "MAKESELF-NOTFOUND: not found". I'm not sure what is the MAKESELF-NOTFOUND and where to get it.

bdelgado1995 commented 2 years ago

I ran into this too. I needed to install the 'makeself' package from apt get and then wipe out and start the entire build over.

jxq96 commented 2 years ago

Yes, I passed this step after install makeself in ubuntu, but still cannot pass the compilation for the wrong version of my cross-compile. So I decided build and run keystone inside docker. But I want to modify the provided eapp, but after modifying the hello.c to print other string did not work. I modified the hello.c and make clean & make & make run-tests, but I got the same output as before modification. Do you know how to make my modification work? Thank you!

bdelgado1995 commented 2 years ago

It is possible to build keystone for qemu, I needed to tweak two or three things so if you want to try that again sometime, let me know which error you're getting. I did it on Ubuntu 20 about a week ago.

I think for your example, you may be missing the steps on this page starting with "Next, you need to copy the enclave packages.." http://docs.keystone-enclave.org/en/latest/Getting-Started/QEMU-Run-Tests.html

e.g. find ./examples/ -name '*.ke' -exec cp {} ./overlay/root/ \; cp sm.build/platform/generic/firmware/fw_payload.bin overlay/root/ make image

At this point, though, I ran into a problem. I think I got a hello application to work once but later I was getting some segmentation fault which I think is because the toolchain at that point wasn't somehow set to MUSL C. I will have to try that all again.

dayeol commented 2 years ago

Which branch are you on?