Skip to contentSkip to conversation

runqemu: fix special characters bug

PATCH In review [email protected] 2 participants 2 messages Jul 17, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 runqemu: fix special characters bug

From: Libo Chen <[email protected]>

Fix the following bug for runqemu with a file path which contains vmlinux characters.

runqemu - ERROR - wic doesn't need kernel

---
 scripts/runqemu | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
scripts/runqemu +4 -3
index 2ab36fd03d..f189dbfb60 100755
@@ -368,12 +368,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
Signature · 1 line
2.34.1
#1 lore raw

This should be submitted (and accepted) for the master branch before I can take it for the stable branches.

Steve

Quoted 46 lines · Libo (CN) via lists.openembedded.org

From: Libo Chen <[email protected]>

Fix the following bug for runqemu with a file path which contains vmlinux characters.

runqemu - ERROR - wic doesn't need kernel

---
 scripts/runqemu | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
scripts/runqemu +4 -4
index 2ab36fd03d..f189dbfb60 100755
@@ -368,12 +368,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
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#220518): https://lists.openembedded.org/g/openembedded-core/message/220518
Mute This Topic: https://lists.openembedded.org/mt/114199800/3620601
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-