Add VirtIO net support

This commit is contained in:
Palmer Dabbelt 2017-12-11 13:52:07 -08:00
parent 86de0ac05a
commit 9ce68699fb
2 changed files with 4 additions and 1 deletions

View File

@ -177,4 +177,6 @@ sim: $(spike) $(bbl)
.PHONY: qemu
qemu: $(qemu) $(bbl) $(rootfs)
$(qemu) -nographic -machine virt -kernel $(bbl) -drive file=$(rootfs),format=raw,id=hd0 -device virtio-blk-device,drive=hd0
$(qemu) -nographic -machine virt -kernel $(bbl) \
-drive file=$(rootfs),format=raw,id=hd0 -device virtio-blk-device,drive=hd0 \
-netdev user,id=net0 -device virtio-net-device,netdev=net0

View File

@ -36,6 +36,7 @@ CONFIG_ATA=y
CONFIG_SATA_AHCI=y
CONFIG_SATA_SIL24=y
CONFIG_NETDEVICES=y
CONFIG_VIRTIO_NET=y
CONFIG_E1000E=y
CONFIG_R8169=y
# CONFIG_INPUT_KEYBOARD is not set