summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2019-01-07 16:45:33 +0100
committerCorentin LABBE <clabbe@baylibre.com>2019-01-08 14:34:08 +0100
commit2b5da0fc18215febc4d982ed298e9be4485a7789 (patch)
treea6315602e4900742cb88ce5a20287c403658241b
parent866fbb4ed9f7bcc86900ab48f400a29d59013fa9 (diff)
lavalab-gen.py: Permit qemu to use TAP devices
For full networking capacity, qemu need to access TAP devices. This patch adds the choice of use it via the tap keyword.
-rw-r--r--README.md1
-rwxr-xr-xlavalab-gen.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/README.md b/README.md
index e795934..da88f2b 100644
--- a/README.md
+++ b/README.md
@@ -271,6 +271,7 @@ boards:
type: the LAVA device-type of this device
slave: (optional) Name of the slave managing this device. Default to first slave found or default_slave if set.
kvm: (For qemu only) Does the qemu could use KVM (default: no)
+ tap: (For qemu only) Does the qemu could use TAP devices (default: no)
uboot_ipaddr: (optional) a static IP to set in uboot
uboot_macaddr: (Optional) the MAC address to set in uboot
custom_option: (optional) All following strings will be directly append to devicefile
diff --git a/lavalab-gen.py b/lavalab-gen.py
index e814e5e..378f40c 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -437,6 +437,11 @@ def main():
if use_kvm:
dockcomp_add_device(dockcomp, worker_name, "/dev/kvm:/dev/kvm")
# board specific hacks
+ use_tap = False
+ if "tap" in board:
+ use_tap = board["tap"]
+ if use_tap:
+ dockcomp_add_device(dockcomp, worker_name, "/dev/net/tun:/dev/net/tun")
if devicetype == "qemu" and not use_kvm:
device_line += "{% set no_kvm = True %}\n"
if "uart" in board: