How to use virtio qemu nic?

Alexander Tormasov a.tormasov at innopolis.ru
Fri Jun 3 13:48:09 CEST 2022


Thank you for suggestion,
Anyware I had the same problem if I use

if {[expr [have_board virt_qemu] && [have_spec arm_64]]} { return "virtio_nic_drv" }

There are no any file like virtio_nic_drv build :

…

  Library core-hw-virt_qemu
  Program drivers/nic/virtio/spec/arm_64/virtio_mmio_nic
    COMPILE  version.o
  Program drivers/rtc/dummy/dummy_rtc_drv
    LINK     virtio_mmio_nic
  Program init/init
  Library vfs_pipe
    MERGE    core-hw-virt_qemu.lib.a
  Program drivers/nic/fec/spec/arm_64/fec_nic_drv
  Program server/nic_router/nic_router
…

make[1]: Leaving directory '/var/services/homes/admin/gen/22.05/build/arm_v8a'
genode build completed
using 'hw_timer_drv' as 'timer'
error copying "bin/virtio_nic_drv": no such file or directory
    while executing
"file copy -force $src $dst"
    (procedure "copy_file" line 2)
    invoked from within
"copy_file bin/[kernel_specific_binary $binary] [run_dir]/genode/$binary"
    (procedure "copy_genode_binaries_to_run_dir" line 4)
    invoked from within
"copy_genode_binaries_to_run_dir $modules"
    (procedure "run_boot_dir" line 25)
    invoked from within
"run_boot_dir $binaries"
    (procedure "build_boot_image" line 35)
…

3 июня 2022 г., в 13:47, Martin Stein <martin.stein at genode-labs.com> написал(а):

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


_______________________________________________
Genode users mailing list
users at lists.genode.org
https://lists.genode.org/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20220603/2bf1eb30/attachment-0001.htm>


More information about the users mailing list