Minor debug option improvement

This commit is contained in:
Albrecht Lohofener
2025-01-20 10:30:25 +01:00
parent f706e1b9f8
commit c1391d1ca9
3 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -18,4 +18,4 @@ trap 'error "Status $? while: $BASH_COMMAND (line $LINENO/$BASH_LINENO)"' ERR
: "${FORWARD_LUCI:=""}" # Make LuCI OpenWrt web interface accessible via host LAN
: "${OPENWRT_AFTER_BOOT_CMD:=""}" # User command or script to run after OpenWrt is booted
: "${IS_U_OS_APP:=""}" # By default this container is not a u-OS app
: "${DEBUG:="n"}" # Disable debugging
: "${DEBUG:=""}" # Disable debugging
+11 -2
View File
@@ -265,7 +265,15 @@ PCI_ARGS="${PCI_1_ARGS}"
info "Booting image using $VERS..."
# See qemu command if debug is enabled
[[ "$DEBUG" == [Yy1]* ]] && set -x
if [[ -z "${DEBUG}" ]]; then
DEBUG_ARGS=""
else
set -x # Show final qemu command
# Not working as expected grub output will delete previous log messages
#DEBUG_ARGS="-serial stdio" # Show OpenWrt kernel message in container log
DEBUG_ARGS=""
fi
#************************ FINAL BOOTING ************************
exec qemu-system-"$CPU_ARCH" \
@@ -284,4 +292,5 @@ exec qemu-system-"$CPU_ARCH" \
-qmp unix:/run/qmp-sock,server=on,wait=off \
-chardev socket,path=/run/qga.sock,server=on,wait=off,id=qga0 \
-device virtio-serial \
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \
$DEBUG_ARGS