Hi! I am considering native (not cross compilation) support of golang inside genode. I made two first steps - port golang runtime using cross compilation via genode toolchain and check it with tcp support inside qemu x86_64/arm64.
Now I want to run gccgo and related binutils (files from gcc like gccgo/go1/as/ld/etc) natively inside genode using qemu.
do anyone have an example to run gcc inside genode? I remember that sometimes ago it was mentioned, while I did not find any test in repos/ I can build it using "make noux/gcc_x86» - but any examples how to utilise it inside genode image? like to compile and run «helloworld.c» inside?
Also I need a persistent partition (eg linux loopback image) to be mounted via qemu. Do we have any examples how I can create such image, attach it to qemu, mount/umount it inside? I need this to keep compiled code inside qemu. preferably with file system with journalling support if any (ext3/4? not talking about btrfs)
Alexander
Hi Alexander,
On 05.01.22 19:14, Alexander Tormasov via users wrote:
do anyone have an example to run gcc inside genode?
the tool_chain_auto.run script [1] is the best starting point. It uses Genode's entire tool chain (GCC, binutils, build system, depot tools) on Genode to create the zlib binary package from source.
[1] https://github.com/genodelabs/genode/blob/master/repos/ports/run/tool_chain_...
Cheers Norman
Hi Norman,
the tool_chain_auto.run script [1] is the best starting point. It uses Genode's entire tool chain (GCC, binutils, build system, depot tools) on Genode to create the zlib binary package from source.
I encounter the following messages during this test run on nova/x86_64 (repeated with similar diagnostics):
[init -> vfs] Library ldso_so_support [init -> vfs] COMPILE so_support.o [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3] Warning: sbrk: sbrk not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3] Warning: Libc RNG not configured [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3] Warning: minherit: minherit not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3 -> 1] Warning: sbrk: sbrk not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3 -> 1] Warning: getrlimit called for unsupported resource 5, returning 0 [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3 -> 2] Warning: getrusage: getrusage not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3 -> 2] Warning: sbrk: sbrk not implemented [init -> vfs] MERGE ldso_so_support.lib.a [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Warning: sbrk: sbrk not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Warning: Libc RNG not configured [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Warning: minherit: minherit not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Error: ROM-session creation failed (ram_quota=6144, cap_quota=3, label="libdep.a") [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Error: Could not open ROM session for "libdep.a" [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Warning: chmod: chmod not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Warning: chown: chown not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 7] Warning: utimes: utimes not implemented [init -> vfs] make[6]: warning: Clock skew detected. Your build may be incomplete. …. [init -> vfs] Program lib/zlib/ [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 18] Warning: sysconf(1) not implemented [init -> vfs] created test/bin/x86_64/zlib/2022-01-08 [init] Warning: /bin/bash: could not revert session cap quota (service=ROM cid=265 args='cap_quota=3, label="/bin/bash -> /bin/make", ram_quota=6964, diag=0' state=CLOSED ram_quota) [init] Warning: /bin/bash: could not revert session cap quota (service=ROM cid=213 args='cap_quota=3, label="/bin/bash -> /bin/make", ram_quota=4506, diag=0' state=CLOSED ram_quota) [init] Warning: /bin/bash: could not revert session cap quota (service=ROM cid=37 args='cap_quota=3, label="/bin/bash -> /bin/make", ram_quota=4506, diag=0' state=CLOSED ram_quota=) [init] child "/bin/bash" exited with exit value 234 --- end of time measurement --- Testing " 2022-01-08 01:44:51, commit: (21.11-2-g02180443c)" in : Testing "all" in printf.wv: ! PERF: runtime 538 seconds ok Test succeeded
tests are finished successfully not sure why libdep.a is requested but not created…
I suspect that it also do require settings for clock (ntp-like) to force make work better…
or these are my misconfigurations and mistakes?
Sincerely, Alexander
Hi Alexander,
On 08.01.22 11:34, Alexander Tormasov via users wrote:
I encounter the following messages during this test run on nova/x86_64 (repeated with similar diagnostics):
...> [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3] Warning: sbrk: sbrk not implemented
[init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3] Warning: Libc RNG not configured [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 3] Warning: minherit: minherit not implemented
...
[init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Error: ROM-session creation failed (ram_quota=6144, cap_quota=3, label="libdep.a") [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Error: Could not open ROM session for "libdep.a" [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Warning: chmod: chmod not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 6] Warning: chown: chown not implemented [init -> /bin/bash -> 5 -> 5 -> 6 -> 1 -> 16 -> 1 -> 17 -> 2 -> 7] Warning: utimes: utimes not implemented [init -> vfs] make[6]: warning: Clock skew detected. Your build may be incomplete.
...
Test succeeded
tests are finished successfully not sure why libdep.a is requested but not created…
I suspect that it also do require settings for clock (ntp-like) to force make work better…
or these are my misconfigurations and mistakes?
No. Even though some messages are prefixed with "Error" and "Warning" they are just diagnostic. They merely appear at the Genode log but not visible at stdout or stderr of the subsystem.
Your impression is right that several things could be improved, in particular the timestamp handling (for making 'make' happy) or investigating the strange 'libdep.a' message. However, as the purpose of this non-interactive integration test is exercising the principle ability to run GCC on Genode - which it does successfully - we knowingly ignore those remaining imperfections for now.
Once integrating the tool chain in an interactive workflow on top of Genode (e.g., as Sculpt subsystem), we'll have to take a closer look of course.
BTW, I sense from your other posting about the container topic (inquiring about chroot, page sharing, notion of the VFS, sharing of file descriptors) that you presume Genode to be closer to Unix-like systems than it really is. To get a tangible feeling of how Unix concepts are realized on Genode, I warmly recommend to grab a tee or coffee and enjoy going though the article series referenced at the end of the Goa README [1] - in particular the "Sticking together a little Unix" episodes should be eye opening.
[1] https://github.com/nfeske/goa
You will see that many things work quite differently. Questions like memory sharing of read-only binary segments are actually solved problems (using cached_fs_rom as a back end for execve).
Given the tool_chain_auto.run scenario with GCC as reference, you may consider trying to integrate GCC (and gccgo) into the Unix-like system built in the Goa series. This would make a worthwhile exercise.
Cheers Norman
Hi Norman, thank for comments. Some questions below
Once integrating the tool chain in an interactive workflow on top of Genode (e.g., as Sculpt subsystem), we'll have to take a closer look of course.
ok, good - I just want to be sure that this is not my mistake and misconfiguration
BTW, I sense from your other posting about the container topic (inquiring about chroot, page sharing, notion of the VFS, sharing of file descriptors) that you presume Genode to be closer to Unix-like systems than it really is. To get a tangible feeling of how Unix concepts are realized on Genode, I warmly recommend to grab a tee or coffee and enjoy going though the article series referenced at the end of the Goa README [1] - in particular the "Sticking together a little Unix" episodes should be eye opening.
This is exactly what I does yesterday, when I unable to integratie tcp_terminal into bash scenario. I want to use is in headless mode, because my build computer is physically far from my MacBook and obviously SDL lib does not works here. Palliative decision was to always copy/start created iso image to macbook and run qemu locally (where SDL somehow work, as I remember from the past), but more convenient will be plain "remote login» into genode/bash instance with all tools inside.
I think that I can adopt scenario of GUI based terminal implementation (taken from bash.run) by replacement of terminal -> tcp_terminal, and then it does not work. main problem is here [init -> tcp_terminal] lwIP Nic interface down [init -> tcp_terminal] --- TCP terminal started --- [init] child "tcp_terminal" announces service "Terminal" … [init -> nic_drv] MAC address 52:54:00:12:34:56 [init -> tcp_terminal] Warning: no policy defined for label 'vfs -> ' [init -> vfs] Error: Terminal-session creation failed (ram_quota=10240, cap_quota=3, label="") [init -> vfs] Error: failed to create <terminal> VFS node [init -> tcp_terminal] lwIP Nic interface up address=10.0.3.2 netmask=255.255.255.0 gateway=10.0.3.1
cryptic message about empty label and a reason for <terminal> failure is not clear for me, I think that I do provide inside vfs policy for the terminal like
<start name="vfs" caps="200"> <resource name="RAM" quantum="124M"/> <provides> <service name="File_system"/> </provides> <config> <vfs> } [mounted_tar_archives] { <dir name="dev"> <zero/> <null/> <terminal/> <log/> <inline name="rtc">2022-01-01 00:01</inline> </dir> <dir name="pipe"> <pipe/> </dir> <dir name="home"> <ram/> <rom name=".bash_profile" label="bash_profile" binary="no"/> </dir> <dir name="share"> <dir name="vim"> <rom name="vimrc"/> </dir> </dir> <dir name="genode"> <tar name="genode.tar"/> </dir> <dir name="tmp"> <ram/> </dir> <dir name="usr"> <dir name="bin"> <symlink name="make" target="/bin/make" /> <symlink name="mkdir" target="/bin/mkdir"/> <symlink name="echo" target="/bin/echo" /> <symlink name="tclsh" target="/bin/tclsh"/> </dir> </dir>
<dir name="bin"> <symlink name="nm" target="} [prefixed_nm] {"/> <symlink name="sh" target="bash"/> </dir> </vfs> <default-policy root="/" writeable="yes"/> <policy label_prefix="vfs_rom" root="/"/> <policy label_prefix="/bin/bash" root="/" writeable="yes" /> </config> <route> <service name="Terminal"> <child name="tcp_terminal"/> </service> <service name="Timer"> <child name="timer"/> </service> <any-service> <parent/> </any-service> </route>
So, I start reading these 3 articles, and try to re-read foundation book. Now I understand better while still not able to solve a problem (and I have some comments about understandability of some examples and presented concepts, not all my questions was answered after reading).
May be I do not understand a proper way to integrate terminal service (provided as «Terminal» by tcp_terminal ), bash (which have libc section in config, related to /dev/terminal), vfs (which label it should announce? and why it will be associated with /dev/terminal in another process…)
I assume that bash process should be connected via /dev/terminal to tcp_terminal which obtain from network configured port a TCP connection. Then I can use telnet localhost 5555 - and this will give me textual console where I can send commands to bash and see it’s output.
may be I can use «terminal» (not tcp_terminal) without graphics (I see it requires Gui service provided by nitpicker, how it can be replaced?)
Or I mess something and I need to setup ssh_server inside genode?
You will see that many things work quite differently. Questions like memory sharing of read-only binary segments are actually solved problems (using cached_fs_rom as a back end for execve).
Seems that I do formulate my questions in a bit wrong way. For me it is quite obvious that sharing problems should be solvable onto of most of the modern kernels, including the Genode framework with lower level supported kernels. Main question is a way how I can organise the conditions where particular feature (in this case files sharing in memory for files used from the same instance of file system) will work, what kind of interfaces I should use.
From the point of view of my nearest goal - ability to run docker container inside genode - I have 2 options. 1. implement runc (low level docker manipulation [1,2]) using plain native Genode interface - to create container and to allow different docker features ontop. This is a hard way, to write things from the scratch. 2. take existing implementations of runc which use native Unix/Windows/Linux/xxxBSD/Hurd/etc OS API and interfaces like /proc to create and manage containers. For me this is a simpler way, I can use current port of Genode libc (because it based on FreeBSD libc sources then I can also start from FreeBSD and, as similar and simpler version NetBSD as a initial point).
Then it is easy to integrate with (written on Golang) docker support code (like containerd + docker cli). Direct benefit of this approach is that it provide smooth path for integration with most modern docker tools like Kubernetis - they assume docker cli available.
Therefore, when I ask some questions about «processes» (I know that word process is not actively used in genode foundations books, not a problem at all) I mean what kind of interfaces (in case of libc it is from this port, if now - what else I can do) I can choose (from current palettes of options available in the current code base).
example of such question is - whether the single instance of FS could serve different «containers» (assuming that each container is a kind of subsystem , e.g. unix subsystem with forked bunch of processes)? As I understand - yes, it could, and, if different containers open the same file path from the FS server then they will share code pages (at least read-only parts). For me I see some analogy with having single fs tree serving different containers on normal unix/linux, FS is like a host mount point. Problem that we want to have different subset of files visible for different instances of containers. This is related to 2 problems: 1. own modified files of single containers should be visible only to him, while single FS instance could show them to all clients in theory (CoW private area visibility) 2 every container could start from different set of files (even readonly). Like we can have different linux distribution running and available for different containers, like different versions of glibc or even the whole distribution. To implement this in Virtuozzo and openvz we do implement special templates of file system and applications which could be installed and visible only for particular instances of containers.
both cases above surely assume ability to share files - the problem is organise proper environment (read: sequences of OS api/syscalls/ access to /proc ad so on). Including questions of security, visibility, access rights/etc.
Given the tool_chain_auto.run scenario with GCC as reference, you may consider trying to integrate GCC (and gccgo) into the Unix-like system built in the Goa series. This would make a worthwhile exercise.
yes, thanks for suggestion! while I started from combination of tool_chain_auto.run + tcp_terminal.run inside qemu/nova x86_64, and fail a bit, see above. probably I need to update it to goa (as I suppose it mostly tailored for linux? not all examples from genode do support linux configuration in networking…) I definitely don’t want to involve graphics in this stage.
PS the reason why I want to have a native development is quite simple - «go build» do not works in cross mode, typically it immediately build and run something locally. Golang do create their own version of «dll hell» using vendors version of packages, and «go build» is the only reasonable way to survive...
[1] https://www.docker.com/blog/runc/ [2] https://github.com/opencontainers/runc
Hello Alexander,
please find my remarks inline below.
On Mon, Jan 10, 2022 at 15:45:43 CET, Alexander Tormasov via users wrote:
I think that I can adopt scenario of GUI based terminal implementation (taken from bash.run) by replacement of terminal -> tcp_terminal, and then it does not work. main problem is here [init -> tcp_terminal] lwIP Nic interface down [init -> tcp_terminal] --- TCP terminal started --- [init] child "tcp_terminal" announces service "Terminal" … [init -> nic_drv] MAC address 52:54:00:12:34:56 [init -> tcp_terminal] Warning: no policy defined for label 'vfs -> '
Here, the tcp_terminal is nagging about a missing policy configuration for a client session request labeled 'vfs -> '. Thus, it may be good to provide one in the <config> of tcp_terminal. Let's look into tcp_terminal.run.
<start name="tcp_terminal" caps="200"> <resource name="RAM" quantum="8M"/> <provides> <service name="Terminal"/> </provides> <config> <policy label_prefix="test-terminal_echo" port="8888"/> <vfs> <dir name="dev"> <log/> </dir> <dir name="socket"> <lwip dhcp="yes"/> </dir> <dir name="pipe"> <pipe/> </dir> </vfs> <libc stdout="/dev/log" socket="/socket" pipe="/pipe"/> </config> <route> <service name="Nic"> <child name="nic_router"/> </service> <any-service> <parent/> <any-child/> </any-service> </route> </start>
The configuration defines a policy for test-terminal_echo that can easily be changed to the demands of your scenario.
<policy label_prefix="vfs" port="<desired port>"/>
or even
<policy label="vfs -> " port="<desired port>"/>
I hope this helps.
Regards
Hi Christian, thank you for suggestions!
Here, the tcp_terminal is nagging about a missing policy configuration for a client session request labeled 'vfs -> '. Thus, it may be good to provide one in the <config> of tcp_terminal. Let's look into tcp_terminal.run.
...
The configuration defines a policy for test-terminal_echo that can easily be changed to the demands of your scenario.
<policy label_prefix="vfs" port="<desired port>"/>
or even
<policy label="vfs -> " port="<desired port>»/>
it helps to get rid of message, but does not help to solve the problem of attachment of bash to tcp_terminal (failed to create <terminal> VFS node below) I want something like nic(tcp with port 8888) -> tcp_terminal -> bash
If I follow your suggestion then it seems that I mentioned 2 separate port: <policy label_prefix="vfs" port=«8888»/> <policy label_prefix=«/bin/bash" port="8888"/> while in my idea I probably need only one, not clear the meaning of second mention of port...
result log is: [init] child "timer" announces service "Timer" [init] child "rtc_drv" announces service "Rtc" [init] child "nic_router" announces service "Nic" [init] child "nic_router" announces service "Uplink" Warning: invalid signal-context capability [init -> terminal] lwIP Nic interface down [init -> terminal] --- TCP terminal started --- [init] child "terminal" announces service "Terminal" [init -> vfs] Error: Terminal-session creation failed (ram_quota=10240, cap_quota=3, label="") [init -> vfs] Error: failed to create <terminal> VFS node [init] child "vfs" announces service "File_system" [init] child "vfs_rom" announces service "ROM" [init -> /bin/bash] 0x1000000 .. 0x10ffffff: linker area [init -> /bin/bash] 0x40000000 .. 0x4fffffff: stack area [init -> /bin/bash] 0x50000000 .. 0x601b1fff: ld.lib.so [init -> /bin/bash] 0x10e2c000 .. 0x10ffffff: libc.lib.so [init -> /bin/bash] 0x10d87000 .. 0x10e2bfff: vfs.lib.so [init -> /bin/bash] 0x10d45000 .. 0x10d86fff: libm.lib.so [init -> /bin/bash] 0x10d3d000 .. 0x10d44fff: posix.lib.so [init -> terminal] Warning: read blocked until lwIP interface is ready [init -> terminal] lwIP Nic interface up address=10.0.3.2 netmask=255.255.255.0 gateway=10.0.3.1 [init -> terminal] listening on port 8888... [init -> terminal] connection established
I am able to connect telnet localhost 5555 -but no command can be executed and log say that bind to port 8888 failed right after telnet. [init -> terminal] listening on port 8888... [init -> terminal] connection established [init -> /bin/bash] Error: no plugin found for fcntl(3) [init -> /bin/bash] Error: no plugin found for fcntl(4) [init -> /bin/bash] Error: no plugin found for fcntl(5) [init -> /bin/bash] Error: no plugin found for fcntl(6) [init -> /bin/bash] Error: no plugin found for fcntl(7) [init -> /bin/bash] Error: no plugin found for fcntl(8) [init -> /bin/bash] Error: no plugin found for fcntl(9) [init -> /bin/bash] Error: no plugin found for fcntl(10) [init -> /bin/bash] Error: no plugin found for fcntl(11) [init -> /bin/bash] Error: no plugin found for fcntl(12) [init -> /bin/bash] Error: no plugin found for fcntl(13) [init -> /bin/bash] Error: no plugin found for fcntl(14) [init -> /bin/bash] Error: no plugin found for fcntl(15) [init -> /bin/bash] Error: no plugin found for fcntl(16) [init -> /bin/bash] Error: no plugin found for fcntl(17) [init -> /bin/bash] Error: no plugin found for fcntl(18) [init -> /bin/bash] Error: no plugin found for fcntl(19) [init -> terminal] Error: bind to port 8888 failed Kernel: Bad memory access (signum=7), see Linux kernel log for details
I am stuck a bit and move to ssh.run example, integrating it with toolchain test. here I have to setup ssh_server and use ssh client from outside instead of telnet.
In this moment it works somehow and I am trying to force toolchain to work inside genode.
Sincerely, Alexander
Alexander,
I must admit I'm a bit confused by the information in your message.
On Wed, Jan 12, 2022 at 18:22:17 CET, Alexander Tormasov via users wrote:
it helps to get rid of message, but does not help to solve the problem of attachment of bash to tcp_terminal (failed to create <terminal> VFS node below) I want something like nic(tcp with port 8888) -> tcp_terminal -> bash
[...]
If I follow your suggestion then it seems that I mentioned 2 separate port:
<policy label_prefix="vfs" port=«8888»/> <policy label_prefix=«/bin/bash" port="8888"/>
[...]
[init -> vfs] Error: Terminal-session creation failed (ram_quota=10240, cap_quota=3, label="") [init -> vfs] Error: failed to create <terminal> VFS node [init -> terminal] Warning: read blocked until lwIP interface is ready [init -> terminal] lwIP Nic interface up address=10.0.3.2 netmask=255.255.255.0 gateway=10.0.3.1 [init -> terminal] listening on port 8888...
[...]
I am able to connect telnet localhost 5555 -but no command can be executed and log say that bind to port 8888 failed right after telnet. [init -> terminal] listening on port 8888... [init -> terminal] connection established [init -> /bin/bash] Error: no plugin found for fcntl(3) [init -> /bin/bash] Error: no plugin found for fcntl(4) [init -> /bin/bash] Error: no plugin found for fcntl(5) [init -> /bin/bash] Error: no plugin found for fcntl(6) [init -> /bin/bash] Error: no plugin found for fcntl(7) [init -> /bin/bash] Error: no plugin found for fcntl(8) [init -> /bin/bash] Error: no plugin found for fcntl(9) [init -> /bin/bash] Error: no plugin found for fcntl(10) [init -> /bin/bash] Error: no plugin found for fcntl(11) [init -> /bin/bash] Error: no plugin found for fcntl(12) [init -> /bin/bash] Error: no plugin found for fcntl(13) [init -> /bin/bash] Error: no plugin found for fcntl(14) [init -> /bin/bash] Error: no plugin found for fcntl(15) [init -> /bin/bash] Error: no plugin found for fcntl(16) [init -> /bin/bash] Error: no plugin found for fcntl(17) [init -> /bin/bash] Error: no plugin found for fcntl(18) [init -> /bin/bash] Error: no plugin found for fcntl(19) [init -> terminal] Error: bind to port 8888 failed
1. It seems your configured 1 port for 2 clients. This will not work. Please, configure different ports (or just one if you don't need the VFS component, which failed to setup its connection anyway.
2. You mention "localhost 5555" but the tcp_terminal should be listening on 10.0.3.2 8888 according to the log.
3. As the configuration error must be in the configuration I can't tell more without a look at the complete config.
Greets
Hi Christian,
[init -> terminal] Error: bind to port 8888 failed
- It seems your configured 1 port for 2 clients. This will not work.
Please, configure different ports (or just one if you don't need the VFS component, which failed to setup its connection anyway.
this is exactly my question - seems that I have to define policy for 2 connections - to /bin/bash and to vfs, why not 1? <policy label_prefix="/bin/bash" port="8888" /> <policy label_prefix="vfs" port="8888"/> while I assume single chain like nic -> tcp_terminal -> bash
Now I understand that implicitly I assume that tcp_terminal is like telnet server. May be my assumption is wrong?
- You mention "localhost 5555" but the tcp_terminal should be
listening on 10.0.3.2 8888 according to the log.
sorry for misreport - initially I try to run on qemu + nova which configured for port 5555 and local host. then I try to switch to linux. it give the same errors while run a bit faster, so, I now keep it (using linux tap driver)
for test above I definitely use "telnet 10.0.3.2 8888"
- As the configuration error must be in the configuration I can't
tell more without a look at the complete config.
below (I omit some portions of generated config file related to nic_drv platform/etc)
<config verbose="yes"> <parent-provides> <service name="ROM"/> <service name="LOG"/> <service name="RM"/> <service name="CPU"/> <service name="PD"/> <service name="IRQ"/> <service name="IO_PORT"/> <service name="IO_MEM"/> </parent-provides>
<default-route> <any-service> <parent/> <any-child/> </any-service> </default-route>
<default caps="100"/>
<start name="timer"> <resource name="RAM" quantum="3M"/> <provides><service name="Timer"/></provides> </start>
<start name="nic_drv" ld="no" caps="1000" managing_system="yes» > ...
<start name="terminal" caps="200"> <resource name="RAM" quantum="8M"/> <binary name="tcp_terminal"/> <provides> <service name="Terminal"/> </provides> <config> <policy label_prefix="/bin/bash" port="8888" /> <policy label_prefix="vfs" port="8888"/> <vfs> <dir name="dev"> <!-- <log/> --> <inline name="rtc">2022-01-01 00:00</inline> </dir> <dir name="socket"> <lwip dhcp="yes"/> </dir>
<!-- pipe need for network polling --> <dir name="pipe"> <pipe/> </dir>
</vfs> <libc stdout="/dev/log" stderr="/dev/log"
pipe="/pipe"
rtc="/dev/rtc"
rng="/dev/random" socket="/socket"> <mmap local_area_default_size="1610612736" /> </libc> </config>
<route> <service name="ROM" label="config"> <parent label="terminal.config"/> </service> <service name="Nic"> <child name="nic_router"/> </service> <any-service> <parent/> <any-child/> </any-service> </route> </start>
<start name="vfs" caps="200"> <resource name="RAM" quantum="124M"/> <provides> <service name="File_system"/> </provides> <config> <vfs> <tar name="bash.tar" /> <tar name="coreutils.tar" /> <tar name="grep.tar" /> <tar name="sed.tar" /> <tar name="findutils.tar" /> <tar name="make.tar" /> <tar name="which.tar" /> <tar name="binutils_x86.tar" /> <tar name="gcc_x86.tar" /> <tar name="tclsh.tar" /> <tar name="vim.tar" />
<dir name="dev"> <zero/> <null/> <terminal/> <log/> <inline name="rtc">2022-01-01 00:01</inline> </dir> <dir name="pipe"> <pipe/> </dir> <dir name="home"> <ram/> <rom name=".bash_profile" label="bash_profile" binary="no"/> </dir> <dir name="share"> <dir name="vim"> <rom name="vimrc"/> </dir> </dir> <dir name="genode"> <tar name="genode.tar"/> </dir> <dir name="tmp"> <ram/> </dir> <dir name="usr"> <dir name="bin"> <symlink name="make" target="/bin/make" /> <symlink name="mkdir" target="/bin/mkdir"/> <symlink name="echo" target="/bin/echo" /> <symlink name="tclsh" target="/bin/tclsh"/> </dir> </dir>
<dir name="bin"> <symlink name="nm" target="genode-x86-nm"/> <symlink name="sh" target="bash"/> </dir> </vfs> <policy label_prefix="/bin/bash" root="/" writeable="yes" /> <default-policy root="/" writeable="yes"/> <policy label_prefix="vfs_rom" root="/"/> </config> <route> <service name="Terminal"> <child name="tcp_terminal"/> </service> <service name="Timer"> <child name="timer"/> </service> <any-service> <parent/> </any-service> </route>
</start> <start name="vfs_rom"> <resource name="RAM" quantum="60M"/> <binary name="fs_rom"/> <provides> <service name="ROM"/> </provides> <config/> <route> <service name="File_system"> <child name="vfs"/> </service> <any-service> <parent/> </any-service> </route> </start>
<start name="/bin/bash" caps="2000"> <resource name="RAM" quantum="300M" /> <config ld_verbose="yes"> <libc stdin="/dev/terminal" stdout="/dev/terminal" stderr="/dev/terminal" rtc="/dev/rtc" pipe="/pipe"/> <vfs> <fs buffer_size="2M"/> <dir name="dev"> <terminal/> <log/> <null/> </dir> <inline name=".bash_profile"> echo Welcome to bash Genode! > /dev/log </inline> </vfs> <env key="HOME" value="/home"/> <env key="PATH" value="/bin"/> <env key="IGNOREEOF" value="3"/> <arg value="/bin/bash"/> <arg value="--login" /> <!-- <arg value="-c" /> --> <!-- <arg value="echo files at /dev: /dev/* > /dev/terminal"/> --> </config> <route> <service name="File_system"> <child name="vfs"/> </service> <service name="ROM" label_suffix=".lib.so"> <parent/> </service> <service name="ROM" label_last="/bin/bash"> <child name="vfs_rom"/> </service> <service name="ROM" label_prefix="/genode/tool"> <child name="vfs_rom"/> </service> <service name="ROM" label_prefix="/bin"> <child name="vfs_rom"/> </service> <service name="ROM" label_prefix="/usr/bin"> <child name="vfs_rom"/> </service> <service name="ROM" label_prefix="/libexec"> <child name="vfs_rom"/> </service> <service name="ROM" label_prefix="/x86_64-pc-elf"> <child name="vfs_rom"/> </service> <service name="ROM" label_prefix="/arm-none-eabi"> <child name="vfs_rom"/> </service> <service name="ROM" label_prefix="/aarch64-none-elf"> <child name="vfs_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service> </route> </start>
</config>