Hello,
First of all thank you very much for your time! I have but two questions: first off, is Genode compatible with Libreboot? Secondly, I had this https://gist.github.com/ehmry/66f0aafefc7b3fefb14ebede5f64f94b , and it has me wondering if such a thing might be possible with an operating system such as GuixSD (a NixOS fork)?
Thank you for your time!
-Dawson
Hi Dawson,
Genode is not directly bootable as a coreboot payload but is bootable from GRUB. As far as I know all the of the supported kernels on x86 use the multiboot standard, which is the same as Hurd, so you can cross-reference GRUB config snippets between the two.
I'm a bit suprised you found my NixOS dualboot instructions, I don't remember if I finished it. I assume that the same would work for Guix, the essence of it is that the configuration changes slightly depending on which boot partition is mounted.
I don't run a system like that anymore because I had some practical problems with NixOS as a desktop distro, but I may return to it if I had a second VM to use.
Good luck, Emery
On Mon, 22 May 2017 18:39:48 -0700 Dawson Shay <dawson.shay@...512...> wrote:
Hello,
First of all thank you very much for your time! I have but two questions: first off, is Genode compatible with Libreboot? Secondly, I had this https://gist.github.com/ehmry/66f0aafefc7b3fefb14ebede5f64f94b , and it has me wondering if such a thing might be possible with an operating system such as GuixSD (a NixOS fork)?
Thank you for your time!
-Dawson
Hi,
does Genode provide something similar to the standard C++ condition variable? I want to block a function call until a certain event occurs but I don't want to sleep and check for that event.
Regards, JK
Hi Johannes,
does Genode provide something similar to the standard C++ condition variable? I want to block a function call until a certain event occurs but I don't want to sleep and check for that event.
I wonder, may it be an option to avoid the reliance on blocking calls and instead model your component as a state machine? I am asking because we actually started out with the approach to block control flows just as you wish for, but we moved (almost) completely away from it. Nowadays, all modern Genode components are designed to handle I/O in an asynchronous fashion. That is, the 'Component::construct' function merely creates a "Main" object (that hosts signal handlers for responding to external events) and returns immediately. Once it returned, the component is able to respond to external events (e.g., I/O) via the signal handlers. When triggered, a signal handler applies a state change to the component and returns. It never blocks.
All modern components follow this pattern to great success. So I recommend you to design your component following the same approach. For an illustrative nontrivial example, please have a look at 'os/src/server/input_filter/'.
That said, for compatibility with ported 3rd-party software, we actually provide an implementation of the pthread API including the support for condition variables. You may have a look at 'libports/src/lib/pthread/'. When using the libc, functions like 'read' and 'select' obviously block for I/O. So technically, Genode covers that. But please be aware that the use of POSIX goes against the grain of the actual Genode API. For hosting existing 3rd-party software on Genode, there is no way around it. But we shun it when creating new components from scratch.
I cannot give any statement about C++ condition variables specifically. If they use the pthread API under the hood, you may be lucky to add 'stdcxx' to the 'LIBS' of your target. But as I said above, I'd advice against it.
Cheers Norman