From b36799ea7d62dd2ff695c1e995ac96e6cd1e973d Mon Sep 17 00:00:00 2001 From: Libo Chen Date: Tue, 5 Aug 2025 19:42:47 -0700 Subject: runqemu: fix special characters bug 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 (From OE-Core rev: 3c186fe7741adecb0887e36c8a9164a58fc16437) Signed-off-by: Libo Chen Signed-off-by: Richard Purdie --- scripts/runqemu | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index 3a339acc2a..c24528eac8 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -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 -- cgit v1.2.3-54-g00ecf