From: Charles Dias <[email protected]>

The setup_vga() function was ignoring -nographic in QB_GRAPHICS
because it only checked the command-line self.nographic flag.
This caused QB_GRAPHICS to be appended after display autodetection,
resulting in conflicting options like "-device virtio-vga -display sdl"
and "-nographic" in the same command.

Add a check after reading qemuboot.conf to detect -nographic in
QB_GRAPHICS and set self.nographic accordingly. This prevents
unnecessary display autodetection for BSPs that specify -nographic
in their machine configuration, as happens in meta-zephyr layer.

Signed-off-by: Charles Dias <[email protected]>
---
 scripts/runqemu | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index 32a3d6296a..b791abfda3 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -986,6 +986,12 @@ to your build configuration.
                 v = os.path.dirname(self.qemuboot)
             self.set(k_upper, v)
 
+        # Parse QB_GRAPHICS to set internal flags if not already set by 
command-line
+        if not self.nographic and self.get('QB_GRAPHICS'):
+            if '-nographic' in self.get('QB_GRAPHICS'):
+                logger.debug('Detected -nographic in QB_GRAPHICS, setting 
nographic mode')
+                self.nographic = True
+
     def validate_paths(self):
         """Ensure all relevant path variables are set"""
         # When we're started with a *.qemuboot.conf arg assume that image
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#230252): 
https://lists.openembedded.org/g/openembedded-core/message/230252
Mute This Topic: https://lists.openembedded.org/mt/117568097/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to