]> code.ossystems Code Review - openembedded-core.git/commitdiff
utils/qemurunner.py: QemuRunner.start() add support for specify extra kernel cmdline
authorAníbal Limón <anibal.limon@linux.intel.com>
Tue, 12 Jul 2016 21:29:49 +0000 (16:29 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Jul 2016 09:24:52 +0000 (10:24 +0100)
Add ability to specify extra_bootargs (kernel cmdline) in order to enable systemd
debug log in images that enables systemd init.

[YOCTO #9299]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/targetcontrol.py
meta/lib/oeqa/utils/qemurunner.py

index 1c57efaaef9d44cee8fc4f2e560e6464f15ce896..d3b49b770afc118e4d156c0b76b2e0ab54b6af26 100644 (file)
@@ -174,8 +174,8 @@ class QemuTarget(BaseTarget):
         bb.note("Qemu log file: %s" % self.qemulog)
         super(QemuTarget, self).deploy()
 
-    def start(self, params=None, ssh=True):
-        if self.runner.start(params, get_ip=ssh):
+    def start(self, params=None, ssh=True, extra_bootparams=None):
+        if self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams):
             if ssh:
                 self.ip = self.runner.ip
                 self.server_ip = self.runner.server_ip
index b8ac3f0bb6b5ece871f21a76bec8e7efcaa03596..df73120254eb44ef01438915eb2b8733742bb065 100644 (file)
@@ -92,7 +92,7 @@ class QemuRunner:
                 self._dump_host()
                 raise SystemExit
 
-    def start(self, qemuparams = None, get_ip = True):
+    def start(self, qemuparams = None, get_ip = True, extra_bootparams = None):
         if self.display:
             os.environ["DISPLAY"] = self.display
             # Set this flag so that Qemu doesn't do any grabs as SDL grabs
@@ -120,7 +120,11 @@ class QemuRunner:
             return False
 
 
-        self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8 printk.time=1" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport)
+        bootparams = 'console=tty1 console=ttyS0,115200n8 printk.time=1'
+        if extra_bootparams:
+            bootparams = bootparams + ' ' + extra_bootparams
+
+        self.qemuparams = 'bootparams="{0}" qemuparams="-serial tcp:127.0.0.1:{1}"'.format(bootparams, threadport)
         if not self.display:
             self.qemuparams = 'nographic ' + self.qemuparams
         if qemuparams: