From 432565892407381f8b485e56373f711ea0b59e1a Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 4 Apr 2024 12:12:13 +0200 Subject: [PATCH 1/6] Merge branch 'de#4517 reactivate watchdogv' into v1.11 --- build_sdcard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 4877368b5..343abe664 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -444,7 +444,7 @@ if [ "${baseimage}" = "raspios_arm64" ]; then fi echo "max_usb_current=1" | tee -a $configFile echo "dtparam=nvme" | tee -a $configFile - echo "dtparam=watchdog=off" | tee -a $configFile + echo "dtparam=watchdog=on" | tee -a $configFile echo 'dtoverlay=pi3-disable-bt' | tee -a $configFile echo 'dtoverlay=disable-bt' | tee -a $configFile else From 6558fb41f1db9d79900c8518a180f0de0bdbc47b Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 4 Apr 2024 12:18:59 +0200 Subject: [PATCH 2/6] check internet & clean --- ci/packer.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/packer.sh b/ci/packer.sh index 88dcab06d..711ca8723 100644 --- a/ci/packer.sh +++ b/ci/packer.sh @@ -17,6 +17,12 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi +# check if internet is available +if ping -c 1 "1.1.1.1" &> /dev/null; then + echo "error='script needs internet connection to run'" + exit 1 +fi + # usage info echo "packer.sh [BRANCH] [arm|x86] [min|fat] [?lastcommithash]" echo "Build RaspiBlitz install images on a Debian LIVE system" @@ -224,6 +230,7 @@ fi echo "# clean up" +cd .. rm -rf raspiblitz 2>/dev/null echo "# SIGN & SECURE IMAGE ###########################################" From 8b77877d6bd1f2e8e23afbab4a8c274d55a19269 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 4 Apr 2024 12:22:34 +0200 Subject: [PATCH 3/6] clean up --- ci/packer.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/packer.sh b/ci/packer.sh index 711ca8723..ad7ec93d8 100644 --- a/ci/packer.sh +++ b/ci/packer.sh @@ -104,6 +104,8 @@ if [ ${#COMMITHASH} -gt 0 ]; then echo "# actual(${actualCOMMITHASH}) ?= wanted(${COMMITHASH})" matches=$(echo "${actualCOMMITHASH}" | grep -c "${COMMITHASH}") if [ ${matches} -eq 0 ]; then + cd .. + rm -rf raspiblitz 2>/dev/null echo "error='COMMITHASH of branch does not match'" exit 1 fi From 69a18c7375230308c7507b4e21d69978b0a22665 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 4 Apr 2024 12:30:09 +0200 Subject: [PATCH 4/6] fix packer script --- ci/packer.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/packer.sh b/ci/packer.sh index ad7ec93d8..3d2be0227 100644 --- a/ci/packer.sh +++ b/ci/packer.sh @@ -17,12 +17,6 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi -# check if internet is available -if ping -c 1 "1.1.1.1" &> /dev/null; then - echo "error='script needs internet connection to run'" - exit 1 -fi - # usage info echo "packer.sh [BRANCH] [arm|x86] [min|fat] [?lastcommithash]" echo "Build RaspiBlitz install images on a Debian LIVE system" @@ -32,6 +26,14 @@ echo "Results will be stored in:" echo $BUILDFOLDER echo "Start this script in the root of an writable 128GB NTFS formatted USB drive." +# check if internet is available +if ping -c 1 "1.1.1.1" &> /dev/null; then + echo "# checking internet" +else + echo "error='script needs internet connection to run'" + exit 1 +fi + # get parameters if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then From 35b5e8e67078a18b9bd2926ad3869ad9b1f3b8a8 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 4 Apr 2024 12:36:52 +0200 Subject: [PATCH 5/6] fail on wrong branch --- ci/packer.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/packer.sh b/ci/packer.sh index 3d2be0227..525fa2f09 100644 --- a/ci/packer.sh +++ b/ci/packer.sh @@ -98,6 +98,13 @@ cd raspiblitz # checkout the desired branch git checkout $BRANCH +if [ $? -gt 0 ]; then + cd .. + rm -rf raspiblitz 2>/dev/null + echo "# BRANCH: ${BRANCH}" + echo "error='git checkout BRANCH failed'" + exit 1 +fi # check commit hash if set if [ ${#COMMITHASH} -gt 0 ]; then From c7eb225de47bc3ff92b19d8ad9a8969e7035bbab Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 4 Apr 2024 13:30:36 +0200 Subject: [PATCH 6/6] sd card build prevent "unable to resolve host debian" error --- build_sdcard.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build_sdcard.sh b/build_sdcard.sh index 343abe664..13ccda356 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -294,6 +294,15 @@ echo "[Login] HandleLidSwitch=ignore HandleLidSwitchDocked=ignore" | tee /etc/systemd/logind.conf.d/nosuspend.conf +# check if /etc/hosts already has debian entry +# prevent "unable to resolve host debian" error +isDebianInHosts=$(grep -c "debian" /etc/hosts) +if [ ${isDebianInHosts} -eq 0 ]; then + echo "# Adding debian to /etc/hosts" + echo "127.0.1.1 debian" | tee -a /etc/hosts > /dev/null + systemctl restart networking +fi + # FIXING LOCALES # https://github.com/rootzoll/raspiblitz/issues/138 # https://daker.me/2014/10/how-to-fix-perl-warning-setting-locale-failed-in-raspbian.html