[oe-commits] [openembedded-core] 01/02: scripts/runqemu: avoid overridden user input for bootparams

git at git.openembedded.org git at git.openembedded.org
Mon Sep 4 16:51:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch morty
in repository openembedded-core.

commit 6050b4ac146722d6714589225ad58ccc26c9ca32
Author: Dmitry Rozhkov <dmitry.rozhkov at linux.intel.com>
AuthorDate: Tue Feb 21 17:18:08 2017 +0200

    scripts/runqemu: avoid overridden user input for bootparams
    
    Currently runqemu hardcodes the "ip=" kernel boot parameter
    when configuring QEMU to use tap or slirp networking. This makes
    the guest system to have a network interface pre-configured
    by kernel and causes systemd to fail renaming the interface
    to whatever pleases it:
    
      Feb 21 10:10:20 intel-corei7-64 systemd-udevd[201]: Error changing
          net interface name 'eth0' to 'enp0s3': Device or resource busy,
    
    Always append user input for kernel boot params after the ones
    added by the script. This way user input has priority over runqemu's
    default params.
    
    (From OE-Core rev: 3f68b5c8d24b52aed5bb3ed970dd8f779b65b1b3)
    
    Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 scripts/runqemu | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 1df6875..6748cb2 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -167,6 +167,7 @@ class BaseConfig(object):
         self.kernel = ''
         self.kernel_cmdline = ''
         self.kernel_cmdline_script = ''
+        self.bootparams = ''
         self.dtb = ''
         self.fstype = ''
         self.kvm_enabled = False
@@ -368,7 +369,7 @@ class BaseConfig(object):
             elif arg.startswith('qemuparams='):
                 self.qemu_opt_script += ' %s' % arg[len('qemuparams='):]
             elif arg.startswith('bootparams='):
-                self.kernel_cmdline_script += ' %s' % arg[len('bootparams='):]
+                self.bootparams = arg[len('bootparams='):]
             elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)):
                 self.check_arg_path(os.path.abspath(arg))
             elif re.search('-image-', arg):
@@ -954,7 +955,9 @@ class BaseConfig(object):
 
     def start_qemu(self):
         if self.kernel:
-            kernel_opts = "-kernel %s -append '%s %s %s'" % (self.kernel, self.kernel_cmdline, self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'))
+            kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel, self.kernel_cmdline,
+                                                                self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'),
+                                                                self.bootparams)
             if self.dtb:
                 kernel_opts += " -dtb %s" % self.dtb
         else:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list