Thanks Norman and Martin for details explanation,

I removed the static drivers configuration rules from drivers subsystem and kept the other scripts(like sculpt.run) as it is modified at [1] and got the following log entries in terminal when clicked on wired in Sculpt.

[init -> runtime] child "nic_drv"
[init -> runtime]   RAM quota:  20232K
[init -> runtime]   cap quota:  266
[init -> runtime]   ELF binary: nic_drv  -->
[init -> runtime]   priority:   2
[init -> runtime] child "nic_router"
[init -> runtime]   RAM quota:  9992K
[init -> runtime]   cap quota:  266
[init -> runtime]   ELF binary: nic_router
[init -> runtime]   priority:   2
[init -> runtime]   provides service Nic
[init -> runtime]   provides service Uplink


Seeing above logs it seems that nic_drv is not able to load the virtio_mmio_nic(instead  ELF binary: nic_drv) ELF binary at runtime and mac address allocation, I don't know why.
Also I did further  modification [2] [3] to sculpt.run to make it happen which is shown below.

[1]
proc nic_drv { } {  

if {[have_board pc]}          { return ipxe_nic_drv }
if {[have_board imx8q_evk]}   { return fec_nic_drv  }
if {[have_board mnt_reform2]} { return fec_nic_drv  }
if {[have_board virt_qemu_arm_v8a]} { return virtio_mmio_nic  }  //added binary

return nic_unavailable
}

https://github.com/genodelabs/genode/blob/master/repos/gems/run/sculpt.run#L153

[2]
proc virtio_mmio_nic { } {  // proc nic_drv -->

if {[have_board pc]}          { return ipxe_nic_drv }
if {[have_board imx8q_evk]}   { return fec_nic_drv  }
if {[have_board mnt_reform2]} { return fec_nic_drv  }
if {[have_board virt_qemu_arm_v8a]} { return virtio_mmio_nic  }  //added binary

return nic_unavailable
}


[3]
   <service name="ROM" label="nic_drv">     <parent label="} [virtio_mmio_nic] {"/> </service>  

https://github.com/genodelabs/genode/blob/master/repos/gems/run/sculpt.run#L631


still the progress is the same, not  able to set up the network  in the sculpt .
Is there anything else that needs to be taken care of or changed ??
 

Thanks.
DIVYA.


On Tue, Mar 28, 2023 at 3:32 PM Norman Feske <norman.feske@genode-labs.com> wrote:
Hello,

>     I modified the sculpt.run as you said but still the uplink session
>     is not getting created may be because of the label mismatch.
>
>     [init] Warning: drivers: no route to service "Uplink"
>     (label="drivers -> virtio_mmio_nic -> ")
>     [init -> drivers -> virtio_mmio_nic] Error: Uplink-session creation
>     failed (ram_quota=3538944, cap_quota=8,
>     mac_address="52:54:00:12:34:56", tx_buf_size=1638400,
>     rx_buf_size=1638400, label="")
>     [init -> drivers -> virtio_mmio_nic] Error: Uncaught exception of
>     type 'Genode::Service_denied'

this message tells us that you have added the network driver to the
drivers subsystem. It does not belong there. In fact, if you inspect the
routing rules for the 'drivers' subsystem [1] in sculpt.run, you will
see that the drivers subsystem is not supposed to request any 'Uplink'
session. So the driver's attempt to request such a session is denied.

Sculpt hosts the network driver inside the runtime subsystem. The driver
is dynamically spawned by the sculpt manager - always named 'nic_drv' -
once the user selects 'LAN' in the network dialog. The change in [2] is
needed because the executable binary of the driver (as present in core's
ROM service) is named differently from 'nic_drv'. With the relabeling in
place (see [3]), the runtime subsystem will obtain the 'virtio_mmio_nic'
executable binary whenever a ROM named "nic_drv" is requested from
within the runtime subsystem.

[1]
https://github.com/genodelabs/genode/blob/master/repos/gems/run/sculpt.run#L377
[2]
https://github.com/genodelabs/genode/blob/master/repos/gems/run/sculpt.run#L153
[3]
https://github.com/genodelabs/genode/blob/master/repos/gems/run/sculpt.run#L631

Regards,
Norman

--
Dr.-Ing. Norman Feske
Genode Labs

https://www.genode-labs.com · https://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth


_______________________________________________
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users