summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-11-28 11:46:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-29 10:29:54 +0000
commitd5e2ef31b151825613b62e58034e81f72526a944 (patch)
tree48ea0db5fb8693e7ec18e03b014f8bedd4c01dec
parentf73e370bec16d206592a7ca01b4a86b1d1316ada (diff)
downloadopenembedded-core-contrib-d5e2ef31b151825613b62e58034e81f72526a944.tar.gz
runqemu: do not hardcode the ip address of the nfs server when using tap
Rather, set it similarly to the overall network config. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rwxr-xr-xscripts/runqemu3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 7bd9465593..04728673de 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -999,7 +999,7 @@ class BaseConfig(object):
if self.slirp_enabled:
self.nfs_server = '10.0.2.2'
else:
- self.nfs_server = '192.168.7.1'
+ self.nfs_server = '192.168.7.@GATEWAY@'
# Figure out a new nfs_instance to allow multiple qemus running.
ps = subprocess.check_output(("ps", "auxww")).decode('utf-8')
@@ -1187,6 +1187,7 @@ class BaseConfig(object):
netconf = " " + self.cmdline_ip_tap
netconf = netconf.replace('@CLIENT@', str(client))
netconf = netconf.replace('@GATEWAY@', str(gateway))
+ self.nfs_server = self.nfs_server.replace('@GATEWAY@', str(gateway))
logger.info("Network configuration:%s", netconf)
self.kernel_cmdline_script += netconf
mac = "%s%02x" % (self.mac_tap, client)