]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
runqemu: remove setting of mem on kernel command line for certain systems
authorJon Mason <jon.mason@arm.com>
Mon, 6 Oct 2025 14:24:36 +0000 (10:24 -0400)
committerMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Wed, 5 Nov 2025 12:05:08 +0000 (13:05 +0100)
Some emulated hardware will not boot if mem is set on the kernel command
line (all of the Raspberry Pi machines seemed to fail with this set,
possibly many others).  Also, it is not necessary if the device tree
file is present, as that _should_ have the memory size specified in it.
Add a check for QB_DTB and don't set mem in the kernel command line if
present.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
scripts/runqemu

index 2be7a0f2869fa6a173d062ad9b9b7808821e90af..370b45578137bbdc665c5daca169d12c7b121815 100755 (executable)
@@ -884,7 +884,7 @@ to your build configuration.
         self.set('QB_MEM', qb_mem)
 
         mach = self.get('MACHINE')
-        if not mach.startswith(('qemumips', 'qemux86', 'qemuloongarch64')):
+        if not mach.startswith(('qemumips', 'qemux86', 'qemuloongarch64')) and self.get('QB_DTB') == "":
             self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
 
         self.qemu_opt_script += ' %s' % self.get('QB_MEM')