From 5f1c6f8e53fc0bf9e781d20e7940462094240438 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Tue, 5 Nov 2024 14:04:45 -0500 Subject: [PATCH] hvk: make extlinux default menu configuration optional --- scripts/hvk-compile.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/hvk-compile.sh b/scripts/hvk-compile.sh index d8143c2..0662b8a 100755 --- a/scripts/hvk-compile.sh +++ b/scripts/hvk-compile.sh @@ -13,6 +13,7 @@ print_usage() echo "Usage: ${PROG_NAME} [OPTIONS...] [IP ADDRESS]" echo echo "Options:" + echo " -e change extlinux default menu to test" echo " -f deploy folder (default is ./rootfs)" echo " -h display this help and exit" echo " -r reboot after deploying files" @@ -25,13 +26,17 @@ reboot=0 warnings_opts="" archive=0 deploydir=${DEPLOYDIR} +extlinux=0 -while getopts "f:hrwz" flag ;do +while getopts "ef:hrwz" flag ;do case ${flag} in h) print_usage exit 0 ;; + e) + extlinux=1 + ;; f) deploydir=${OPTARG} ;; @@ -152,12 +157,14 @@ if [ "${EVK_IP}" != "" ]; then scp ${archive} root@${EVK_IP}:/tmp ssh root@${EVK_IP} "cd / && tar -xf /tmp/${archive}" - # Determine if using extlinux on target: - ssh -q root@${EVK_IP} [[ -f /boot/extlinux/extlinux.conf ]] && EXTLINUX=1 || EXTLINUX=0; + if [ ${extlinux} -eq 1 ]; then + # Determine if using extlinux on target: + ssh -q root@${EVK_IP} [[ -f /boot/extlinux/extlinux.conf ]] && EXTLINUX=1 || EXTLINUX=0; - if [ "${EXTLINUX}" = "1" ]; then - # Switch to test kernel and DTB: - ssh root@${EVK_IP} "sed -i -e 's@^DEFAULT.*@DEFAULT test@' /boot/extlinux/extlinux.conf" + if [ "${EXTLINUX}" = "1" ]; then + # Switch to test kernel and DTB: + ssh root@${EVK_IP} "sed -i -e 's@^DEFAULT.*@DEFAULT test@' /boot/extlinux/extlinux.conf" + fi fi if [ x"${reboot}" = x"1" ]; then -- 2.20.1