From 7bd11f0275cf22089177692092d73ab73ede87fa Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 1 Nov 2020 21:26:10 +0100 Subject: New (working!) network approach --- run | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'run') diff --git a/run b/run index f4434e6..f3ed4c2 100755 --- a/run +++ b/run @@ -26,7 +26,7 @@ no_ask="${2}" qemu_with_flags() { if [ -z "$network" ]; then network="rtl8139"; fi if [ "$network" != "false" ] && [ "$mode" = "net" ]; then - qemu-system-i386 -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -smp 4 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device $network,netdev=net0,id=nic0 -object filter-dump,id=nic0,netdev=net0,file=dump.pcap "$@" + qemu-system-i386 -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -smp 4 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000 -device $network,netdev=net0 -object filter-dump,id=dump,netdev=net0,file=dump.pcap "$@" else qemu-system-i386 -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -smp 4 "$@" fi @@ -168,16 +168,6 @@ make_build() { } make_test() { - if [ "$mode" = "net" ]; then - brctl show br0 &>/dev/null || ( - sudo brctl addbr br0 - sudo brctl addif br0 enp8s0 - sudo ip tuntap add tap0 mode tap - sudo ip link set br0 up - sudo ip link set tap0 up - ) - fi - if [ "$mode" = "test" ]; then qemu_with_flags -serial file:test.log -nographic -drive file=build/disk.img,format=raw,index=1,media=disk echo -- cgit v1.2.3