Skip to content

Commit b62ca0d

Browse files
author
Ahmed Ismail
committed
run-script: Fix conflicts with DISPLAY system wide variable
`DISPLAY` is a well-known system-wide variable used in Linux for GUI applications. Overwriting it in the script could lead to unintended side effects, especially when launching graphical applications. Renaming it to HDLCD_GUI to avoid such conflicts. Signed-off-by: Ahmed Ismail <[email protected]>
1 parent df494cd commit b62ca0d

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
run-script: Fix conflicts with DISPLAY system wide variable.

tools/scripts/run.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ NPU_ID=""
1414
FVP_BIN="FVP_Corstone_SSE-320"
1515
FRAMES=""
1616
OPTIONS=""
17-
DISPLAY=true
18-
DISPLAY_OPTIONS=""
17+
HDLCD_GUI=false
18+
HDLCD_GUI_OPTIONS=""
1919

2020
set -e
2121

@@ -33,15 +33,15 @@ Options:
3333
-n,--npu-id NPU ID to use (U55, U65)
3434
-f,--frames Path to camera frames for the ISP to stream
3535
-d,--debug Path to debugger plugin to start FVP
36-
-D,--display Is display (GUI) available
36+
-G,--gui Is HDLCD GUI enabled
3737
3838
Examples:
3939
blinky, keyword-detection, speech-recognition, object-detection
4040
EOF
4141
}
4242

43-
SHORT=t:,n:,s:,h,p:,f:,d:,D:
44-
LONG=target:,npu-id:,audio:,help,path:,frames:,debug:,display:
43+
SHORT=t:,n:,s:,h,p:,f:,d:,G:
44+
LONG=target:,npu-id:,audio:,help,path:,frames:,debug:,gui:
4545
OPTS=$(getopt -n run --options $SHORT --longoptions $LONG -- "$@")
4646

4747
eval set -- "$OPTS"
@@ -81,8 +81,8 @@ do
8181
fi
8282
shift 2
8383
;;
84-
-D | --display )
85-
DISPLAY=$2
84+
-G | --gui )
85+
HDLCD_GUI=$2
8686
shift 2
8787
;;
8888
--)
@@ -185,8 +185,8 @@ if [ -f "$GDB_PLUGIN" ]; then
185185
OPTIONS="--allow-debug-plugin --plugin $GDB_PLUGIN"
186186
fi
187187

188-
if [ "$DISPLAY" = false ]; then
189-
DISPLAY_OPTIONS="-C vis_hdlcd.disable_visualisation=1"
188+
if [ "$HDLCD_GUI" = false ]; then
189+
HDLCD_GUI_OPTIONS="-C vis_hdlcd.disable_visualisation=1"
190190
fi
191191

192192
case "$TARGET" in
@@ -203,7 +203,7 @@ case "$TARGET" in
203203
-C mps3_board.DISABLE_GATING=1"
204204
;;
205205
corstone315 | corstone320 )
206-
OPTIONS="$OPTIONS $DISPLAY_OPTIONS \
206+
OPTIONS="$OPTIONS $HDLCD_GUI_OPTIONS \
207207
-C mps4_board.visualisation.disable-visualisation=1 \
208208
-C core_clk.mul=200000000 \
209209
-C mps4_board.smsc_91c111.enabled=1 \

0 commit comments

Comments
 (0)