FireSim Support

112 views
Skip to first unread message

Jason Yu

unread,
Dec 12, 2019, 11:51:15 PM12/12/19
to Keystone Enclave Forum
Hi all!

I am playing with Keystone these days with FireSim. I think I have figured out the right versions of things and the Keystone software can be successfully built, but unfortunately it does not boot correctly (no output to UART). 

It seems that the documentation for Keystone working with FireSim is now outdated (https://github.com/keystone-enclave/keystone/issues/104) now, and it has been long since the last update. Could somebody give me some some quick hint on how I could make it work?

Thanks a lot!

Jason

Jason Yu

unread,
Dec 13, 2019, 1:25:58 AM12/13/19
to Keystone Enclave Forum
I just succeeded in booting the software after switching to the 4e6fc snapshot of firesim-software (and firesim 1.4.0), which appears to be the last one before the v0.2 documentation whose firesim part is not marked outdated. 

Dayeol Lee

unread,
Dec 16, 2019, 1:11:26 AM12/16/19
to Jason Yu, Keystone Enclave Forum
Hi Jason,

Thanks for letting me know.
We are updating the documentation for FireSim 1.7.0, which is pending for some changes. 
Overall, firesim-1.4.0-keystone branch in https://github.com/keystone-enclave/firesim-software has ./keystone-setup.sh script which automatically updates the submodules and apply required patches for riscv-pk.

We are in the middle of switching from Makefile to CMake, which is required for supporting various ISA (e.g., RV32) and platform.
CMake build system has already landed dev branch, with the documentation for QEMU, but not for FireSim yet.

Further, we are planning to move Keystone to FireMarshal, which is software management tool in FireSim.
These changes will make Keystone way easier to setup and build with a few commands, so please bear with us until we get everything up and running.
Until then, you can still use play with the old versions.

Thank you for your understanding!

Dayeol

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/dd83ef1f-1b58-458f-affb-d8c1e48576dc%40googlegroups.com.

Jason Yu

unread,
Dec 17, 2019, 10:31:23 PM12/17/19
to Keystone Enclave Forum
Hi Dayeol,

Thanks a lot for your help! I have succeeded in setting things up.

I am looking forward to the latest update nevertheless :)

Thanks,
Jason
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

Dayeol Lee

unread,
Jan 28, 2020, 10:27:31 PM1/28/20
to Jason Yu, Keystone Enclave Forum
Hi Jason,

We have updated master brach and also updated FireSim documentation.

It became much easier to work with FireSim as we no longer rely on firesim-software fork.
Instead, you should build Keystone in the manager instance and rewrite configurations to use images built by Keystone repo.

Please refer to the latest document and let me know if you have any questions.

Thanks!


To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/40adabc5-fe4f-4ae5-b7e8-0eaa51899b51%40googlegroups.com.

Justin Tullos

unread,
Feb 16, 2020, 10:23:05 AM2/16/20
to Keystone Enclave Forum
Hey Dayeol,

I figured I'd post here as I'm having some issues with Firesim and Keystone. I can build everything through the Firesim Manager instance, ssh into the node that's instantiated, but after I login to the buildroot, the last instruction says to use "insmod keystone-driver.ko" and the terminal says there's no file or directory found. I know where the file is located on the manager instance, I figured it would be included when the instance is brought up. Do I need to SCP into the buildroot instance and transfer over the file after it's all booted up?

Thanks!

Justin
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

Dayeol Lee

unread,
Feb 17, 2020, 6:11:45 PM2/17/20
to Keystone Enclave Forum
Hi,

Could you try `make image` once again in the build directory and rerun firesim infrasetup, and then see if the machine has those files?
I figured that CMake dependency for initramfs build is somehow wrong right now, so the overlay directory is not properly updated with a single `make image` command.
all files must exist in <build directory>/overlay directory, so you can also scp those files into the instance.

Thanks

Justin Tullos

unread,
Feb 17, 2020, 6:53:51 PM2/17/20
to Keystone Enclave Forum
Will do! I'll try that out soon. I'm going to clone my instance as I had some other issues below:

I had some issues with the Firesim setup. If you install the risc toolchain using Firesim's command after cloning their repo: "./build-setup.sh fast", it installs the risc toolchain in the firesim-software directory. I think this is causing some differences when trying to install keystone and building it, as it kept failing. Instead of "./build-setup.sh fast" I used "./build-setup.sh --submodules-only" and it skips their toolchain install, so that I could use the prebuilt one in the Keystone ./fast-setup.sh.

On my previous attempts, when I had used the toolchain from firesim-software, and then tried to run the Keystone directions at "cmake3 .. -Dfiresim=y", buildroot fails the build. It returns: "Incorrect selection of kernel headers: expected 4.13.x, got 5.0.x". 

Another issue was in the Keystone fast-setup.sh script, maybe on my end but I'm running all the same directions each by the Firesim and Keystone documentation. The sha256sum, keeps exiting and saying "unknown command: --ignore-missing". Not really sure why, because it verifies the 1.0 version correctly, but I know there is a 1.0 and a 2.0 version. I commented it out after it verified the first time and failed with the unknown command, and it progresses correctly. 

Right now everything has built correctly by changing the things above different from Firesim directions. It took me a few instance wipes to nail it down. But hope this helps you guys for what's different, especially for new users like myself just a few weeks ago. 

Dayeol Lee

unread,
Feb 17, 2020, 8:44:02 PM2/17/20
to Keystone Enclave Forum
Thanks for sharing! 
We should've clarify that you need to use the toolchain provided by Keystone, not one provided by FireSim, as they may have different linux tool versions which results in different linux header versions.
This seems to be the cause of the error "Incorrect selection of kernel headers: expected 4.13.x, got 5.0.x"
Also, I think the sha256sum utility may also different in CentOS (FireSim manager instance) from Ubuntu.
We will try to reproduce your case and update the document.

Justin Tullos

unread,
Feb 17, 2020, 8:44:27 PM2/17/20
to Keystone Enclave Forum
So after "make image" again, still no keystone-driver.ko. Attached is a screenshot of the files on the node. 

I'll try again but having files in the overlay directory.
Capture.JPG

Dayeol Lee

unread,
Feb 17, 2020, 8:53:09 PM2/17/20
to Justin Tullos, Keystone Enclave Forum
In the build directory, could you try ./scripts/run-qemu.sh and see what's in the disk image?
It'll boot the same bbl image (<build dir>/riscv-pk.build/bbl) with initramfs'ed linux kernel with QEMU.
If that doesn't have a driver, try `make driver` and see if it succeeds.

To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/67aeea82-37c1-4b87-a938-3030ee4579a1%40googlegroups.com.

Justin Tullos

unread,
Feb 18, 2020, 6:22:43 PM2/18/20
to Keystone Enclave Forum
Hey Dayeol,

Thanks for the info and all the help! Running that script was easier than booting into the node. 

So I figured out what was going on, I just need to nail down where it's happening. I made image again, then used run-qemu.sh, still no keystone-driver.ko. But in the build/overlay directory, there's another folder called root, that has the driver and tests.ke. So I copied both just to the overlay directory. Made image again, and ran the script and now they both show up in the image, along with the other: "files" directory that was there before.

I haven't started looking through the make file for it, but it's putting both the driver and tests.ke into a folder called "root" inside the overlay folder. 

I'm going to boot up a node and I'm assuming it'll be there correctly now. 
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

Jason Kang

unread,
Apr 14, 2020, 10:09:57 PM4/14/20
to Keystone Enclave Forum
Hi Justin,

I am also trying out keystone firesim for the past 2 weeks and i also have encountered some issue. I have followed what you written below but i am still getting errors when i launch the firesim infrasetup.

Can you please help to advise. Thks.

These are my workflow in the instances:
2) Setting up Firesim Repo by using ./build-setup.sh --submodules-only
3) run simulation with the config below:
in the config_runtime.ini
f1_2xlarges=1,
topology=no_net_config
no_net_num_nodes=1
defaulthwconfig=firesim-rocket-quadcore-no-nic-l2-llc4mb-ddr3




Thks.
Reply all
Reply to author
Forward
0 new messages