Hello Genodians,
I am attempting to create my first Genode system scenario from scratch. After following some of the available tutorials, I feel like I have a foundational understanding of the client/server interfaces. I am now attempting to create a system that utilizes the parent/child interfaces. I am intentionally using the more bare-bones Child interface over the Sandbox API for educational purposes. [1] is a link to a GitHub gist containing my parent component and runscript. The child is the simple hello world program provided at the beginning of the Genode Foundations book. At present, everything seems to start without errors, but the output from the child is not displayed. After a couple of days of fumbling around, I have not been able to get this to work properly. Any suggestions you may have are greatly appreciated.
As I said previously, this is my first attempt at creating a Genode system from scratch. Any feedback you may have is greatly appreciated (even if it is not directly related to the issue at hand).
[1] https://gist.github.com/zgzollers/397f56b66179f3276e048be8a8a7a543
Thanks in advance, Zachary Zollers
Hi Zachary,
Child(Genode::Env& env, Child_policy::Name name) : _env(env), _name(name) { }
I have no experience with the parent/child interfaces, my naïve first thought would be to add tracing (Genode::log()) in the body of the constructor above, at least to "bracket" the output sent to Qemu's virtual serial port. If all else fails, you could even "go down the rabbit hole" and add tracing to the Genode code itself (following down the chain of classes and methods), I learned quite a bit of the system this way myself, though it's of course time consuming.
Talking of logging, you might want to post the logging output from Qemu here, it could be a starting point for those on the list with better knowledge and odds to help you.
Cedric
As I said previously, this is my first attempt at creating a Genode system from scratch. Any feedback you may have is greatly appreciated (even if it is not directly related to the issue at hand).
[1] https://gist.github.com/zgzollers/397f56b66179f3276e048be8a8a7a543
Hello Zachary,
welcome to the mailing list and thanks for giving Genode a try!
After a couple of days of fumbling around, I have not been able to get this to work properly. Any suggestions you may have are greatly appreciated. ... [1] https://gist.github.com/zgzollers/397f56b66179f3276e048be8a8a7a543
I gave your test a try. You were almost there! Here's what went wrong:
Your 'Main' constructor hosts the 'Child' as local variable, which gets immediately destructed when leaving the scope.
Main(Genode::Env& env) : _env(env) { Tutorial::Child child(_env, "test-log"); }
The child should instead be hosted as member variable of the main object, like so:
Tutorial::Child _child { _env, "hello" };
Main(Genode::Env& env) : _env(env) { }
As another minor problem, your run script misses to build 'core' and 'lib/ld'. The respective 'core' and 'ld.lib.so' boot modules are needed too. Nowadays, we tend to use the 'build_artifacts' function [2] to foster the consistency between the 'build' and 'build_boot_image' arguments. I recommend changing the line to:
build_boot_image [build_artifacts]
[2] https://genode.org/documentation/release-notes/22.02#Automated_tracking_of_b...
Cheers Norman
*facepalm* Thank you. I should have seen that. That example is now working as expected.
As another minor problem, your run script misses to build 'core' and 'lib/ld'. The respective 'core' and 'ld.lib.so' boot modules are needed too. Nowadays, we tend to use the 'build_artifacts' function [2] to foster the consistency between the 'build' and 'build_boot_image' arguments. I recommend changing the line to: build_boot_image [build_artifacts]
Noted, and thank you. That makes the build_boot_image a lot simpler.