How to use virtio qemu nic?

Martin Stein martin.stein at genode-labs.com
Fri Jun 3 12:46:58 CEST 2022


Hi Alexander,

I'm not especially familiar with ARM virt platforms but I can tell from
your error log that your run scripts attempts to import the archive
src/virtio_mmio_nic because of these lines:

! if {...} { return "virtio_mmio_nic" }
! ...
! lappend depot_pkgs [depot_user]/src/[binary_nic_drv]
! ...
! import_from_depot $depot_pkgs

And fails to find the archive. Furthermore, the archive is at least not
part of the "official" repos:

! $ find repos/ -type d -wholename *recipe*virt*nic*
! repos/os/recipes/src/virtio_nic_drv

Have you tried using the 'src/virtio_nic_drv' instead? It seems to
support arm, arm_64, and x86:

! $ ls repos/os/src/drivers/nic/virtio/spec/
! arm  arm_64  x86

Cheers,
Martin



On 03.06.22 12:12, Alexander Tormasov via users wrote:
>     Good day!
> I want to compile my network http golang sample using the following command
> 
> make -C build/arm_v8a/ KERNEL=hw BOARD=virt_qemu run/go_http
> 
> Where I can find example of usage virtio nic for arm ?
> 
> I try to use scrcpy sample for universal run file , and add something
> like below - but it fail:
> 
> proc binary_nic_drv { } {
> if {[have_board linux]} { return "linux_nic_drv" }
> if {[have_board pc]} { return "ipxe_nic_drv" }
> if {[expr [have_board virt_qemu] && [have_spec arm_64]]} { return
> "virtio_mmio_nic" }
> if {[expr [have_board virt_qemu] && [have_spec x86_64]]} { return
> "virtio_pci_nic" }
> return "unknown_nic_drv"
> }
> 
>> 
> set depot_pkgs "[depot_user]/pkg/[drivers_nic_pkg]"
> lappend depot_pkgs [depot_user]/src/[binary_nic_drv]
> 
> if [have_board linux] {
> lappend depot_pkgs [depot_user]/src/linux_rtc_drv
> } else {
> if [have_board pc] {
> lappend depot_pkgs [depot_user]/src/rtc_drv
> } else {
> lappend depot_pkgs [depot_user]/src/dummy_rtc_drv
> }
> }
> 
> puts $depot_pkgs
> import_from_depot $depot_pkgs
> 
> (Use binary_nic_drv in config)
> 
>> 
> lappend_if $use_nic boot_modules [binary_nic_drv]
>> 
> build_boot_image $boot_modules
> 
> append qemu_args " -m $mem_size -nographic -smp $num_cpu"
> append_qemu_nic_args "hostfwd=tcp::5555-:80"
> 
> run_genode_until forever
> 
> 
> Fail:
> 
>  Library stdcxx
>   Program test/go_http/go_http
> make[1]: Leaving directory
> '/var/services/homes/admin/gen/22.05/build/arm_v8a'
> genode build completed
> genodelabs/pkg/drivers_nic-virt_qemu genodelabs/src/virtio_mmio_nic
> genodelabs/src/dummy_rtc_drv
> Error: recipe for 'src/virtio_mmio_nic' not found - unable to guess version
> make: *** [Makefile:421: run/go_http] Error 1
> make: Leaving directory '/var/services/homes/admin/gen/22.05/build/arm_v8a'
> 
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users
> 



More information about the users mailing list