]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
runqemu: fix special characters bug master
authorLibo Chen <libo.chen.cn@windriver.com>
Wed, 6 Aug 2025 02:42:47 +0000 (19:42 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 Aug 2025 09:43:42 +0000 (10:43 +0100)
Fix the bug in runqemu that happens when the file path contains
the specific words such as 'vmlinux', e.g. /home/frank/vmlinux.

runqemu - ERROR - wic doesn't need kernel

Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 3a339acc2a473bb4399f4f8d73ff66cf85d18d05..c24528eac80ee254e08f7dc3aef147a4bd10d69f 100755 (executable)
@@ -369,12 +369,13 @@ class BaseConfig(object):
         - Check whether it is an NFS dir
         - Check whether it is an OVMF flash file
         """
+        n = os.path.basename(p)
         if p.endswith('.qemuboot.conf'):
             self.qemuboot = p
             self.qbconfload = True
-        elif re.search('\\.bin$', p) or re.search('bzImage', p) or \
-             re.search('zImage', p) or re.search('vmlinux', p) or \
-             re.search('fitImage', p) or re.search('uImage', p):
+        elif re.search('\\.bin$', n) or re.search('bzImage', n) or \
+             re.search('zImage', n) or re.search('vmlinux', n) or \
+             re.search('fitImage', n) or re.search('uImage', n):
             self.kernel =  p
         elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)):
             self.rootfs = p