hannes changed the topic of #mirage to: https://mirage.io - https://github.com/mirage/mirage-www/wiki/Call-Agenda - this channel is logged at http://irclog.whitequark.org/mirage/ - MirageOS 3.5.0 is released - happy hacking!
_whitelogger has joined #mirage
kuso has joined #mirage
xaki has quit [Ping timeout: 248 seconds]
_whitelogger has joined #mirage
Haudegen has joined #mirage
mato has quit [Quit: WeeChat 2.5]
mato has joined #mirage
srax has quit [Quit: irc.esper.net:5555]
srax has joined #mirage
<ehirdoy> Hi experts, would it be possible to give some hint for how much effort is needed to run MirageOS on 32bit ARM?
<ehirdoy> I tried to run machine learning inference on MirageOS for IoT and some of popular IoT microcontrollers are 32bit ARM.
<hannes> ehirdoy: it (well, the Xen backend) (at least) used to run on arm32 (esp. cubieboard). there's also a prototypical port to esp32 by lucas https://www.lortex.org/posts/mirage/esp32/2018/10/02/what-now.html
<hannes> there's no (and not planned afaik) support for solo5 on 32bit. the arm32+xen port may suffer a bit from bitrot.
<ehirdoy> @hannes I may replace solo5 API with RTOS function call so that running it on 32bit ARM may be easier, skipping hypervisor?
<ehirdoy> well, not replacing but implementing solo5 API backend with RTOS function call?
<ehirdoy> 32bit ARM is needed since 64bit ARM doesn't make much sense for IoT ML inference :)
<hannes> ehirdoy: so my rough approach would be to not think too much about solo5, but rather about mirage-solo5 (which implements the main event loop etc.) and ocaml-freestanding (providing the ocaml runtime) -- these are the only users of the solo5 API, so if you adapt these pieces to use <whatever-else-is-on-arm32> you won't need the solo5 api
<ehirdoy> are those ESP32 port natively compiled or bytecode?
<hannes> on a different note, you can run mirageos as unix/linux process on arm32 directly already (modulo bitrot)..
<hannes> this is a native port, with https://github.com/well-typed-lightbulbs/ocaml-esp32/ being the changes to the ocaml compiler (supporting esp32)
<ehirdoy> @hannes, so useful info!! Thanks!!
<hannes> in ocaml-freestanding, there's a single sysdeps_solo5.c, and there could be another sysdeps_arm32.c to be used on arm32..
<ehirdoy> @hannes :)
<hannes> the esp32 port was an attempt at cross-compilation as well, which lead to further improvements of the mirage utility build story (there are various PRs in progress, but this has not yet been merged) --> the esp32-opam-repo with lots of opam packages with "-esp32" suffix is no longer needed AFAICT (but i have neither worked on the former nor on the latter)
<hannes> ehirdoy: as first step, i'd really recommend to try compiling mirage/unix (so mirage configure -t unix) on an arm32 (or emulator thereof), and see if this produces working binaries
Haudegen has quit [Quit: Bin weg.]
haesbaert has quit [Ping timeout: 272 seconds]
_whitelogger has joined #mirage
<reynir> Hmm. My unikernel has a constraint mirage-xen < 4.0.0 and I don't understand why
<kuso> reynir: are you pinning down _anything_ right now?
<kuso> reynir: are you sure your opam is opam 2.x? did you opam update?
<hannes> reynir: mirage -- the tool -- generates opam files with lower _and_ upper bounds -- maybe it generates sth with mirage-xen < 4.0.0?
<reynir> Yes, it generates mirage-xen < 4.0.0, hannes
<hannes> reynir: there's "package ~min:"3.1.0" ~max:"4.0.0" "mirage-xen"" in mirage/lib/mirage.ml ...
<reynir> But I don't see why it's doing that
<reynir> Aha
<hannes> since we ended in sad situations where we broke everything for existing users
<reynir> Haha oh :(
<hannes> feel free to PR to mirage a change with an adjusted upper bound (now certainly, every now and then we forget to adjust the lower+upper bounds)
<hannes> (it has been generating upper bounds since nov 2018, mirage 3.3.0)
<reynir> My unikernel compiles fine with mirage-xen 4.0.1
<hannes> cool, i barely track mirage-xen changes (and thus don't know why the major bumped), but if its fine, as said, we can easily bump the upper bound in the mirage tool.
<reynir> The changelog says OS.Xen was renamed to OS_xen (modulo spelling), but I'm not using those directly
<hannes> that's fine then, the constraints in the mirage utility should only _not being adjusted_ if the initialisation (or linking/...) procedure changed ~> feel free to PR ~max:"5.0.0" :)
<reynir> OS.Xen --> Os_xen
<hannes> yes, a change i don't really understand tbh
<reynir> Thanks, hannes
<kuso> reynir: still something weird, i just ran a builder-build in a clean vm and it auto-picked 4.0.1 afaict
<hannes> (the constraint is only picked up on make depend // opam install --deps-only . ~~> a mirage build / make won't take up these constraints)
<reynir> Okay, qubes-mirage-firewall breaks on mirage-xen 4.0.1 -- OS.MM.Heap_pages.total is unbound
<kuso> reynir: 4.08.0 ?
<kuso> (for both)
<reynir> I think I had to downgrade to OCaml 4.07.0
<reynir> No wait, I could use OCaml 4.08.0 for the firewall, but not for the ssh-agent
<kuso> i upped it to 4.08.0 for the -fw in Makefile.builder recently, but ssh-agent still has 4.05.0 there, retry with both at 4.08.0 running right now.
<reynir> I think some dependency for ssh-agent doesn't work for 4.08.0 yet, but 4.07.1 works
<reynir> Also, I found out it's not just OS.Xen --> Os_xen, OS.Xs has also been renamed/moved to Os_xen.Xs...
<reynir> Aaand OS.MM --> Os_xen.MM
<kuso> (yes, ssh-agent with 4.08.0 explodes here too)
Haudegen has joined #mirage
jnavila has joined #mirage
jnavila has quit [Ping timeout: 252 seconds]
jnavila has joined #mirage
Haudegen has quit [Quit: Bin weg.]
jnavila has quit [Ping timeout: 246 seconds]