scripts/qemustart: fix network device emulation
We only enabled pcnet driver for malta machine, and x86/legacy target was supposed to only support e1000 model Cc: Petr Štetiar <ynezz@true.cz> Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
parent
647356a3d2
commit
d726878546
@ -232,11 +232,9 @@ start_qemu_malta() {
|
|||||||
# one will be actually used as the wan, lan network interface inside the
|
# one will be actually used as the wan, lan network interface inside the
|
||||||
# guest machine
|
# guest machine
|
||||||
[ -z "$o_network" ] || {
|
[ -z "$o_network" ] || {
|
||||||
o_qemu_extra+=( \
|
o_qemu_extra+=(
|
||||||
"-netdev" "bridge,id=wan,br=$BR_WAN,helper=$HELPER" "-device" \
|
-netdev bridge,id=wan,br="$BR_WAN,helper=$HELPER" -device pcnet,netdev=wan,mac="$MAC_WAN"
|
||||||
"virtio-net-pci,id=devwan,netdev=wan,mac=$MAC_WAN" \
|
-netdev bridge,id=lan,br="$BR_LAN,helper=$HELPER" -device pcnet,netdev=lan,mac="$MAC_LAN"
|
||||||
"-netdev" "bridge,id=lan,br=$BR_LAN,helper=$HELPER" \
|
|
||||||
"-device" "virtio-net-pci,id=devlan,netdev=lan,mac=$MAC_LAN" \
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,12 +277,20 @@ start_qemu_x86() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ -z "$o_network" ] || {
|
[ -z "$o_network" ] || {
|
||||||
o_qemu_extra+=( \
|
case "${o_subtarget%-*}" in
|
||||||
"-netdev" "bridge,id=lan,br=$BR_LAN,helper=$HELPER" \
|
legacy)
|
||||||
"-device" "virtio-net-pci,id=devlan,netdev=lan,mac=$MAC_LAN" \
|
o_qemu_extra+=(
|
||||||
"-netdev" "bridge,id=wan,br=$BR_WAN,helper=$HELPER" "-device" \
|
-netdev "bridge,id=lan,br=$BR_LAN,helper=$HELPER" -device "e1000,id=devlan,netdev=lan,mac=$MAC_LAN"
|
||||||
"virtio-net-pci,id=devwan,netdev=wan,mac=$MAC_WAN" \
|
-netdev "bridge,id=wan,br=$BR_WAN,helper=$HELPER" -device "e1000,id=devwan,netdev=wan,mac=$MAC_WAN"
|
||||||
)
|
)
|
||||||
|
;;
|
||||||
|
generic|64)
|
||||||
|
o_qemu_extra+=(
|
||||||
|
-netdev "bridge,id=lan,br=$BR_LAN,helper=$HELPER" -device "virtio-net-pci,id=devlan,netdev=lan,mac=$MAC_LAN"
|
||||||
|
-netdev "bridge,id=wan,br=$BR_WAN,helper=$HELPER" -device "virtio-net-pci,id=devwan,netdev=wan,mac=$MAC_WAN"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
case "${o_subtarget%-*}" in
|
case "${o_subtarget%-*}" in
|
||||||
|
Loading…
Reference in New Issue
Block a user