diff --git a/kernel/Makefile b/kernel/Makefile index 8a3bbf9..0d3a6d8 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -27,6 +27,7 @@ # | raspi3 Only available on aarch64, run on Raspberry Pi 3 Model B/B+ # pci_passthru = 0000:00:00.1 Only available on x86_64, passthrough the specified PCI device # init = /bin/ls Only available on riscv64, run specified program instead of user shell +# extra_nic = on | off Only available on x86_64, add an additional e1000 nic arch ?= riscv64 board ?= none @@ -36,6 +37,7 @@ graphic ?= off smp ?= 4 pci_passthru ?= init ?= +extra_nic ?= off target := $(arch) build_path := target/$(target)/$(mode) @@ -81,6 +83,11 @@ qemu_opts += \ qemu_net_opts += \ -device vfio-pci,host=$(pci_passthru) endif +ifeq ($(extra_nic), on) +qemu_net_opts += \ + -netdev type=tap,id=net1,script=no,downscript=no \ + -device e1000e,netdev=net1 +endif else ifeq ($(arch), riscv32) qemu_opts += \