Hi, I was trying to make network work on qemu-system-arm uboot for tftp/dhcp booting , Could not understand QEMU 5.0.0 networking configuration needed , can you help on this.
$qemu-system-arm --version QEMU emulator version 5.0.0
Yocto BSP used: https://github.com/ahmedkassem56/meta-qemuarma9.git
$ cat /etc/qemu-ifup
#!/bin/sh
set -x
/sbin/ip a add 192.168.0.1/255.255.255.0 dev $1
/sbin/ip link set $1 up
$sudo chmod +x /etc/qemu-ifup
$ sudo qemu-system-arm -M vexpress-a9 -m 256 -kernel u-boot.elf -nographic -net tap,id=tap1,script=/etc/qemu-ifup -net nic,id=nic1
+ /sbin/ip a add 192.168.0.1/255.255.255.0 dev tap1
+ /sbin/ip link set tap1 up
U-Boot 2020.01 (Jan 06 2020 - 20:56:31 +0000)
DRAM: 256 MiB
WARNING: Caches not enabled
Flash: 128 MiB
MMC: MMC: 0
Loading Environment from EXT4... Card did not respond to voltage select!
In: serial
Out: serial
Err: serial
Net: smc911x-0
Hit any key to stop autoboot: 0
=> setenv serverip 192.168.0.1
=> setenv ipaddr 192.168.0.2
=> setenv netmask 255.255.255.0
=> setenv gatewayip 192.168.1.0
=> ping 192.168.0.1
smc911x: MAC 52:54:00:12:34:56
smc911x: detected LAN9118 controller
smc911x: phy initialized
smc911x: MAC 52:54:00:12:34:56
Using smc911x-0 device
ARP Retry count exceeded; starting again
smc911x: MAC 52:54:00:12:34:56
ping failed; host 192.168.0.1 is not alive
=>
Thankfully qemu network is working now with the below setup ..
Ref: Build a complete virtual ARM development environment based on QEMU (uboot+linux+rootfs)
~/ProjectWork/bin/$cat tuntap.sh
Add below lines $vi ~/.bashrc
$ source ~/.bashrc
HOST:
TARGET:
~/ProjectWork/bin$ sudo qemu-system-arm -M vexpress-a9 -m 512 -nographic -net nic -net tap,ifname=tap0,script=no -kernel u-boot.elf