]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: output network configuration
authorEd Bartosh <ed.bartosh@linux.intel.com>
Fri, 17 Mar 2017 13:18:32 +0000 (15:18 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 21 Mar 2017 22:42:59 +0000 (22:42 +0000)
runqemu adds network configuration parameters to the kernel
command line to configure guest networking. This works only
for the images that run with external kernel using qemu -kernel
parameter. It doesn't work for the images that use bootloader
to boot kernel as -kernel parameter is not used and network
configuration is not possible to get.

Added host and guest ip addresses and netmask of tap link
to the runqemu output. This should allow external programs
that execute runqemu to get network configuration.

[YOCTO #10833]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 4fa2867e73c516a675f4e67eb6e670a8e6ca843c..23c9efbae27c82e01165f45700b995e698314cb9 100755 (executable)
@@ -925,7 +925,9 @@ class BaseConfig(object):
         client = gateway + 1
         if self.fstype == 'nfs':
             self.setup_nfs()
-        self.kernel_cmdline_script += " ip=192.168.7.%s::192.168.7.%s:255.255.255.0" % (client, gateway)
+        netconf = "192.168.7.%s::192.168.7.%s:255.255.255.0" % (client, gateway)
+        logger.info("Network configuration: %s", netconf)
+        self.kernel_cmdline_script += " ip=%s" % netconf
         mac = "%s%02x" % (self.mac_tap, client)
         qb_tap_opt = self.get('QB_TAP_OPT')
         if qb_tap_opt: