scripts: fold stg.sh into st.sh via a -d (display) flag#297
Merged
Conversation
st.sh now takes an optional -d flag that opens the QEMU GTK window for the guest PL111 CLCD (LVGL screen), replacing the separate stg.sh launcher. Without -d the default stays headless (-display none, serial console only). The flag switches the display backend to gtk,zoom-to-fit=off and, when set, exports GDK_BACKEND=x11 / GDK_SCALE=1 / GDK_DPI_SCALE=1 so the so3,absmouse absolute pointer maps 1:1 onto the guest surface on fractionally-scaled HiDPI Wayland panels (harmless on native X11). Own options are parsed out before the remaining args are forwarded to QEMU, so pass-throughs like -S still work. stg.sh is removed; docs, the docker run.sh guard message and the generated diagrams (gen_so3_diagrams.py + so3.drawio + PNGs) are updated to st.sh -d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merge the graphical launcher
stg.shintost.shbehind an optional-d(display) flag, so there is a single launch script.st.sh(no flag) — headless as before:-display none, serial console only. Default for non-graphical work and CI.st.sh -d— graphical: opens the QEMU GTK window (-display gtk,zoom-to-fit=off) presenting the guest PL111 CLCD (LVGL screen), and exportsGDK_BACKEND=x11/GDK_SCALE=1/GDK_DPI_SCALE=1so theso3,absmouseabsolute pointer maps 1:1 onto the guest surface on fractionally-scaled HiDPI Wayland panels (harmless on native X11).st.sh -hprints usage.The script's own options are parsed out first; the remaining args are still forwarded to QEMU, so pass-throughs like
st.sh -S(halt-for-GDB) keep working. Applies to bothvirt64andvirt32.scripts/stg.shis removed.Docs & diagrams
Every
stg.shreference updated tost.sh -d:doc/source/display_input.rst,lvgl.rst,user_guide.rst,build_system.rstdocker/scripts/run.shguard messagegen_so3_diagrams.py→so3.drawio+so3_build.png/so3_io.pngTest
bash -n scripts/st.shpasses.-d→ display on;-d -Sand-Sforward-Sto QEMU;-hprints usage.