GaloisInc / BESSPIN-CloudGFE

The AWS cloud deployment of the BESSPIN GFE platform.
Apache License 2.0
2 stars 2 forks source link

Activate FireSim peripherals in Debian Builds #91

Closed dhand-galois closed 4 years ago

dhand-galois commented 4 years ago

The IceNIC, IceBLK, and SiFive UART drivers should be added to building Debian.

dhand-galois commented 4 years ago

@kiniry Is someone available to work on this? I'm not sure where we're currently planning to build Debian (testgen? FETT?) so this task may be more appropriately assigned to one of those projects.

kiniry commented 4 years ago

We do build our own Debian images. Various folks have done that in the past (some subset of @podhrmic, @EthanJamesLew, @immindich, etc.). PLs, please pow-wow to figure out who should take this task. @rfoot @Abivin12 @mattlebeau-galois

dhand-galois commented 4 years ago

I added the IceNet and IceBlk drivers directly into the GFE kernel builds as a proof-of-concept. Debian had no issues using both the block device and networking.

May be helpful as a reference point: https://gitlab-ext.galois.com/ssith/riscv-linux/-/commit/a47da69851ef4d0ba287d1e911d55e270fa7ce6c

If you're already using non-mainline kernels this may be good enough, but the more standard way to do this would be build the two drivers externally against the mainline kernel into modules, then add the modules to the initramfs.

dhand-galois commented 4 years ago

It was posted to a different issue, but for quick reference, the original drivers are here:

https://github.com/firesim/iceblk-driver https://github.com/firesim/icenet-driver

They recently updated the icenic driver with a Linux 5.7 change that is not backwards compatible, so you might have to go back one commit from master.

podhrmic commented 4 years ago

That is probably good enough for now. @rtadros-Galois are you able to update your debian build so it uses Dylan's latest commit and try it out in FETT target?

rtadros125 commented 4 years ago

Sure. Opened DARPA-SSITH-Demonstrators/SSITH-FETT-Target#291

kiniry commented 4 years ago

Who owns this issue then?

rtadros125 commented 4 years ago

I don't know which build this ticket is referring to. Is cloudGFE supporting a debian build somewhere? Or are you using the ones provided by FETT-Environment?

podhrmic commented 4 years ago

I think this issue #91 can be closed, since Dylan added the drivers. Ramy - you can probably delegate #291 to someone and continue the discussion there?

kiniry commented 4 years ago

Yes, CloudGFE must support a Debian build for the LMCO Chisel P2 variant.

kiniry commented 4 years ago

MIT is building their own Debian instance at the moment on their Connectal-based BSV P2.

rtadros125 commented 4 years ago

I think this issue #91 can be closed, since Dylan added the drivers. Ramy - you can probably delegate #291 to someone and continue the discussion there?

@podhrmic It was assigned already. Joe is asking about this ticket.

dhand-galois commented 4 years ago

Closing this ticket as we now have a working Debian example that includes both the IceNet and IceBlk drivers. It can be accessed from S3:

s3://firesim-localuser/swpkgs/cloudgfe_binaries.tgz

More info on running it available in the quick-start guide.

Work on integrating this into FETT will be covered in https://github.com/DARPA-SSITH-Demonstrators/SSITH-FETT-Target/issues/291

rtadros125 commented 4 years ago

@dhand-galois I get

Error: (5) invalid-afi-id
The agfi id passed is invalid or you do not have permission to load
the AFI.

When I use the new files. And I noticed that on the same branch, the table in the README has a different AFI id than the one in run_sim.sh, and they are both different than the one we had before. Can you tell me which AFI to use with the new debian image?

dhand-galois commented 4 years ago

Assuming you were trying the Chisel P2, the one listed on the instructions is the correct AGFI. The agfi in the sw.tgz package did not get updated on my last build. That should be fixed now if you re-download the file.

Can you retest and make sure you have access?

rtadros125 commented 4 years ago

Yes chisel_p2, debian. Sorry I wasn't explicit. It now gets stuck here:

[    0.130000] PCI: CLS 0 bytes, default 64
rtadros125 commented 4 years ago

Is this debian version is different from the one in minimal_cloudGFE? Is it OUR debian?

rtadros125 commented 4 years ago

Ooo .. it just takes time. Sorry.

rtadros125 commented 4 years ago

@dhand-galois Thanks. Everything seems to work fine. And it is OUR debian. Now the fun begins.

dhand-galois commented 4 years ago

Yep, that's the last message it prints before decompressing the 60+MB gzipped ramdisk so it takes some time.

The only changes I made from the GFE debian were to disable OpenSSH on boot and include the icenet/iceblk/uart drivers for FireSim.