diff options
author | Libo Chen <libo.chen.cn@windriver.com> | 2025-08-05 19:42:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-07 12:11:16 +0100 |
commit | b36799ea7d62dd2ff695c1e995ac96e6cd1e973d (patch) | |
tree | ecbe7208238022e58f71a666a959fdb10b5b4eff | |
parent | 938abd7c30668480c0394b7ea6605e187ab78ecb (diff) | |
download | poky-b36799ea7d62dd2ff695c1e995ac96e6cd1e973d.tar.gz |
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 <libo.chen.cn@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/runqemu | 7 |
1 files 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): | |||
369 | - Check whether it is an NFS dir | 369 | - Check whether it is an NFS dir |
370 | - Check whether it is an OVMF flash file | 370 | - Check whether it is an OVMF flash file |
371 | """ | 371 | """ |
372 | n = os.path.basename(p) | ||
372 | if p.endswith('.qemuboot.conf'): | 373 | if p.endswith('.qemuboot.conf'): |
373 | self.qemuboot = p | 374 | self.qemuboot = p |
374 | self.qbconfload = True | 375 | self.qbconfload = True |
375 | elif re.search('\\.bin$', p) or re.search('bzImage', p) or \ | 376 | elif re.search('\\.bin$', n) or re.search('bzImage', n) or \ |
376 | re.search('zImage', p) or re.search('vmlinux', p) or \ | 377 | re.search('zImage', n) or re.search('vmlinux', n) or \ |
377 | re.search('fitImage', p) or re.search('uImage', p): | 378 | re.search('fitImage', n) or re.search('uImage', n): |
378 | self.kernel = p | 379 | self.kernel = p |
379 | elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)): | 380 | elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)): |
380 | self.rootfs = p | 381 | self.rootfs = p |