[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [MirageOS-devel] Need help adding a custom module (for GPIO) to Solo5 & MirageOS
Hello all, I'm currently attempting to add a custom module to Solo5 & MirageOS to make it possible to access the host's GPIO interface from the unikernel. However, I am currently stuck. I believe, the only thing that's missing is some more "glue" to connect everything together, but I can't figure out what exactly, so I'm reaching out to you all in the hope that someone can help me. Before starting on what I've done so far, I'd like to mention that I forked the code from the latest stable tag when I started with this, which was v0.4.1 at the time. I've seen a lot of changes on the v0.6.* tags since then, but I want to get this working before figuring out what I'd have to change to port this to v0.6. What I've done in the 'solo5' repository: * Added 'tenders/hvt/hvt_module_gpio.c' with code to access GPIO * Added hypercalls & their structs to 'include/solo5/hvt_abi.h' * Added references to the new module to `tenders/hvt/hvt_core.c`, 'tenders/hvt/hvt.h', and 'tneders/hvt/GNUmakefile' * Added 'bindings/hvt/gpio.c' with stubs calling the hypercalls & added that file to 'bindings/GNUmakefile' * Added functions headers to 'include/solo5/solo5.h' What I've done in the 'mirage-solo5' repository: * Added 'lib/bindings/solo5_gpio_stubs.c' with the C-side of ocaml bindings to the stubs from 'solo5/bindings/hvt/gpio.c' * Added a reference to those new bindings in 'lib/libmirage-solo5_bindings.clib' What I've done in the 'mirage-gpio' repository: * Tried adding a module signature for GPIO devices, modelled after a stripped down version of 'mirage-block' What I've done in the 'mirage-gpio-solo5' repository: * Tried adding an implementation of 'mirage-gpio' using the new bindings from 'mirage-solo5'. This modelled after a stripped down version of 'mirage-block-solo5' I've thrown all of the code together into a monorepo for the time being, which is available at https://github.com/Antagonym/mirage-gpio so you can have a look for yourselves. I'm fairly certain that it's correct up to and including the changes to the 'mirage-solo5' repository. I think the issue is probably in the 'mirage-gpio' or 'mirage-gpio-solo5' repos. Or maybe I have to tweak the 'mirage' repo too? This is where it gets fuzzy, escpecially since I can't OCAML. (Best approximation is Haskell, which is the only other function language I've worked with so far) I really hope someone can help me out here or at least point me in the right direction. In any case thanks for reading this far and after that wall of text, have a nice evening everyone. Regards, Antagonym _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |