Hello,
I'm currently porting Mosquitto (https://mosquitto.org/) to Genode. I've managed to compile and run the application, but I get the following error:
(...) genode build completed using 'core-linux' as 'core' using 'ld-linux.lib.so' as 'ld.lib.so' spawn ./core Genode 18.08 17592186044415 MiB RAM and 8998 caps assigned to init [init -> mosquitto] Warning: rtc not configured, returning 0 [init -> mosquitto] Error: no plugin found for socket() [init -> mosquitto] Error: no plugin found for socket() [init] child "mosquitto" exited with exit value 1
This is probably because the socket() function in libc is just a stub and needs a plugin to work correctly. I'm not sure how to continue from here. As far as I know, there are different ways to implement the sockets in Genode (for example using VFS). Is there any (up-to-date) documentation about these implementations? What are the advantages and disadvantages of each approach, and what other steps are required to get it working (there seem to be a lot of dependencies when including the socket interface...).
I've tried following the example in run/usb_net [1], which uses lib/vfs/lwip, but then I get the following error: invalid command name "usb_host_drv_binary" I cannot find where usb_host_drv_binary is coming from (it's referred to in this file, but I don't know where it is generated). Besides, I don't know if this example is working anyway, so maybe this is not the right direction... [1] https://github.com/genodelabs/genode/blob/master/repos/dde_linux/run/usb_net...
Following another example from the mailing list, I've tried adding LIBS += libc_lwip_nic_dhcp, but this currently results in the following errors: (...) genode build completed using 'core-linux' as 'core' using 'linux_timer_drv' as 'timer' using 'ld-linux.lib.so' as 'ld.lib.so' spawn ./core Genode 18.08 17592186044415 MiB RAM and 8998 caps assigned to init [init -> mosquitto] using the lwIP libc plugin [init -> mosquitto] init [init -> mosquitto] Using DHCP for interface configuration. [init] Warning: mosquitto: no route to service "Nic" [init -> mosquitto] Error: Nic-session creation failed (ram_quota=671744, cap_quota=8, tx_buf_size=204800, rx_buf_size=204800, label="") [init -> mosquitto] Warning: NIC not available, loopback is used as default [init -> mosquitto] Warning: rtc not configured, returning 0 [init -> mosquitto] Warning: geteuid: geteuid not implemented [init -> mosquitto] Warning: getpwnam: getpwnam not implemented Warning: blocking canceled in entrypoint constructor [init] child "mosquitto" exited with exit value 1
Based on this log output, to get this working I would need to: * provide the Nic service in some way * find a library which implements geteuid() and getwpnam() (I guess this would require Noux, right?)
In both cases I also have the warning about rtc nog configured. How do I resolve this?
Any pointers in the right direction are very welcome :-)
Kind regards, Wouter
Hello Wouter
On 21.11.18 11:54, Wouter van Oijen wrote:
Hello,
I'm currently porting Mosquitto (https://mosquitto.org/) to Genode. I've managed to compile and run the application, but I get the following error:
(...) genode build completed using 'core-linux' as 'core' using 'ld-linux.lib.so' as 'ld.lib.so' spawn ./core Genode 18.08 17592186044415 MiB RAM and 8998 caps assigned to init [init -> mosquitto] Warning: rtc not configured, returning 0 [init -> mosquitto] Error: no plugin found for socket() [init -> mosquitto] Error: no plugin found for socket() [init] child "mosquitto" exited with exit value 1
This is probably because the socket() function in libc is just a stub and needs a plugin to work correctly. I'm not sure how to continue from here. As far as I know, there are different ways to implement the sockets in Genode (for example using VFS). Is there any (up-to-date) documentation about these implementations? What are the advantages and disadvantages of each approach, and what other steps are required to get it working (there seem to be a lot of dependencies when including the socket interface...).
An example on how to configure the socket can be found in repos/libports/run/nic_bridge.run line 77 to 83.
In both cases I also have the warning about rtc nog configured. How do I resolve this?
An example on how to configure the rtc can be found in repos/world/run/atari800.run (lines 7 and 10)
There is a driver for the hardware RTC (rtc_drv). repos/world/run/gmock.run provides an example on how to use it (AFAIK it doesn't work on Linux).
Best regards, Pirmin
Hello Pirmin, Thanks for your suggestions.
An example on how to configure the socket can be found in repos/libports/run/nic_bridge.run line 77 to 83.
I've tried to run this scenario with three different kernels on three different platforms, but got errors with all combinations. With KERNEL=nova on an x86_64 platform I got the following error:
error copying "bin/nic_drv": no such file or directory while executing "file copy -force bin/[kernel_specific_binary $binary] [run_dir]/genode/$binary" (procedure "copy_genode_binaries_to_run_dir" line 4)
Does this scenario work in your environment?
An example on how to configure the rtc can be found in repos/world/run/atari800.run (lines 7 and 10)
There is a driver for the hardware RTC (rtc_drv). repos/world/run/gmock.run provides an example on how to use it (AFAIK it doesn't work on Linux).
The atari800 scenarios isn't the best example, since it only fakes the real-time clock, and I couldn't even run the scenario out-of-the-box. But you put me in the right direction :-) I found a working example using the rtc_drv in libports/run/nim.run. It didn't work with the Linux kernel indeed, but with the Nova kernel it seems to work fine (at least the warning in my application disappeared and the existing "run/rtc" scenario seemed to work correctly with the Nova kernel).
Kind regards, Wouter
Hello Wouter
On 22.11.18 14:38, Wouter van Oijen wrote:
Hello Pirmin, Thanks for your suggestions.
An example on how to configure the socket can be found in repos/libports/run/nic_bridge.run line 77 to 83.
I've tried to run this scenario with three different kernels on three different platforms, but got errors with all combinations. With KERNEL=nova on an x86_64 platform I got the following error:
error copying "bin/nic_drv": no such file or directory while executing "file copy -force bin/[kernel_specific_binary $binary] [run_dir]/genode/$binary" (procedure "copy_genode_binaries_to_run_dir" line 4)
Does this scenario work in your environment?
For me this runs well inside qemu on my Ubuntu 18.04 machine. As far as I remember I didn't change anything in etc/build.conf except seting the kernel specifically to nova.
An example on how to configure the rtc can be found in repos/world/run/atari800.run (lines 7 and 10)
There is a driver for the hardware RTC (rtc_drv). repos/world/run/gmock.run provides an example on how to use it (AFAIK it doesn't work on Linux).
The atari800 scenarios isn't the best example, since it only fakes the real-time clock, and I couldn't even run the scenario out-of-the-box. But you put me in the right direction :-) I found a working example using the rtc_drv in libports/run/nim.run. It didn't work with the Linux kernel indeed, but with the Nova kernel it seems to work fine (at least the warning in my application disappeared and the existing "run/rtc" scenario seemed to work correctly with the Nova kernel).
Nice, to hear that you could fix this on your system.
Best regards, Pirmin
Hello,
error copying "bin/nic_drv": no such file or directory while executing "file copy -force bin/[kernel_specific_binary $binary] [run_dir]/genode/$binary" (procedure "copy_genode_binaries_to_run_dir" line 4)
Does this scenario work in your environment?
For me this runs well inside qemu on my Ubuntu 18.04 machine. As far as I remember I didn't change anything in etc/build.conf except seting the kernel specifically to nova.
as the NIC driver comes from the 'dde_ipxe' repository, may this repository be disabled (default) in Wouter's etc/build.conf?
Cheers Norman
error copying "bin/nic_drv": no such file or directory while executing "file copy -force bin/[kernel_specific_binary $binary] [run_dir]/genode/$binary" (procedure "copy_genode_binaries_to_run_dir" line 4)
Does this scenario work in your environment?
For me this runs well inside qemu on my Ubuntu 18.04 machine. As far as I remember I didn't change anything in etc/build.conf except seting the kernel specifically to nova.
as the NIC driver comes from the 'dde_ipxe' repository, may this repository be disabled (default) in Wouter's etc/build.conf?
Yes. After adding the dde_ipxe repository the scenario executed successfully. Thanks.
Kind regards, Wouter