RoboRIO QEMU VM available

It took a bit more time to do this than I would have liked, but I’m happy to announce that I have some scripts that can be used to start a RoboRIO VM in QEMU on linux.

Now, you might ask, what is this useful for? Well… probably not that much. However, anything that you’re doing that depends on having an ARM userspace and doesn’t rely on kernel/hardware features… this might be useful for you. Or not.

It’s a bit rough right now, but seems to be functional. Try it out, let me know if you find it useful! If you find bugs, submit a pull request with your fixes. :slight_smile:

PS: It sorta works with the 2015 image, but not particularly well. For best results, you’ll need the 2016 image, which is currently only available to beta teams.

Would this work for CI? Can robot code run as is in your the VM with out modification? I’m asking because I don’t know if WPI is written such that it will gracefully handle missing hardware.

ex 1: Does instantiating a Talon and calling set(1) cause any problems?

If this works and all the network communications function properly (SmartDashboard, DriveStation, etc) this could be an invaluable development and testing tool.

I haven’t tried it yet – but I predict it almost certainly will fail for that use case, as there is no FPGA access and I’m sure nobody has tried it. Driver station communications might work.

For CI, you are better off using mocks, or a modified version of the simulated WPILib (similar to what RobotPy does).

Do you know if it would be legally possible to host images online so that the copy from Windows step can be skipped?

They used to distribute the images with the C++ updates in a zipfile, but alas no more… but I haven’t read the license agreement that carefully. I suspect the only one allowed to distribute the binaries are NI/FIRST.

I very briefly looked at writing a script that would extract the file from the NI update zipfile, but I believe it would require something to parse through the msi to find the right UUID in the cab file… probably not too hard, but I didn’t feel like doing it. If you create a script to do that, I’ll gladly host it in the repo.