diff options
author | Libo Chen <libo.chen.cn@windriver.com> | 2025-08-05 19:42:47 -0700 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-09-22 13:17:52 -0700 |
commit | 54578cd03958c076f6113928fb60f882ada1e107 (patch) | |
tree | 9c681ed0cea71655bca1f15e7945c6f931c63319 /scripts/runqemu | |
parent | d2c6c66c1e496d42a70af6fadca3fe1e19bfcfd0 (diff) | |
download | poky-54578cd03958c076f6113928fb60f882ada1e107.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: 0276bd0e8d5cefb6f98d685bc9faa0451780bef9)
Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3c186fe7741adecb0887e36c8a9164a58fc16437)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 2ab36fd03d..f189dbfb60 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -368,12 +368,13 @@ class BaseConfig(object): | |||
368 | - Check whether it is an NFS dir | 368 | - Check whether it is an NFS dir |
369 | - Check whether it is an OVMF flash file | 369 | - Check whether it is an OVMF flash file |
370 | """ | 370 | """ |
371 | n = os.path.basename(p) | ||
371 | if p.endswith('.qemuboot.conf'): | 372 | if p.endswith('.qemuboot.conf'): |
372 | self.qemuboot = p | 373 | self.qemuboot = p |
373 | self.qbconfload = True | 374 | self.qbconfload = True |
374 | elif re.search('\\.bin$', p) or re.search('bzImage', p) or \ | 375 | elif re.search('\\.bin$', n) or re.search('bzImage', n) or \ |
375 | re.search('zImage', p) or re.search('vmlinux', p) or \ | 376 | re.search('zImage', n) or re.search('vmlinux', n) or \ |
376 | re.search('fitImage', p) or re.search('uImage', p): | 377 | re.search('fitImage', n) or re.search('uImage', n): |
377 | self.kernel = p | 378 | self.kernel = p |
378 | elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)): | 379 | elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)): |
379 | self.rootfs = p | 380 | self.rootfs = p |