]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
runqemu: add QB_KERNEL_CMDLINE
authorRaju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
Wed, 15 Jun 2022 13:10:24 +0000 (18:40 +0530)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 17 Jun 2022 16:57:39 +0000 (17:57 +0100)
runqemu auto generating the KERNEL_CMDLINE values and specifying using
-append option to qemu boot command which will lead to override the
kernel_cmdline/bootargs which are specified in DTB when using -dtb option.
Add new macro QB_KERNEL_CMDLINE to specify not to add the runqemu
generated KERNEL_CMDLINE values instead use which are in the DTB if
value defined as 'none'.
Add provision to override bootargs using # runqemu bootparams="root=/dev/ram0"

Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 6e1f073ed2e647cc2ffaf55598a8e9e8581cd818..b4c1ae6d83f86327c27b415856c22191c3b861ad 100755 (executable)
@@ -1486,7 +1486,12 @@ class BaseConfig(object):
     def start_qemu(self):
         import shlex
         if self.kernel:
-            kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel, self.kernel_cmdline,
+            kernel_opts = "-kernel %s" % (self.kernel)
+            if self.get('QB_KERNEL_CMDLINE') == "none":
+                if self.bootparams:
+                    kernel_opts += " -append '%s'" % (self.bootparams)
+            else:
+                kernel_opts += " -append '%s %s %s %s'" % (self.kernel_cmdline,
                                                                 self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'),
                                                                 self.bootparams)
             if self.dtb: