From 1de8f642065402e3a0d6359d746a8b6b6da0a8ab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 15 Apr 2024 12:47:42 +0200 Subject: [PATCH 001/109] v9.4 - CHANGELOG | Fix typo and wrong user acknowledgement --- CHANGELOG.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 11a2610a26..4693fdd0b0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,8 +2,8 @@ v9.3 (2024-04-14) Enhancements: -- General | We added an own APT repository at https://dietpi.com/apt for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide packages updates too infrequently. -- DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @JRK0469 for making us aware of this: https://dietpi.com/forum/t/19760 +- General | We added an own APT repository at https://dietpi.com/apt for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide package updates too infrequently. +- DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @denguido for making us aware of this: https://dietpi.com/forum/t/19760 - DietPi-Software | Mosquitto: The official APT repository added support for 64-bit ARM on Bookworm, which is now used for our installation. - DietPi-Software | UnRAR: Debian added unrar packages for RISC-V, which are now used for our installation. From 7a9d5a7bd6096caf80699c1e2ac54dae81f8250b Mon Sep 17 00:00:00 2001 From: StephanStS Date: Mon, 15 Apr 2024 21:37:00 +0200 Subject: [PATCH 002/109] Init v9.4 (#7021) * Init v9.4 * Fix v9.4 software array --------- Co-authored-by: MichaIng --- .meta/dietpi-survey_report | 3 ++- .update/version | 4 ++-- CHANGELOG.txt | 11 +++++++++++ dietpi/func/dietpi-globals | 4 ++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index c601631b40..367bbc9790 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -713,10 +713,11 @@ shopt -s extglob aSOFTWARE_NAME9_1[i]=${aSOFTWARE_NAME9_0[i]} aSOFTWARE_NAME9_2[i]=${aSOFTWARE_NAME9_1[i]} aSOFTWARE_NAME9_3[i]=${aSOFTWARE_NAME9_2[i]} + aSOFTWARE_NAME9_4[i]=${aSOFTWARE_NAME9_3[i]} done # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_3[@]}" + for i in "${aSOFTWARE_NAME9_4[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/version b/.update/version index a54ce2d4d0..e2d57b846a 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=3 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_SUB=4 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4693fdd0b0..3dcfeb81b7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,14 @@ +v9.4 +(2024-05-12) + +Enhancements: + +Bug fixes: + +As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME + +----------------------------------------------------------------------------------------------------------- + v9.3 (2024-04-14) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 3f3cf3a3a1..73cf65d6e7 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=3 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 6a5870763add677476a903d9ad9fae4e62bc0ea6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 16 Apr 2024 23:58:09 +0200 Subject: [PATCH 003/109] v9.4 - APT | Add "nanopir5c" component to ship new U-Boot package for NanoPi R5C, which fixes PCIe WiFi --- dietpi/func/dietpi-set_software | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index b6f4c3cde9..55c50d1fc3 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -162,6 +162,23 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 63) all_components='nanopim1';; 66) all_components='nanopim1plus';; 70) all_components='sparkysbc';; + 76) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 + case $HW_VARIANT in + 1) all_components='';; # no R5S component is available yet + 2) all_components='nanopir5c';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + [[ $all_components ]] || for i in nanopi-r5c + do + dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue + all_components=${i/-//} + break + done + ;; + esac + ;; 81) all_components='visionfive2';; 84) all_components='star64';; *) :;; From 240756b83402e2e0334e266735e0009637f8411f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 Apr 2024 00:42:37 +0200 Subject: [PATCH 004/109] v9.4 - DietPi-Installer | Install self-hosted kernel/firmware packages via our APT repository and cleanup dpkg/ucf config files across the whole system, instead of removing those from our kernel/firmware packages individually --- .build/images/dietpi-installer | 38 ++++++--------------------------- dietpi/func/dietpi-set_software | 1 + 2 files changed, 8 insertions(+), 31 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 66fc2b9bee..bc22674084 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1301,55 +1301,31 @@ _EOF_ 3) variant='soquartz';; *) variant='quartz64a';; esac - G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/firmware-$variant.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - aPACKAGES_REQUIRED_INSTALL+=("firmware-$variant") + G_AGI "firmware-$variant" # NanoPi M2/T2/Fire2 Linux 4.4: Requires dedicated boot partition, starting at 4 MiB for U-Boot, with ext4 filesystem elif [[ $G_HW_MODEL == 61 && $(findmnt -Ufnro FSTYPE -M /boot) == 'ext4' ]] && (( $(sfdisk -qlo Start "$BOOT_DEVICE" | mawk 'NR==2') >= 8192 )) then - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-nanopi2.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - aPACKAGES_REQUIRED_INSTALL+=('firmware-nanopi2') + G_AGI firmware-nanopi2 # VisionFive 2 elif (( $G_HW_MODEL == 81 )) then - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' - dpkg-deb -I linux-image-visionfive2.deb conffiles | while read -r line - do - [[ -f $line ]] && G_EXEC rm "$line" - done - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb + G_AGI linux-image-visionfive2 libubootenv-tool G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf - aPACKAGES_REQUIRED_INSTALL+=('linux-image-visionfive2' 'libubootenv-tool') # Star64 elif (( $G_HW_MODEL == 84 )) then - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb' - dpkg-deb -I linux-image-star64.deb conffiles | while read -r line - do - [[ -f $line ]] && G_EXEC rm "$line" - done - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb + G_AGI linux-image-star64 libubootenv-tool G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf - aPACKAGES_REQUIRED_INSTALL+=('linux-image-star64' 'libubootenv-tool') # Sparky SBC elif (( $G_HW_MODEL == 70 )) then - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-sparkysbc.deb' - [[ -f '/boot/uenv.txt' ]] && G_EXEC rm /boot/uenv.txt - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - aPACKAGES_REQUIRED_INSTALL+=('firmware-sparkysbc') + G_AGI firmware-sparkysbc G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-sparkysbc.img.gz' G_EXEC gzip -d u-boot.gz @@ -1610,7 +1586,7 @@ _EOF_ [[ -d '/usr/share/calendar' ]] && G_EXEC rm -R /usr/share/calendar # - Unused DEB package config files - find /etc \( -name '?*\.dpkg-dist' -o -name '?*\.dpkg-old' -o -name '?*\.dpkg-new' -o -name '?*\.dpkg-bak' -o -name '?*\.dpkg-del' -o -name '?*\.ucf-dist' -o -name '?*\.ucf-old' -o -name '?*\.ucf-new' \) -exec rm -v {} + + find / \( -name '*?.dpkg-dist' -o -name '*?.dpkg-old' -o -name '*?.dpkg-new' -o -name '*?.dpkg-bak' -o -name '*?.dpkg-del' -o -name '*?.ucf-dist' -o -name '*?.ucf-old' -o -name '*?.ucf-new' \) -exec rm -v {} + # - Fonts [[ -d '/usr/share/fonts' ]] && G_EXEC rm -R /usr/share/fonts @@ -1753,7 +1729,7 @@ _EOF_ # - Enable /etc/bashrc.d/ support for custom interactive non-login shell scripts: sed --follow-symlinks -i '\#/etc/bashrc\.d/#d' /etc/bash.bashrc # shellcheck disable=SC2016 - echo 'for i in /etc/bashrc.d/*.sh /etc/bashrc.d/*.bash; do [ -r "$i" ] && . $i; done; unset -v i' >> /etc/bash.bashrc + echo 'for i in /etc/bashrc.d/*.sh /etc/bashrc.d/*.bash; do [ -r "$i" ] && . "$i"; done; unset -v i' >> /etc/bash.bashrc # - Enable bash-completion for non-login shells: # - NB: It is called twice on login shells then, but exits directly if called once already. G_EXEC ln -sf /etc/profile.d/bash_completion.sh /etc/bashrc.d/dietpi-bash_completion.sh diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 55c50d1fc3..084da1888e 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -170,6 +170,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 2) all_components='nanopir5c';; *) [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + # shellcheck disable=SC2043 [[ $all_components ]] || for i in nanopi-r5c do dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue From 511d7a94d8f545c78b3426260cfe3d3d6bb7ba5a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 Apr 2024 00:54:01 +0200 Subject: [PATCH 005/109] v9.4 - DietPi-Installer | Do not remove dietpi.list and fix Bullseye suite on Armbian-based images --- .build/images/dietpi-installer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index bc22674084..6a9814b96c 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1035,7 +1035,7 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete lists - G_EXEC rm -Rf /etc/apt/sources.list.d/* + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + # Add Armbian repository G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Update APT lists @@ -1423,8 +1423,8 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete components from Armbian list and connect via HTTPS - G_EXEC rm -Rf /etc/apt/sources.list.d/{,.??,.[^.]}* - G_EXEC eval "echo 'deb https://apt.armbian.com $DISTRO_TARGET_NAME main' > /etc/apt/sources.list.d/dietpi-armbian.list" + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Skip creating kernel symlinks and remove existing ones if [[ -L '/vmlinuz' ]] From f0d69bb4adc0f0daa0841ffe5a343e2f19562832 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 Apr 2024 00:54:49 +0200 Subject: [PATCH 006/109] v9.4 - Coding | Remove trailing space --- dietpi/func/dietpi-set_software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 084da1888e..0c07a26a6c 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -170,7 +170,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 2) all_components='nanopir5c';; *) [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) - # shellcheck disable=SC2043 + # shellcheck disable=SC2043 [[ $all_components ]] || for i in nanopi-r5c do dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue From b3a7ebe04282c81515630872e6d9a1131cbaa4e4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 Apr 2024 21:20:32 +0200 Subject: [PATCH 007/109] v9.4 - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. --- .update/patches | 6 ++++++ CHANGELOG.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/.update/patches b/.update/patches index d4bcc7f4e8..551bd9e1f3 100755 --- a/.update/patches +++ b/.update/patches @@ -1566,6 +1566,12 @@ Patch_9_3() (( $G_AGUP_COUNT )) && G_AGUG } +Patch_9_4() +{ + # Update DietPi APT list for NanoPi R5C + (( $G_HW_MODEL == 76 )) && /boot/dietpi/func/dietpi-set_software apt-mirror dietpi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3dcfeb81b7..e546f85fa7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.4 (2024-05-12) Enhancements: +- NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. Bug fixes: From 68da00a416a212d314a72688783329a2b7d07c12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 17:43:50 +0200 Subject: [PATCH 008/109] v9.4 - DietPi-Software | Update some fallback URLs and new (additional) Mosquitto APT key --- dietpi/dietpi-software | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index bf9a3d068c..21831cc080 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6691,7 +6691,7 @@ _EOF_ if (( $G_DISTRO < 8 )) && [[ $G_HW_ARCH == 2 || $G_HW_ARCH == 10 || ( $G_HW_ARCH == 3 && $G_DISTRO == 7 ) ]] then # APT key - local url='https://repo.mosquitto.org/debian/mosquitto-repo.gpg.key' + local url='https://repo.mosquitto.org/debian/mosquitto-repo.gpg' G_CHECK_URL "$url" G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-mosquitto.gpg --yes" @@ -7434,7 +7434,7 @@ _EOF_ then Download_Install 'https://github.com/gotson/komga/releases/download/v0.165.0/komga-0.165.0.jar' /mnt/dietpi_userdata/komga/komga.jar else - local fallback_url='https://github.com/gotson/komga/releases/download/1.10.4/komga-1.10.4.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.11.0/komga-1.11.0.jar' Download_Install "$(curl -sSfL 'https://api.github.com/repos/gotson/komga/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/komga-[^"\/]*\.jar"$/{print $4}')" /mnt/dietpi_userdata/komga/komga.jar fi @@ -10592,7 +10592,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.10/gitea-1.21.10-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.11/gitea-1.21.11-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User From c9cc8df4d6a5ec4e9e5b9f7325c2b7023f027efe Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 18:37:16 +0200 Subject: [PATCH 009/109] v9.4 - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. --- CHANGELOG.txt | 1 + dietpi/func/dietpi-globals | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e546f85fa7..d03de731bc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.4 (2024-05-12) Enhancements: +- General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. Bug fixes: diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 73cf65d6e7..ecea008fc3 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -80,6 +80,9 @@ G_GITOWNER='$G_GITOWNER'" > /boot/dietpi/.version # Set PATH to expected default to rule out issues due to broken environment, e.g. in combination with "su" or "sudo -E" export LC_ALL='C.UTF-8' LANG='C.UTF-8' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' + # Enforce default umask: https://github.com/MichaIng/DietPi/issues/7022 + umask 0022 + # Set G_PROGRAM_NAME to originating script file (or shell executable) name if it was not set by originating script [[ $G_PROGRAM_NAME ]] || readonly G_PROGRAM_NAME=${0##*/} From 58ef73dbfe27ca78971e70fffbce9db2e101d821 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 22:18:34 +0200 Subject: [PATCH 010/109] v9.4 - DietPi-Software | Install packages we host on our APT repository from there, and move some migration steps to update patches --- .update/patches | 32 ++++++++++++++++++++++++-------- dietpi/dietpi-software | 25 +++++-------------------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.update/patches b/.update/patches index 551bd9e1f3..a92b6c5d5b 100755 --- a/.update/patches +++ b/.update/patches @@ -1231,14 +1231,6 @@ Patch_8_19() # Mopidy: Bullseye suite now available in official APT repo [[ -f '/etc/apt/sources.list.d/mopidy.list' ]] && grep -q buster /etc/apt/sources.list.d/mopidy.list && G_EXEC sed --follow-symlinks -i 's/buster/bullseye/' /etc/apt/sources.list.d/mopidy.list - # GMediaRender - grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[163\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' gmediarender 2> /dev/null)" lt 0.1-dietpi1 && G_WHIP_MSG '[ INFO ] GMediaRender update available -\nAn update to GMediaRender 0.1 is available. -Release notes: https://github.com/hzeller/gmrender-resurrect/releases -\nDo you want to apply the update now? -\nYou can manually apply it any time via: -# dietpi-software reinstall 163' && echo 163 >> /var/tmp/dietpi/dietpi-update_reinstalls - # ympd if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[32\]=2' /boot/dietpi/.installed then @@ -1570,6 +1562,30 @@ Patch_9_4() { # Update DietPi APT list for NanoPi R5C (( $G_HW_MODEL == 76 )) && /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + + if [[ -f '/boot/dietpi/.installed' ]] + then + # GMediaRender + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[163\]=2' /boot/dietpi/.installed && ! dpkg-query -s 'gmediarender' &> /dev/null + then + # Pre-v8.10 + G_DIETPI-NOTIFY 2 'Updateing GMediaRender ...' + [[ -f '/etc/systemd/system/gmediarender.service' ]] && G_EXEC rm /etc/systemd/system/gmediarender.service + [[ -d '/etc/systemd/system/gmediarender.service.d' ]] && grep -Rq '/usr/local/bin/gmediarender' /etc/systemd/system/gmediarender.service.d && G_EXEC rm -R /etc/systemd/system/gmediarender.service.d + getent passwd gmrender > /dev/null && G_EXEC userdel gmrender + getent group gmrender > /dev/null && G_EXEC groupdel gmrender + [[ -f '/usr/local/bin/gmediarender' ]] && G_EXEC rm /usr/local/bin/gmediarender + [[ -d '/usr/local/share/gmediarender' ]] && G_EXEC rm -R /usr/local/share/gmediarender + G_AGI gmediarender + fi + + # Shairport Sync + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[37\]=2' /boot/dietpi/.installed + then + [[ -f '/usr/local/share/man/man7/shairport-sync.7.gz' ]] && G_EXEC rm /usr/local/share/man/man7/shairport-sync.7.gz + [[ -d '/usr/local/share/man/man7' ]] G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man7 + fi + fi } # v6.35 => v7 migration diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 21831cc080..3c3f3c44da 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4895,7 +4895,7 @@ The install script will now exit. After applying one of the the above, rerun die if To_Install 32 ympd # ympd then - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/ympd_$G_HW_ARCH_NAME.deb" + G_AGI ympd G_EXEC systemctl stop ympd fi @@ -8034,7 +8034,7 @@ _EOF_ airplay2= fi - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/shairport-sync${airplay2}_$G_HW_ARCH_NAME.deb" + G_AGI shairport-sync G_EXEC systemctl stop shairport-sync fi @@ -8120,7 +8120,7 @@ _EOF_ if To_Install 36 squeezelite # Squeezelite then - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" + G_AGI squeezelite G_EXEC systemctl stop squeezelite fi @@ -9261,7 +9261,7 @@ _EOF_ if To_Install 183 vaultwarden # vaultwarden then - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" + G_AGI vaultwarden G_EXEC systemctl stop vaultwarden fi @@ -10633,14 +10633,7 @@ _EOF_ if To_Install 163 gmediarender # GMediaRender then - # Pre-v8.10 - [[ -f '/etc/systemd/system/gmediarender.service' ]] && G_EXEC rm /etc/systemd/system/gmediarender.service - [[ -d '/etc/systemd/system/gmediarender.service.d' ]] && grep -Rq '/usr/local/bin/gmediarender' /etc/systemd/system/gmediarender.service.d && G_EXEC rm -R /etc/systemd/system/gmediarender.service.d - getent passwd gmrender > /dev/null && G_EXEC userdel gmrender - getent group gmrender > /dev/null && G_EXEC groupdel gmrender - [[ -f '/usr/local/bin/gmediarender' ]] && G_EXEC rm /usr/local/bin/gmediarender - [[ -d '/usr/local/share/gmediarender' ]] && G_EXEC rm -R /usr/local/share/gmediarender - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/gmediarender_$G_HW_ARCH_NAME.deb" + G_AGI gmediarender G_EXEC systemctl stop gmediarender fi @@ -12816,10 +12809,6 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 37 # Shairport Sync then G_AGP shairport-sync - # Pre-v6.29 - Remove_Service shairport-sync - [[ -f '/lib/systemd/system/shairport-sync.service' ]] && G_EXEC rm /lib/systemd/system/shairport-sync.service - G_EXEC rm -f /usr/local/bin/shairport-sync /usr/local/etc/shairport-sync.conf* /usr/local/share/man/man7/shairport-sync.7.gz fi if To_Uninstall 152 # Avahi-Daemon @@ -13702,10 +13691,6 @@ _EOF_ if To_Uninstall 163 # GMediaRender then G_AGP gmediarender - # Pre-v8.10 - Remove_Service gmediarender gmrender gmrender - [[ -f '/usr/local/bin/gmediarender' ]] && G_EXEC rm /usr/local/bin/gmediarender - [[ -d '/usr/local/share/gmediarender' ]] && G_EXEC rm -R /usr/local/share/gmediarender fi if To_Uninstall 67 # Firefox From 185a08f67ecf41345b29784ab3bb25196cdfaafb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 22:26:10 +0200 Subject: [PATCH 011/109] v9.4 - DietPi-Patches | Syntax --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index a92b6c5d5b..e1e0b951bf 100755 --- a/.update/patches +++ b/.update/patches @@ -1583,7 +1583,7 @@ Patch_9_4() if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[37\]=2' /boot/dietpi/.installed then [[ -f '/usr/local/share/man/man7/shairport-sync.7.gz' ]] && G_EXEC rm /usr/local/share/man/man7/shairport-sync.7.gz - [[ -d '/usr/local/share/man/man7' ]] G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man7 + [[ -d '/usr/local/share/man/man7' ]] && G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man7 fi fi } From 160b8eac7f1894a5d0e1a010da1a47f6525fa555 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 23:02:10 +0200 Subject: [PATCH 012/109] v9.4 - Raspberry Pi | Pro-actively install tiny-initramfs to satisfy the upcoming initramfs dependency for new Raspberry Pi kernel packages: https://github.com/RPi-Distro/repo/issues/358 --- .build/images/dietpi-installer | 7 ++++--- .update/pre-patches | 20 ++++++++++++++++++++ dietpi/func/dietpi-set_software | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 6a9814b96c..c114200700 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1244,8 +1244,6 @@ _EOF_ # ARMv6/7: Add raspi-copies-and-fills local a32bit=() (( $G_HW_ARCH == 3 )) || a32bit=('raspi-copies-and-fills') - # Install our own raspberrypi-sys-mods - G_EXEC curl -sSfO 'https://dietpi.com/downloads/binaries/raspberrypi-sys-mods.deb' if findmnt -M /boot/firmware &> /dev/null then local kernel=() @@ -1270,7 +1268,10 @@ _EOF_ 5) kernel=('linux-image-rpi-2712');; *) { G_DIETPI-NOTIFY 1 "Unexpected hardware model passed: \"$G_HW_MODEL\". Aborting ..."; exit 1; };; esac - G_AGI raspi-firmware "${kernel[@]}" raspi-utils ./raspberrypi-sys-mods.deb raspberrypi-archive-keyring "${a32bit[@]}" + # tiny-initramfs to satisfy dependency: https://github.com/RPi-Distro/repo/issues/358 + G_AGI raspi-firmware + G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware + G_AGI "${kernel[@]}" raspi-utils raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs else G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin ./raspberrypi-sys-mods.deb raspberrypi-archive-keyring "${a32bit[@]}" fi diff --git a/.update/pre-patches b/.update/pre-patches index e650adb30e..47c98d7b0a 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -412,5 +412,25 @@ _EOF_ fi fi +# v9.4 +if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 4 ) )) +then + if (( $G_HW_MDOEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null + then + # Satisfy upcoming initramfs dependency of new kernel packages with slim tiny-initramfs: https://github.com/RPi-Distro/repo/issues/358 + G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware + if ! dpkg-query -s 'initramfs-tools' &> /dev/null + then + G_AGI tiny-initramfs + + elif apt-mark showauto | grep '^initramfs-tools$' + then + G_AGI tiny-initamfs + G_AGP initramfs-tools + # ToDo: Remove existing initramfs images in /boot/initrd-* and /boot/firmware/initramfs* + fi + fi +fi + exit 0 } diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 0c07a26a6c..eeda29c13f 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -771,7 +771,7 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt \n- $optional for ${models[$optional]}" && to_install=("$optional") || to_remove=("$optional") fi - G_AGI "$kernel_package" "${to_install[@]}" raspi-firmware raspi-utils + G_AGI "$kernel_package" "${to_install[@]}" raspi-firmware raspi-utils tiny-initramfs G_AGP "${to_remove[@]}" raspberrypi-kernel raspberrypi-headers-kernel raspberrypi-bootloader libraspberrypi-bin libraspberrypi0 } From 3ca585ad517e9ff8ed136f1fe7c68f1ad1ae81b3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 23:08:34 +0200 Subject: [PATCH 013/109] v9.4 - DietPi-Pre-patches | Typo --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index 47c98d7b0a..c041090ab0 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -415,7 +415,7 @@ fi # v9.4 if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 4 ) )) then - if (( $G_HW_MDOEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null + if (( $G_HW_MODEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null then # Satisfy upcoming initramfs dependency of new kernel packages with slim tiny-initramfs: https://github.com/RPi-Distro/repo/issues/358 G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware From d4aea5244a3ffa2c6ee4cedca0ba6bf88b4c4376 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 19 Apr 2024 15:50:23 +0200 Subject: [PATCH 014/109] v9.4 - DietPi-Installer | Remove manual U-Boot package downloads from our server, as those are now hosted in our APT repository --- .build/images/dietpi-installer | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index c114200700..018f0bdfda 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1041,9 +1041,9 @@ _EOF_ # Update APT lists G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages - local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() dietpi_com=0 + local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in - 10) model='odroidc1' kernel='meson' arch='arm' dietpi_com=1;; + 10) model='odroidc1' kernel='meson' arch='arm';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; 12) model='odroidc2';; 16) model='odroidc4';; @@ -1068,14 +1068,14 @@ _EOF_ 2) model='nanopifire3';; *) model='nanopim3';; esac;; - 63) model='nanopim1' kernel='sunxi' arch='arm' dietpi_com=1;; + 63) model='nanopim1' kernel='sunxi' arch='arm';; 64) model='nanopiair' kernel='sunxi' arch='arm';; 65) kernel='sunxi64' case $HW_VARIANT in 2) model='nanopineo2black';; *) model='nanopineo2';; esac;; - 66) model='nanopim1plus' kernel='sunxi' arch='arm' dietpi_com=1;; + 66) model='nanopim1plus' kernel='sunxi' arch='arm';; 67) model='nanopik1plus' kernel='sunxi64';; 68) kernel='rockchip64' case $HW_VARIANT in @@ -1110,14 +1110,6 @@ _EOF_ 87) model='orangepi3b' kernel='rockchip64' branch='edge';; *) :;; esac - # Download and pre-install U-Boot hosted on dietpi.com where it has not been ported to the Armbian Bookworm repo or has been removed completely - if (( $dietpi_com && $G_DISTRO > 6 || $G_HW_MODEL == 62 )) - then - G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - aPACKAGES_REQUIRED_INSTALL+=("linux-u-boot-$model-$branch") - fi # Odroid C1: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 if (( $G_HW_MODEL == 10 )) From acda521a58474122dc64662e0ed55540dd2e0560 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 19 Apr 2024 16:29:47 +0200 Subject: [PATCH 015/109] v9.4 - Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. Since this implies generic support for flashcp based flashing to /dev/mtd using a different U-Boot image name as well, this re-adds the options for some other SBCs with recent U-Boot packages --- CHANGELOG.txt | 1 + dietpi/dietpi-config | 38 +++++++++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d03de731bc..8dd3bdf604 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v9.4 Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. +- Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. Bug fixes: diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 549a17b264..258900fff6 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1068,11 +1068,17 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_MENU_ARRAY+=('Update RPi EEPROM firmware' ': Install rpi-eeprom APT package') fi - # ROCK 4, ROCK 5B and Orange Pi 5 (Plus): https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 - elif [[ $G_HW_MODEL =~ ^(72|78|80|82)$ ]] + # ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 + elif [[ $G_HW_MODEL =~ ^(72|78|80|82|87)$ ]] then # ROCK 4: Device tree overlay required - (( $G_HW_MODEL == 72 )) || [[ -b '/dev/mtdblock0' && -f '/usr/lib/u-boot/platform_install.sh' ]] && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ': Flash current U-Boot to /dev/mtdblock0') + local spidev='/dev/mtdblock0' + (( $G_HW_MODEL == 72 )) || { + [[ -f '/usr/lib/u-boot/platform_install.sh' ]] && { + { [[ -e '/dev/mtd0' ]] && grep -q '/dev/mtd0' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } || + { [[ -b '/dev/mtdblock0' ]] && grep -q 'rksd_loader.img' /usr/lib/u-boot/platform_install.sh; } + } + } && G_WHIP_MENU_ARRAY+=("Update SPI bootloader' ': Flash current U-Boot to $spidev") # VisionFive 2/Star64: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf elif (( $G_HW_MODEL == 81 || $G_HW_MODEL == 84 )) @@ -1238,17 +1244,27 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr G_CONFIG_INJECT 'overlays=' "overlays=${overlays[*]}" /boot/dietpiEnv.txt G_CONFIG_INJECT 'param_spinor_spi_bus=' 'param_spinor_spi_bus=1' /boot/dietpiEnv.txt REBOOT_REQUIRED=1 - return 0 fi - fi - G_WHIP_YESNO '[ INFO ] SPI bootloader update + + elif [[ $spidev == '/dev/mtd0' ]] + then + G_WHIP_YESNO '[ INFO ] SPI bootloader update +\nThis will flash the U-Boot image of the installed linux-u-boot-* package to the SPI device /dev/mtd0. +\nDo you want to continue?' || return 0 + G_AG_CHECK_INSTALL_PREREQ mtd-utils + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh + write_uboot_platform_mtd + else + G_WHIP_YESNO '[ INFO ] SPI bootloader update \nThis will flash the U-Boot image of the installed linux-u-boot-* package to the SPI device /dev/mtdblock0. \nDo you want to continue?' || return 0 - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - [[ -f $DIR/rkspi_loader.img ]] || { G_WHIP_MSG "[FAILED] SPI U-Boot image missing\n\nThe expected U-Boot image at $DIR/rkspi_loader.img could not be found. Please report this to our GitHub or forum, so we can check back and in case update this dietpi-config option."; return 1; } - # shellcheck disable=SC2154 - G_EXEC_OUTPUT=1 G_EXEC dd if="$DIR/rkspi_loader.img" of=/dev/mtdblock0 oflag=direct conv=notrunc status=progress + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh + [[ -f $DIR/rkspi_loader.img ]] || { G_WHIP_MSG "[FAILED] SPI U-Boot image missing\n\nThe expected U-Boot image at $DIR/rkspi_loader.img could not be found. Please report this to our GitHub or forum, so we can check back and in case update this dietpi-config option."; return 1; } + # shellcheck disable=SC2154 + G_EXEC_OUTPUT=1 G_EXEC dd if="$DIR/rkspi_loader.img" of=/dev/mtdblock0 oflag=direct conv=notrunc status=progress + fi elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then From 7da2b57a78a35bc6db5f0778ca1601faaad7356c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 13:44:24 +0200 Subject: [PATCH 016/109] v9.4 - CI | Armbian: Add support for more branches for RK35xx kernel builds --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 1872a37956..c966c872d2 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -11,7 +11,7 @@ on: branch: description: 'Branch' type: choice - options: [legacy, current, edge] + options: [legacy, current, edge, vendor, vendor-boogie-panthor, collabora] default: current required: true board: From 75e113d25068c991ea744fbaa9edd267f9c55ea7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 14:36:35 +0200 Subject: [PATCH 017/109] v9.4 - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. --- CHANGELOG.txt | 2 ++ dietpi/dietpi-software | 36 +++++++++++++++++------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8dd3bdf604..7d3093b4fb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,8 +5,10 @@ Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. - Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. +- DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: +- DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3c3f3c44da..0d1b149cb1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9953,7 +9953,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.15.0.4361/Prowlarr.master.1.15.0.4361.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.16.2.4435/Prowlarr.master.1.16.2.4435.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -11497,20 +11497,19 @@ _EOF_ if To_Install 191 snapserver # Snapcast Server then - # ARMv6/7/x86_64: Install package from GitHub repo (no Bookworm as package depends on libflac8) - if (( $G_DISTRO < 7 )) && [[ $G_HW_ARCH =~ ^(1|2|10)$ ]] + # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_HW_ARCH == 11 )) then - local arch='armhf' - (( $G_HW_ARCH == 10 )) && arch='amd64' - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.27.0/snapserver_0.27.0-1_$arch.deb" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_$arch.deb\"/{print \$4}")" - - # Else install from Debian repo - else G_AGI snapserver # Enable web UI to align with upstream package G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapserver/snapweb' /etc/snapserver.conf '\[http\]' + else + local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" + G_AGI ./snapserver_*_"$dist.deb" + G_EXEC rm snap*.deb fi G_EXEC systemctl stop snapserver @@ -11520,17 +11519,16 @@ _EOF_ if To_Install 192 snapclient # Snapcast Client then - # ARMv6/7/x86_64: Install package from GitHub repo (no Bookworm as package depends on libflac8) - if (( $G_DISTRO < 7 )) && [[ $G_HW_ARCH =~ ^(1|2|10)$ ]] + # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_HW_ARCH == 11 )) then - local arch='armhf' - (( $G_HW_ARCH == 10 )) && arch='amd64' - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.27.0/snapclient_0.27.0-1_without-pulse_$arch.deb" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_without-pulse_$arch.deb\"$/{print \$4}")" - - # Else install from Debian repo - else G_AGI snapclient + else + local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" + G_AGI ./snapclient_*_without-pulse_"$dist.deb" + G_EXEC rm snap*.deb fi G_EXEC systemctl stop snapclient From 79086e1539e33506682f0e1f0b7383ef9d30179a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:06:05 +0200 Subject: [PATCH 018/109] v9.4 - CI | Armbian: Always rebase onto latest upstream commit --- .github/workflows/armbian.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index c966c872d2..306267b2a7 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -37,6 +37,16 @@ jobs: branch='${{ github.event.inputs.gitbranch }}' [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + if [ "$owner" != 'armbian' ] + then + git remote add upstream https://github.com/armbian/build + git fetch upstream main + git rebase upstream main + elif [ "$branch" != 'main' ] + then + git fetch origin main + git rebase main + fi - name: Build asset run: | cd build From 44177aa6bf7d09be2cfa44770cb3487ae142f441 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:24:08 +0200 Subject: [PATCH 019/109] v9.4 - CI | Armbian: Fix rebase --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 306267b2a7..c0486aa36c 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -37,6 +37,7 @@ jobs: branch='${{ github.event.inputs.gitbranch }}' [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + cd build if [ "$owner" != 'armbian' ] then git remote add upstream https://github.com/armbian/build @@ -49,7 +50,6 @@ jobs: fi - name: Build asset run: | - cd build ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From e6183a652962bef3b9520d15a0188792ed0d0827 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:28:02 +0200 Subject: [PATCH 020/109] v9.4 - CI | Armbian: Fix rebase --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index c0486aa36c..67db92831a 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -42,7 +42,7 @@ jobs: then git remote add upstream https://github.com/armbian/build git fetch upstream main - git rebase upstream main + git rebase upstream/main elif [ "$branch" != 'main' ] then git fetch origin main From 47a24d6330411b2a266cf4b20eb04a5abffce24b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:33:54 +0200 Subject: [PATCH 021/109] v9.4 - CI | Armbian: Allow to skip rebase --- .github/workflows/armbian.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 67db92831a..f184b79247 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -21,6 +21,10 @@ on: description: 'Override Git owner of Armbian repo' gitbranch: description: 'Override Git branch of Armbian repo' + rebase: + description: 'Rebase onto latest armbian/main' + type: boolean + default: true concurrency: group: ${{ github.workflow }}-${{ github.event.inputs.asset }}-${{ github.event.inputs.branch }}-${{ github.event.inputs.board }} cancel-in-progress: true @@ -38,6 +42,7 @@ jobs: [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" cd build + [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : if [ "$owner" != 'armbian' ] then git remote add upstream https://github.com/armbian/build From 1d0d39ff3b8bb0ab9d6b7b33c8e0f0da048342dc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:37:09 +0200 Subject: [PATCH 022/109] v9.4 - CI | Fix skipping rebase --- .github/workflows/armbian.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index f184b79247..6af27719ac 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -42,16 +42,18 @@ jobs: [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" cd build - [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : - if [ "$owner" != 'armbian' ] + if [ '${{ github.event.inputs.rebase }}' == 'true' ] then - git remote add upstream https://github.com/armbian/build - git fetch upstream main - git rebase upstream/main - elif [ "$branch" != 'main' ] - then - git fetch origin main - git rebase main + if [ "$owner" != 'armbian' ] + then + git remote add upstream https://github.com/armbian/build + git fetch upstream main + git rebase upstream/main + elif [ "$branch" != 'main' ] + then + git fetch origin main + git rebase main + fi fi - name: Build asset run: | From b41a92cc9e3f1fe8f950d1cd919fad6f38ffe33d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:39:15 +0200 Subject: [PATCH 023/109] v9.4 - CI | Armbian: ... --- .github/workflows/armbian.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 6af27719ac..e0d848ab41 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -41,22 +41,21 @@ jobs: branch='${{ github.event.inputs.gitbranch }}' [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : cd build - if [ '${{ github.event.inputs.rebase }}' == 'true' ] + if [ "$owner" != 'armbian' ] then - if [ "$owner" != 'armbian' ] - then - git remote add upstream https://github.com/armbian/build - git fetch upstream main - git rebase upstream/main - elif [ "$branch" != 'main' ] - then - git fetch origin main - git rebase main - fi + git remote add upstream https://github.com/armbian/build + git fetch upstream main + git rebase upstream/main + elif [ "$branch" != 'main' ] + then + git fetch origin main + git rebase main fi - name: Build asset run: | + cd build ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From bfd0acc8fab45e7d9783f8356d93ce5ee0fe7720 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 20:45:24 +0200 Subject: [PATCH 024/109] v9.4 - DietPi-Software | Snapcast: Fix package name --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 0d1b149cb1..b1897635f4 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11508,7 +11508,7 @@ _EOF_ local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" - G_AGI ./snapserver_*_"$dist.deb" + G_AGI ./snapserver_*_"$arch.deb" G_EXEC rm snap*.deb fi G_EXEC systemctl stop snapserver @@ -11527,7 +11527,7 @@ _EOF_ local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" - G_AGI ./snapclient_*_without-pulse_"$dist.deb" + G_AGI ./snapclient_*_without-pulse_"$arch.deb" G_EXEC rm snap*.deb fi G_EXEC systemctl stop snapclient From 3da35f5996b093bc9cbdfcc603ab38a35691e4a7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Apr 2024 15:46:27 +0200 Subject: [PATCH 025/109] v9.4 - DietPi-Software | Readarr: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b1897635f4..ad7d1f3829 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10028,7 +10028,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.23.2506/Readarr.develop.0.3.23.2506.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.24.2510/Readarr.develop.0.3.24.2510.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From 1004d606a9c3ced7215ec28cc7eba25e32c72b1b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Apr 2024 16:44:51 +0200 Subject: [PATCH 026/109] v9.4 - DietPi-Build/Installer | Add support for ROCK 4C Plus, since the recent ROCK 4B bootloader does not select the correct device tree automatically anymore, and cleanup method for installing self-hosted kernel/bootloader builds. --- .build/images/dietpi-build | 1 + .build/images/dietpi-installer | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 2464c916d4..d70376fb2a 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -122,6 +122,7 @@ case $HW_MODEL in 70) iname='SparkySBC' HW_ARCH=2 partition_start=8 boot_size=48 root_size=712 boot_fstype='fat16';; '72.1') iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=1008;; '72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1008;; + '72.3') iname='ROCK4CPlus' HW_ARCH=3 partition_start=16 root_size=1008;; 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1008;; 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1020;; 75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;; diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 018f0bdfda..6c37f6365b 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -412,6 +412,7 @@ _EOF_ '79.3' ': NanoPC T6' '72.1' ': ROCK 4 (all other variants)' '72.2' ': ROCK 4 SE' + '72.3' ': ROCK 4C Plus' '73' ': ROCK Pi S' '74' ': Radxa Zero' '77' ': ROCK 3A' @@ -1041,7 +1042,7 @@ _EOF_ # Update APT lists G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages - local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() + local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() dietpi_uboot=0 dietpi_kernel=0 case $G_HW_MODEL in 10) model='odroidc1' kernel='meson' arch='arm';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; @@ -1086,6 +1087,7 @@ _EOF_ 72) kernel='rockchip64' case $HW_VARIANT in 2) model='rock-4se';; + 3) model='rockpi-4cplus';; *) model='rockpi-4b';; esac;; 73) model='rockpi-s' kernel='rockchip64';; @@ -1136,22 +1138,23 @@ _EOF_ fi # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression [[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd') - # - Download and pre-install a more recent armbian-firmware package from our server - #G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - #G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - #G_EXEC rm package.deb G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf - # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version - if (( $G_HW_MODEL == 83 )) + # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available + if (( $dietpi_kernel )) then G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - local uboot=() - #(( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 1 )) && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb"; uboot=('package4.deb'); } - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package1.deb package2.deb package3.deb "${uboot[@]}" - G_EXEC rm package1.deb package2.deb package3.deb "${uboot[@]}" + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[1-3].deb + G_EXEC rm package[1-3].deb + fi + # Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available + if (( $dietpi_uboot )) + then + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb" + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb + G_EXEC rm package.deb fi # Orange Pi Zero 3 1.5G RAM variant: Install original Orange Pi bootloader if (( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 2 )) From 977a3b4d80977208a06ca1ec44fa64cfdaa91890 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Apr 2024 17:19:37 +0200 Subject: [PATCH 027/109] v9.4 - CHANGELOG | Add entry for new ROCK 4C Plus image --- CHANGELOG.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7d3093b4fb..296862db51 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,9 @@ v9.4 (2024-05-12) +New images: +- ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 + Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. From b05711fcb73db36e2a7c5fdb7b8beb96d24ef3d6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Apr 2024 21:21:10 +0200 Subject: [PATCH 028/109] v9.4 - CI | Use GITHUB_REF_NAME instead of scraping from GITHUB_REF --- .github/workflows/dietpi-build.yml | 2 +- .github/workflows/raspberrypi-sys-mods.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index cb92edee03..d8f98dc353 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -130,4 +130,4 @@ jobs: ${{ secrets.GPG_KEY }} _EOF_ - name: Run DietPi-Build - run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/images/dietpi-build")" 'DietPi-Build' ${{ matrix.buildargs }} --sign '${{ secrets.GPG_PASS }}' + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/dietpi-build")" 'DietPi-Build' ${{ matrix.buildargs }} --sign '${{ secrets.GPG_PASS }}' diff --git a/.github/workflows/raspberrypi-sys-mods.yml b/.github/workflows/raspberrypi-sys-mods.yml index ea4e845776..675e3af75e 100644 --- a/.github/workflows/raspberrypi-sys-mods.yml +++ b/.github/workflows/raspberrypi-sys-mods.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Build - run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/raspberrypi-sys-mods/build.bash")" + run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/raspberrypi-sys-mods/build.bash")" - name: Upload run: | # SSH server and client keys From 234cc689fa8f4c7736300661b01204373abc9824 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Apr 2024 23:41:42 +0200 Subject: [PATCH 029/109] v9.4 - DietPi-Software | Kavita: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ad7d1f3829..e2f8231e80 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6302,7 +6302,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.0/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.1/kavita-linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC chmod +x Kavita/Kavita From 079710ad0f58d5bf7682c5dc71b3de109dd07873 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 23 Apr 2024 13:15:15 +0200 Subject: [PATCH 030/109] v9.4 (#7033) - DietPi-Imager | Skip moving backup partition table before touching the image. parted/sfdisk may throw warnings, but the step can fail if the last partition reaches the end of the image, e.g. if the file was cut right after the last partition, ignoring the backup table. Additionally, obtain the size needed for the GPT backup correctly by the first usabe LBA/sector, instead of using the 34 sectors default GPT size. fdisk/sfdisk use 2048 by default, while parted defaults to the actual 34 sectors the GPT truly uses. --- .build/images/dietpi-imager | 18 +++++++++++------- CHANGELOG.txt | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 47412ad2e1..fdc61988b5 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -336,10 +336,7 @@ # Move GPT backup partition table to end of drive elif [[ $PART_TABLE_TYPE == 'gpt' ]] then - G_DIETPI-NOTIFY 2 'GPT partition table detected, moving GPT backup partition table to end of drive...' - G_AG_CHECK_INSTALL_PREREQ gdisk - G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$FP_SOURCE" - G_SLEEP 0.5 # Give the root filesystem a little time to be detected + G_DIETPI-NOTIFY 2 'GPT partition table detected' else Error_Exit "Unknown partition table type ($PART_TABLE_TYPE), aborting..." fi @@ -512,9 +509,16 @@ # - WARNING: this assumes that the partitions in the table are in order (which we do in other places as well) local last_part_end=$(sfdisk -qlo End "$FP_SOURCE" | tail -1) # 512 byte sectors IMAGE_SIZE=$last_part_end - # Add 34 sectors for GPT backup partition table and 1 sector for MBR - # shellcheck disable=SC2015 - [[ $PART_TABLE_TYPE == 'gpt' ]] && ((IMAGE_SIZE+=34)) || ((IMAGE_SIZE++)) + # Add space for GPT backup partition table, or 1 sector for MBR + if [[ $PART_TABLE_TYPE == 'gpt' ]] + then + # Obtain first usable LBA, which defines the size of the GPT backup, else use 34 sectors as default: https://github.com/MichaIng/DietPi/issues/7024 + local gpt_size=$(sgdisk -p "$FP_SOURCE" 2>&1 | mawk -F[\ ,] '/^First usable sector/{print $5}') + # shellcheck disable=SC2015 + (( $gpt_size )) && ((IMAGE_SIZE+=$gpt_size)) || ((IMAGE_SIZE+=34)) + else + ((IMAGE_SIZE++)) + fi ((IMAGE_SIZE*=512)) # 512 byte sectors => bytes # RPi: Move configs to boot FAT partition to allow easier edit from Windows/macOS diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 296862db51..2a51cfa2f8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Enhancements: - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: +- DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME From f372c8ac3cb26d486eaf5fe50ed64628549ab02b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 14:34:04 +0200 Subject: [PATCH 031/109] v9.4 - CI | DietPi-Software test: Temporarily remove the Microsoft APT repository, which currently fails to fetch - DietPi-Software | Komga: Update fallback URL - DietPi-Set_hardware | Remove pre-v6.10 step when disabling the Waveshare32 LCD, which just removes a comment line, added in ancient DietPi versions when enabling it --- .github/workflows/dietpi-software.bash | 2 ++ dietpi/dietpi-software | 2 +- dietpi/func/dietpi-set_hardware | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index f10f4e2687..ae6abf853b 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -260,6 +260,8 @@ done ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') (( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support') +# Temporary workaround for failing Microsoft repo fetch: https://github.com/microsoft/linux-package-repositories/issues/130 +G_EXEC rm /etc/apt/sources.list.d/microsoft-prod.list G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" ########################################## diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e2f8231e80..84593d594e 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7434,7 +7434,7 @@ _EOF_ then Download_Install 'https://github.com/gotson/komga/releases/download/v0.165.0/komga-0.165.0.jar' /mnt/dietpi_userdata/komga/komga.jar else - local fallback_url='https://github.com/gotson/komga/releases/download/1.11.0/komga-1.11.0.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.11.1/komga-1.11.1.jar' Download_Install "$(curl -sSfL 'https://api.github.com/repos/gotson/komga/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/komga-[^"\/]*\.jar"$/{print $4}')" /mnt/dietpi_userdata/komga/komga.jar fi diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 0108f1d727..e5b3747fd0 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -803,7 +803,6 @@ _EOF_ [[ -f '/boot/overlays/waveshare32b.dtbo' ]] && G_EXEC rm /boot/overlays/waveshare32b.dtbo G_EXEC sed --follow-symlinks -i 's/ fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo//' /boot/cmdline.txt - G_EXEC sed --follow-symlinks -i '/Waveshare 32 LCD/d' /boot/config.txt G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*dtoverlay=waveshare32b/d' /boot/config.txt G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*dtoverlay=ads7846,cs=1,penirq=17/d' /boot/config.txt G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1/d' /boot/config.txt From 2080acdc853e2f30863d80ed06ad7e9d0e0bdb33 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 16:00:54 +0200 Subject: [PATCH 032/109] v9.4 - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. - CI | DietPi-Software test: Remove workaround for fixed Microsoft repo issue --- .github/workflows/dietpi-software.bash | 2 -- CHANGELOG.txt | 1 + dietpi/dietpi-software | 17 +++++++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index ae6abf853b..f10f4e2687 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -260,8 +260,6 @@ done ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') (( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support') -# Temporary workaround for failing Microsoft repo fetch: https://github.com/microsoft/linux-package-repositories/issues/130 -G_EXEC rm /etc/apt/sources.list.d/microsoft-prod.list G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" ########################################## diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2a51cfa2f8..1ded7a0554 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -13,6 +13,7 @@ Enhancements: Bug fixes: - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. +- DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 84593d594e..463f75f130 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10143,14 +10143,19 @@ _EOF_ if To_Install 153 octoprint # OctoPrint then # Deps - # - RISC-V and ARMv6/7 Bookworm: gcc and libffi-dev for cffi - if (( $G_HW_ARCH == 11 || ( $G_HW_ARCH < 3 && $G_DISTRO > 6 ) )) + # - RISC-V: gcc and libffi-dev for cffi, Rust for maturin + if (( $G_HW_ARCH == 11 )) then - G_AGI gcc libffi-dev + aDEPS=('gcc' 'libffi-dev') + G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh + G_EXEC chmod +x rustup-init.sh + G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal + G_EXEC rm rustup-init.sh + export PATH="/root/.cargo/bin:$PATH" - # - ARMv8:: gcc for netifaces and psutil - # - Bookworm: gcc for netifaces - elif (( $G_HW_ARCH == 3 || $G_DISTRO > 6 )) + # - ARMv8: gcc for psutil + # - ARMv6/7: gcc for regex: https://github.com/piwheels/packages/issues/442 + elif (( $G_HW_ARCH == 3 || ( $G_HW_ARCH < 3 && $G_DISTRO == 6 ) )) then G_AGI gcc fi From 7a851cc180f5f6c38e82c1d1e7fe9c4e14a6d4dc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 16:02:28 +0200 Subject: [PATCH 033/109] v9.4 - DietPi-Software | Prometheus Node Exporter: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 463f75f130..88dac89ab5 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3332,7 +3332,7 @@ _EOF_ esac # Download binary - local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-$arch.tar.gz" + local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.0/node_exporter-1.8.0.linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/prometheus/node_exporter/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/node_exporter-.*\.linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mkdir -p /opt/node_exporter G_EXEC cp --preserve=mode node_exporter*/node_exporter /opt/node_exporter/ From f0adb283a401b115f7b8ce5f1029ced12e0a0fb4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 16:51:44 +0200 Subject: [PATCH 034/109] v9.4 - DietPi-Software | OctoPrint: The Rust compiler, required for RISC-V, needs to be available for the "octoprint" user - DietPi-Software | HTPC Manager: Skip obsolete dependencies for installs on ARMv6/7 Bookworm/Trixie systems --- dietpi/dietpi-software | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 88dac89ab5..57832afe23 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10085,22 +10085,18 @@ _EOF_ # APT deps case $G_HW_ARCH in - [12]|11) - if (( $G_DISTRO < 7 )) - then - G_AGI libtiff5 libopenjp2-7 libxcb1 # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff5 pulls libjpeg62-turbo) - else - # Bookworm: Most wheels need to be compiled: gcc and libffi-dev for cffi, libssl-dev and Rust for cryptography and bcrypt, make for PyNaCl, libjpeg62-turbo-dev for Pillow, pkg-config for cryptography - G_AGI gcc libffi-dev libssl-dev make libjpeg62-turbo-dev pkg-config - G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh - G_EXEC chmod +x rustup-init.sh - # RPi with 64-bit kernel on 32-bit image: Enforce 32-bit toolchain: https://github.com/MichaIng/DietPi/issues/6306 - G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} - G_EXEC rm rustup-init.sh - export PATH="/root/.cargo/bin:$PATH" - fi - ;; + 1|2) G_AGI libtiff5 libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff5 pulls libjpeg62-turbo) 3) G_AGI gcc;; # gcc for psutil + 11) + # gcc and libffi-dev for cffi, libssl-dev and Rust for cryptography and bcrypt, make for PyNaCl, libjpeg62-turbo-dev for Pillow, pkg-config for cryptography + G_AGI gcc libffi-dev libssl-dev make libjpeg62-turbo-dev pkg-config + G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh + G_EXEC chmod +x rustup-init.sh + # RPi with 64-bit kernel on 32-bit image: Enforce 32-bit toolchain: https://github.com/MichaIng/DietPi/issues/6306 + G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} + G_EXEC rm rustup-init.sh + export PATH="/root/.cargo/bin:$PATH" + ;; *) :;; esac @@ -10142,6 +10138,11 @@ _EOF_ if To_Install 153 octoprint # OctoPrint then + # Pre-create user and its home directory to allow user-level (Rust and) Python instance + Create_User -G dialout,tty,video -d /mnt/dietpi_userdata/octoprint octoprint + G_EXEC mkdir -p /mnt/dietpi_userdata/octoprint + G_EXEC chown -R octoprint:octoprint /mnt/dietpi_userdata/octoprint + # Deps # - RISC-V: gcc and libffi-dev for cffi, Rust for maturin if (( $G_HW_ARCH == 11 )) @@ -10149,7 +10150,7 @@ _EOF_ aDEPS=('gcc' 'libffi-dev') G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh G_EXEC chmod +x rustup-init.sh - G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal + G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint ./rustup-init.sh -y --profile minimal G_EXEC rm rustup-init.sh export PATH="/root/.cargo/bin:$PATH" @@ -10160,11 +10161,6 @@ _EOF_ G_AGI gcc fi - # Pre-create user and its home directory to allow user-level Python instance - Create_User -G dialout,tty,video -d /mnt/dietpi_userdata/octoprint octoprint - G_EXEC mkdir -p /mnt/dietpi_userdata/octoprint - G_EXEC chown -R octoprint:octoprint /mnt/dietpi_userdata/octoprint - # Clear pip cache in case it got somehow created [[ -d '/mnt/dietpi_userdata/octoprint/.cache' ]] && G_EXEC rm -R /mnt/dietpi_userdata/octoprint/.cache From f50aba81dd60c2632e2a280e7bf6dd9ecb1ef9f1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 17:47:22 +0200 Subject: [PATCH 035/109] v9.4 - DietPi-Software | OctoPrint: Pass PATH correctly for RISC-V PATH --- dietpi/dietpi-software | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 57832afe23..29ed6c25c1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10145,6 +10145,7 @@ _EOF_ # Deps # - RISC-V: gcc and libffi-dev for cffi, Rust for maturin + local aPATH=() if (( $G_HW_ARCH == 11 )) then aDEPS=('gcc' 'libffi-dev') @@ -10152,7 +10153,7 @@ _EOF_ G_EXEC chmod +x rustup-init.sh G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint ./rustup-init.sh -y --profile minimal G_EXEC rm rustup-init.sh - export PATH="/root/.cargo/bin:$PATH" + aPATH=("PATH='/mnt/dietpi_userdata/octoprint/.cargo/bin:$PATH'") # - ARMv8: gcc for psutil # - ARMv6/7: gcc for regex: https://github.com/piwheels/packages/issues/442 @@ -10165,7 +10166,7 @@ _EOF_ [[ -d '/mnt/dietpi_userdata/octoprint/.cache' ]] && G_EXEC rm -R /mnt/dietpi_userdata/octoprint/.cache # Install OctoPrint - G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint pip3 install -U --user --no-warn-script-location octoprint + G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint "${aPATH[@]}" pip3 install -U --user --no-warn-script-location octoprint # Service: https://github.com/OctoPrint/OctoPrint/blob/master/scripts/octoprint.service cat << '_EOF_' > /etc/systemd/system/octoprint.service From ea4959739e35c85178d1a9a827799736836a285e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 17:50:02 +0200 Subject: [PATCH 036/109] v9.4 - CI | DietPi-Software test: Allow service in emulated container more time to startup --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index f10f4e2687..46575d232f 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -181,7 +181,7 @@ Process_Software() 152) aSERVICES[i]='avahi-daemon' aUDP[i]='5353';; 153) aSERVICES[i]='octoprint' aTCP[i]='5001'; (( $arch == 10 )) || aDELAY[i]=60;; 154) aSERVICES[i]='roonserver';; # Listens on a variety of different port ranges - 155) aSERVICES[i]='htpc-manager' aTCP[i]='8085';; + 155) aSERVICES[i]='htpc-manager' aTCP[i]='8085'; (( $arch == 10 )) || aDELAY[i]=30;; 157) aSERVICES[i]='home-assistant' aTCP[i]='8123'; (( $arch == 10 )) && aDELAY[i]=60 || aDELAY[i]=900;; 158) aSERVICES[i]='minio' aTCP[i]='9001 9004';; 161) aSERVICES[i]='bdd' aTCP[i]='80 443';; From 9e872115cdbb47d539534396e308f40baf0a1ea9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 18:15:22 +0200 Subject: [PATCH 037/109] v9.4 - DietPi-Software | HTPC Manager: Fix libtiff version for Bookworm/Trixie - DietPi-Software | Synapse: Skip obsolete dependencies for installs on ARMv6/7 Bookworm/Trixie systems --- dietpi/dietpi-software | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 29ed6c25c1..f7908e1554 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3881,20 +3881,20 @@ _EOF_ then # APT deps for Synapse with PostgreSQL case $G_HW_ARCH in - [12]|11) - if (( $G_DISTRO < 7 )) - then - G_AGI libtiff5 libopenjp2-7 libxcb1 # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff5 pulls libjpeg62-turbo) - else - # Bookworm: Most wheels need to be compiled: gcc and libffi-dev for cffi, Rust for cryptography and matrix-synapse, libpq-dev for psycopg2, make for PyNaCl, libjpeg62-turbo-dev for Pillow, libssl-dev and pkg-config for cryptography - G_AGI gcc libffi-dev libpq-dev make libjpeg62-turbo-dev libssl-dev pkg-config - G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh - G_EXEC chmod +x rustup-init.sh - # RPi with 64-bit kernel on 32-bit image: Enforce 32-bit toolchain: https://github.com/MichaIng/DietPi/issues/6306 - G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} - G_EXEC rm rustup-init.sh - export PATH="/root/.cargo/bin:$PATH" - fi + 1|2) + local libtiff='libtiff6' + (( $G_DISTRO < 7 )) && libtiff='libtiff5' + G_AGI "$libtiff" libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) + ;; + 11) + # gcc and libffi-dev for cffi, Rust for cryptography and matrix-synapse, libpq-dev for psycopg2, make for PyNaCl, libjpeg62-turbo-dev for Pillow, libssl-dev and pkg-config for cryptography + G_AGI gcc libffi-dev libpq-dev make libjpeg62-turbo-dev libssl-dev pkg-config + G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh + G_EXEC chmod +x rustup-init.sh + # RPi with 64-bit kernel on 32-bit image: Enforce 32-bit toolchain: https://github.com/MichaIng/DietPi/issues/6306 + G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} + G_EXEC rm rustup-init.sh + export PATH="/root/.cargo/bin:$PATH" ;; *) G_AGI gcc libpq-dev;; # ARMv8/x86_64: psycopg2 needs to be compiled esac @@ -10085,7 +10085,11 @@ _EOF_ # APT deps case $G_HW_ARCH in - 1|2) G_AGI libtiff5 libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff5 pulls libjpeg62-turbo) + 1|2) + local libtiff='libtiff6' + (( $G_DISTRO < 7 )) && libtiff='libtiff5' + G_AGI "$libtiff" libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) + ;; 3) G_AGI gcc;; # gcc for psutil 11) # gcc and libffi-dev for cffi, libssl-dev and Rust for cryptography and bcrypt, make for PyNaCl, libjpeg62-turbo-dev for Pillow, pkg-config for cryptography From 6bfafb7b8b8efb323e1a48a9701e7cefe758de77 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 18:25:57 +0200 Subject: [PATCH 038/109] v9.4 - DietPi-Software | Syntax --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f7908e1554..47effc1e32 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3884,7 +3884,7 @@ _EOF_ 1|2) local libtiff='libtiff6' (( $G_DISTRO < 7 )) && libtiff='libtiff5' - G_AGI "$libtiff" libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) + G_AGI "$libtiff" libopenjp2-7 libxcb1 # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) ;; 11) # gcc and libffi-dev for cffi, Rust for cryptography and matrix-synapse, libpq-dev for psycopg2, make for PyNaCl, libjpeg62-turbo-dev for Pillow, libssl-dev and pkg-config for cryptography @@ -10088,7 +10088,7 @@ _EOF_ 1|2) local libtiff='libtiff6' (( $G_DISTRO < 7 )) && libtiff='libtiff5' - G_AGI "$libtiff" libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) + G_AGI "$libtiff" libopenjp2-7 libxcb1 # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) ;; 3) G_AGI gcc;; # gcc for psutil 11) From 921bdb18e64a9728d74a41fe5b642fe1a4c7d210 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 20:51:05 +0200 Subject: [PATCH 039/109] v9.4 - CI | DietPi-Software test: Add more service startup time for HTPC Manager on ARMv8 Trixie systems, needed for whatever reason --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 46575d232f..d735537fa5 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -181,7 +181,7 @@ Process_Software() 152) aSERVICES[i]='avahi-daemon' aUDP[i]='5353';; 153) aSERVICES[i]='octoprint' aTCP[i]='5001'; (( $arch == 10 )) || aDELAY[i]=60;; 154) aSERVICES[i]='roonserver';; # Listens on a variety of different port ranges - 155) aSERVICES[i]='htpc-manager' aTCP[i]='8085'; (( $arch == 10 )) || aDELAY[i]=30;; + 155) aSERVICES[i]='htpc-manager' aTCP[i]='8085'; (( $arch == 10 )) || aDELAY[i]=30; [[ $arch == 3 && $DISTRO == 'trixie' ]] && aDELAY[i]=60;; 157) aSERVICES[i]='home-assistant' aTCP[i]='8123'; (( $arch == 10 )) && aDELAY[i]=60 || aDELAY[i]=900;; 158) aSERVICES[i]='minio' aTCP[i]='9001 9004';; 161) aSERVICES[i]='bdd' aTCP[i]='80 443';; From a509085445ba5d4db3e9da16846bc6b713aaa754 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 11:28:16 +0200 Subject: [PATCH 040/109] v9.4 - DietPi-Software | Bazarr/OctoPrint: Remove obsolete dependencies --- dietpi/dietpi-software | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 47effc1e32..3a64d1c49b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9666,8 +9666,7 @@ _EOF_ # APT deps if (( $G_HW_ARCH < 3 )) then - aDEPS=('g++' 'libopenblas-dev' 'pkg-config') # g++, libopenblas-dev and pkg-config for numpy until wheels have been built on piwheels. Afterwards install libopenblas0 runtime library instead: https://piwheels.org/project/numpy/ - (( $G_DISTRO < 7 )) || aDEPS+=('libxslt1-dev') # Bookworm: libxslt1-dev and gcc for lxml until wheels have been built on piwheels: https://piwheels.org/project/lxml/ + aDEPS=('libopenblas0-pthread') # libopenblas0-pthread runtime library for piwheels wheel: https://piwheels.org/project/numpy/ (( $G_HW_ARCH == 1 )) && aDEPS+=('unar') # ARMv6 does not support unrar-nonfree and Bazarr does not support unrar-free, so we need to use "unar": https://github.com/morpheus65535/bazarr/issues/2172 fi @@ -10160,8 +10159,7 @@ _EOF_ aPATH=("PATH='/mnt/dietpi_userdata/octoprint/.cargo/bin:$PATH'") # - ARMv8: gcc for psutil - # - ARMv6/7: gcc for regex: https://github.com/piwheels/packages/issues/442 - elif (( $G_HW_ARCH == 3 || ( $G_HW_ARCH < 3 && $G_DISTRO == 6 ) )) + elif (( $G_HW_ARCH == 3 )) then G_AGI gcc fi From 01a53c2d74d04f321b870a66eb45d7281c46efc7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 14:01:31 +0200 Subject: [PATCH 041/109] v9.4 - CI | DietPi-Build: Add ROCK 4C Plus to "all" builds --- .github/workflows/dietpi-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index d8f98dc353..0307a374b4 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -70,6 +70,7 @@ jobs: '"-m 70 -d 6 -e all", '\ '"-m 72.1 -d 6", "-m 72.1 -d 7", "-m 72.1 -d 8", '\ '"-m 72.2 -d 6", "-m 72.2 -d 7", "-m 72.2 -d 8", '\ + '"-m 72.3 -d 6", "-m 72.3 -d 7", "-m 72.3 -d 8", '\ '"-m 73 -d 6", "-m 73 -d 7", "-m 73 -d 8", '\ '"-m 74 -d 6", "-m 74 -d 7", "-m 74 -d 8", '\ '"-m 75 -a 1 -d 6", "-m 75 -a 2 -d 6", "-m 75 -a 3 -d 6", "-m 75 -a 10 -d 6", '\ From 8a404f786e88fa599e8f1f4ef08ad8cb547ccae1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 18:14:56 +0200 Subject: [PATCH 042/109] v9.4 - DietPi-Globals | Apply Armbian APT fetch failure workaround for APT updates as well (instead of installs/upgrades only) --- dietpi/func/dietpi-globals | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index ecea008fc3..314e3c3089 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1572,6 +1572,9 @@ Press any key to continue...' # Clean cache before every update, which can corrupt and gets fully rewritten anyway G_EXEC_PRE_FUNC(){ apt-get clean; } + # Workaround for Armbian mirrors being out of sync regularly or throwing 5xx errors + [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC_POST_FUNC(){ [[ $exit_code != 0 ]] && grep -q '^E: Failed to fetch .*armbian' "$fp_log" && G_EXEC_RETRIES=2 && unset -f G_EXEC_POST_FUNC; } + G_EXEC_DESC='\e[0mAPT update' G_EXEC_OUTPUT=1 G_EXEC_OUTPUT_COL='\e[90m' G_EXEC apt-get -y -eany update local exit_code=$? From c791d2a5ce0364b5a7e2369db0414a9cb084563f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 18:23:36 +0200 Subject: [PATCH 043/109] v9.4 - CI | DietPi-Build: Test mmdebstrap, which should be faster, includes security and update suites automatically, and hopefully fixes current and regularly happening issues with debootstrap and Debian testing/unstable --- .build/images/dietpi-build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index d70376fb2a..2286f66a05 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -217,7 +217,7 @@ fi # Virtual machine disk conversion [[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils') -G_AG_CHECK_INSTALL_PREREQ parted debootstrap dbus systemd-container xz-utils "${apackages[@]}" +G_AG_CHECK_INSTALL_PREREQ parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}" # Bootstrap archive keyring if missing if [[ ! -f $keyring ]] @@ -379,8 +379,8 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' -G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } -G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +#G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } +G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## From ae7fe5201e30e4c6a7cb0cbfa7fb8ef2eacd7f5e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 18:24:56 +0200 Subject: [PATCH 044/109] v9.4 - DietPi-Installer | Fix raspberrypi-sys-mods package install from our repo --- .build/images/dietpi-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 6c37f6365b..283003fc9f 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1268,7 +1268,7 @@ _EOF_ G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware G_AGI "${kernel[@]}" raspi-utils raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs else - G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin ./raspberrypi-sys-mods.deb raspberrypi-archive-keyring "${a32bit[@]}" + G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" fi G_EXEC rm raspberrypi-sys-mods.deb From 9088c1adf4121edcfe9d8b1d81aed0e14fb1bf29 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 18:53:45 +0200 Subject: [PATCH 045/109] v9.4 - DietPi-Build | Try to allow non-empty target dir for mmdebstrap --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 2286f66a05..397930aad0 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -380,7 +380,7 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' #G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } -G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## From b544a700492b1c7b528728f1f5bac8fc809dff5c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 20:22:40 +0200 Subject: [PATCH 046/109] v9.4 - DietPi-Software | NZBGet: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3a64d1c49b..fb19a7f77c 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9872,7 +9872,7 @@ _EOF_ local reinstall=0 [[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]] && reinstall=1 - local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v22.0/nzbget-22.0-bin-linux.run' + local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.0/nzbget-24.0-bin-linux.run' Download_Install "$(curl -sSfL 'https://api.github.com/repos/nzbgetcom/nzbget/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/nzbget-[^"/]*-bin-linux.run"$/{print $4}')" nzbget.run G_EXEC mkdir -p /mnt/dietpi_userdata/nzbget G_EXEC_OUTPUT=1 G_EXEC dash nzbget.run --destdir /mnt/dietpi_userdata/nzbget From f806fe8381ee296365aedc6f03850d955eabfe31 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 21:16:35 +0200 Subject: [PATCH 047/109] v9.4 - DietPi-Imager | Remove obsolete step --- .build/images/dietpi-installer | 1 - 1 file changed, 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 283003fc9f..c2656159b9 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1270,7 +1270,6 @@ _EOF_ else G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" fi - G_EXEC rm raspberrypi-sys-mods.deb # https://github.com/RPi-Distro/raspberrypi-sys-mods/pull/60 [[ -f '/etc/apt/trusted.gpg.d/microsoft.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/microsoft.gpg From 18ca04a513a4d637064b32e18e8041b7afa323a2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 22:28:51 +0200 Subject: [PATCH 048/109] v9.4 - DietPi-Build | Workaround for failing build on ARMv6/7 Trixie systems due to conflicting libssl3 and libssl3t64 dependencies --- .build/images/dietpi-build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 397930aad0..2164d2ebec 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -379,6 +379,8 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' +# Workaround for failing build on ARMv6/7 Trixie systems due to conflicting libssl3 and libssl3t64 dependencies +(( $HW_ARCH < 3 && $DISTRO > 7 )) && packages+=',libssl3t64' #G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log From 90d6c6fd5e5ef0c1f1c0560a529227a6686573a3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 23:08:43 +0200 Subject: [PATCH 049/109] v9.4 - DietPi-Installer | Install firmware package from our server prior to its APT install, to avoid a doubled install/upgrade step --- .build/images/dietpi-installer | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index c2656159b9..ab610487b8 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1137,6 +1137,12 @@ blacklist rockchip_vdec _EOF_ fi # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression + if (( $dietpi_kernel )) + then + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb + G_EXEC rm package.deb + fi [[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd') G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf @@ -1145,9 +1151,8 @@ _EOF_ then G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" - G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[1-3].deb - G_EXEC rm package[1-3].deb + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[12].deb + G_EXEC rm package[12].deb fi # Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available if (( $dietpi_uboot )) From 16a75a47bee94ba5604ae74fa405ffb7c4181ef3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 23:46:30 +0200 Subject: [PATCH 050/109] v9.4 - DietPi-Imager | dietpiEnv.txt cannot exist on the rootfs, if it is not the bootfs --- .build/images/dietpi-imager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index fdc61988b5..176c6021d4 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -529,7 +529,7 @@ G_EXEC mount "${FP_ROOT_DEV::-1}1" "$fat_mountpoint" G_EXEC mount "$FP_ROOT_DEV" "$root_mountpoint" G_DIETPI-NOTIFY 2 'Copying dietpi.txt and other config files to the DIETPISETUP partition' - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' do [[ -f $root_mountpoint/boot/$f ]] && G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" done From 3710fdd56a3d456dd8980f9d56535db2fbe30c7b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 26 Apr 2024 13:44:04 +0200 Subject: [PATCH 051/109] v9.4 - DietPi-Build | Raise some image sizes required for Trixie and temporarily skip Trixie AlloGUI builds: The netdata package is currently not available (only on Raspbian, not Debian) and systemd-logind fails to start within the container as of a new change/bug, to investigate. --- .build/images/dietpi-build | 23 ++++++++++++----------- .build/images/dietpi-imager | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 2164d2ebec..4bba54f1ec 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -83,9 +83,9 @@ case $HW_MODEL in 5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=895;; 10) iname='OdroidC1' HW_ARCH=2 partition_start=4 boot_size=128 root_size=700 boot_fstype='fat16';; 11) iname='OdroidXU4' HW_ARCH=2 partition_start=4 root_size=764;; - 12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1020;; - 15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=1020;; - 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1020;; + 12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1148;; + 15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=1148;; + 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1148;; 20) iname='VM' HW_ARCH=${HW_ARCH:-10} VMTYPE=${VMTYPE:-raw};; 21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1663;; 40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=892;; @@ -100,7 +100,7 @@ case $HW_MODEL in '49.2') iname='Quartz64B' HW_ARCH=3 partition_start=16 root_size=752;; '49.3') iname='SOQuartz' HW_ARCH=3 partition_start=16 root_size=752;; 52) iname='ASUSTB' HW_ARCH=2 partition_start=4 root_size=764;; - 54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1020;; + 54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1148;; 55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=1008;; 56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1008;; 57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=892;; @@ -112,10 +112,10 @@ case $HW_MODEL in '62.2') iname='NanoPiFire3' HW_ARCH=3 partition_start=4 root_size=700;; 63) iname='NanoPiM1' HW_ARCH=2 partition_start=4 root_size=764;; 64) iname='NanoPiNEOAir' HW_ARCH=2 partition_start=4 root_size=764;; - '65.1') iname='NanoPiNEO2' HW_ARCH=3 partition_start=4 root_size=892;; - '65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=892;; + '65.1') iname='NanoPiNEO2' HW_ARCH=3 partition_start=4 root_size=1020;; + '65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=1020;; 66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=764;; - 67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=892;; + 67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=1020;; '68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=1008;; '68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=1008;; '68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=1008;; @@ -124,11 +124,11 @@ case $HW_MODEL in '72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1008;; '72.3') iname='ROCK4CPlus' HW_ARCH=3 partition_start=16 root_size=1008;; 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1008;; - 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1020;; + 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1148;; 75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;; '76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; '76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; - 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; @@ -141,7 +141,7 @@ case $HW_MODEL in 84) iname='Star64' HW_ARCH=11 root_size=639;; 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; - 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac @@ -510,7 +510,8 @@ then fi # AlloGUI edition: Pre-install Allo GUI with all managed audiophile software -if [[ $EDITION == 'AlloGUI' || ( $EDITION == 'all' && $HW_MODEL =~ ^(0|70)$ ) ]] +# - Temporarily skip Trixie AlloGUI builds: The netdata package is currently not available (only on Raspbian, not Debian) and systemd-logind fails to start within the container as of a new change/bug, to investigate. +if [[ $EDITION == 'AlloGUI' || ( $EDITION == 'all' && $HW_MODEL =~ ^(0|70)$ && $DISTRO != 8 ) ]] then G_EXEC mv "$OUTPUT_IMG_NAME.img" "${OUTPUT_IMG_NAME%_Amiberry}_AlloGUI.img" OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME%_Amiberry}_AlloGUI" diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 176c6021d4..832e3d6e46 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -61,8 +61,8 @@ [[ $SKIP_FIRSTBOOT_RESIZE == 1 ]] || SKIP_FIRSTBOOT_RESIZE=0 [[ $SHRINK_ONLY == 1 ]] || SHRINK_ONLY=0 [[ $SKIP_ARCHIVE == 1 ]] || SKIP_ARCHIVE=0 - ADD_DOS_PART=0 - CONFIGS_TO_BOOT=0 + ADD_DOS_PART=0 # trailing FAT partition for first boot config files, automatically imported and partition removed on first boot + CONFIGS_TO_BOOT=0 # for new RPi kernel/firmware stack where a boot FAT partition exists, but is mounted to /boot/firmware instead of /boot SIGN_PASS= while (( $# )) do From 06dc9a31ccfb46a7797b8b5af4eeaaeb6ab87c6c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 26 Apr 2024 14:00:32 +0200 Subject: [PATCH 052/109] v9.4 - DietPi-Imager | Use multi-threaded xz compression. Other than 7zip, xz uses a single thread only by default --- .build/images/dietpi-imager | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 832e3d6e46..10ed47c673 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -746,10 +746,10 @@ _EOF_ # Generate xz archive # NB: LZMA2 ultra compression requires much memory per thread. 1 GiB is not sufficient for >2 threads, hence use "-T2" to limit used CPU threads to "2" on 1 GiB devices with more than two cores. - local limit_threads=() - (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $(nproc) > 2 )) && limit_threads=('-T2') + local threads=$(nproc) + (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $threads > 2 )) && threads=2 [[ -f $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz ]] && G_EXEC rm "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" - G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "${limit_threads[@]}" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "$threads" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz' > '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256'" local signature=() sig_text='' [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" || exit 1; signature=("$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.asc") sig_text="\nSignature: $PWD/${signature[*]}"; } From 60600bdae76ee06d8f64e0eeb3d68bd35dacdd78 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 26 Apr 2024 14:04:32 +0200 Subject: [PATCH 053/109] v9.4 - DietPi-Imager | Fix xz threads option and use special value "0" to automate the number of threads and assure multi-theaded mode (for decompression) even in case of a single CPU core/thread. --- .build/images/dietpi-imager | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 10ed47c673..e1d975a6e4 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -746,10 +746,10 @@ _EOF_ # Generate xz archive # NB: LZMA2 ultra compression requires much memory per thread. 1 GiB is not sufficient for >2 threads, hence use "-T2" to limit used CPU threads to "2" on 1 GiB devices with more than two cores. - local threads=$(nproc) - (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $threads > 2 )) && threads=2 + local threads=0 + (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $(nproc) > 2 )) && threads=2 [[ -f $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz ]] && G_EXEC rm "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" - G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "$threads" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "-T$threads" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz' > '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256'" local signature=() sig_text='' [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" || exit 1; signature=("$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.asc") sig_text="\nSignature: $PWD/${signature[*]}"; } From 13d20c75aeec6669a57ee0da25ca5e1479e601ab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 Apr 2024 21:26:08 +0200 Subject: [PATCH 054/109] v9.4 - DietPi-Installer | When flashing U-Boot via Armbian's script, do not mute progress and error messages --- .build/images/dietpi-installer | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index ab610487b8..eb7ca51e26 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1181,6 +1181,8 @@ _EOF_ # Flash U-Boot # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh + # - Do not mute progress and error messages + eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" # shellcheck disable=SC2154 write_uboot_platform "$DIR" "$BOOT_DEVICE" From 80536116081d329b48005b1f9633b6e64c42658b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 Apr 2024 21:39:34 +0200 Subject: [PATCH 055/109] v9.4 (#7046) - DietPi-Imager | Skip moving backup partition table before touching the image. parted/sfdisk may throw warnings, but the step can fail if the last partition reaches the end of the image, e.g. if the file was cut right after the last partition, ignoring the backup table. Additionally, obtain the size needed for the GPT backup correctly by the first usabe LBA/sector, instead of using the 34 sectors default GPT size. fdisk/sfdisk use 2048 by default, while parted defaults to the actual 34 sectors the GPT truly uses. From b215c0149b4add4e8e20e03d326a8b197d2ee3cf Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 15:59:04 +0200 Subject: [PATCH 056/109] v9.4 - DietPi-Build | Raise some image sizes for Trixie - DietPi-Software | Update fallback URLs --- .build/images/dietpi-build | 8 ++++---- dietpi/dietpi-software | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 4bba54f1ec..5d9992374c 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -88,11 +88,11 @@ case $HW_MODEL in 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1148;; 20) iname='VM' HW_ARCH=${HW_ARCH:-10} VMTYPE=${VMTYPE:-raw};; 21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1663;; - 40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=892;; + 40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=1020;; 42) iname='ROCKPro64' HW_ARCH=3 partition_start=16 root_size=1008;; 43) iname='ROCK64' HW_ARCH=3 partition_start=16 root_size=1008;; - 44) iname='Pinebook' HW_ARCH=3 partition_start=4 root_size=892;; - 45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=892;; + 44) iname='Pinebook' HW_ARCH=3 partition_start=4 root_size=1020;; + 45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=1020;; 46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=1008;; 47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=1008;; 48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=764;; @@ -133,7 +133,7 @@ case $HW_MODEL in '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 81) iname='VisionFive2' HW_ARCH=11 root_size=639;; 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index fb19a7f77c..66fbfd30e2 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6206,7 +6206,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.51.1/navidrome_0.51.1_linux_$arch.tar.gz" + local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.52.0/navidrome_0.52.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/navidrome/navidrome/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/navidrome_[0-9.]*_linux_$arch\.tar\.gz\"$/{print \$4}")" /opt/navidrome # Data dir @@ -10027,7 +10027,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.24.2510/Readarr.develop.0.3.24.2510.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.25.2515/Readarr.develop.0.3.25.2515.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From 939ec3d40c5e0253221bebf6a4535d6e404ee1ab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 16:33:31 +0200 Subject: [PATCH 057/109] v9.4 - CI | Armbian: Setup Python to make available /usr/bin/python, requried for legacy s5p6818 build. Use our fork with some patches/commits by default. Rebase any other fork/branch onto ours and onto upstream. --- .github/workflows/armbian.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index e0d848ab41..a998f57432 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -34,15 +34,30 @@ jobs: name: "${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}" runs-on: ubuntu-22.04 steps: + # https://github.com/actions/setup-python/tags + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true - name: Clone Armbian repo run: | owner='${{ github.event.inputs.gitowner }}' - [ "$owner" ] || owner='armbian' + [ "$owner" ] || owner='MichaIng' branch='${{ github.event.inputs.gitbranch }}' - [ "$branch" ] || branch='main' + [ "$branch" ] || branch='dietpi' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : cd build + if [ "$owner" != 'MichaIng' ] + then + git remote add dietpi https://github.com/MichaIng/build + git fetch dietpi dietpi + git rebase dietpi/dietpi + elif [ "$branch" != 'dietpi' ] + then + git fetch origin dietpi + git rebase dietpi + fi if [ "$owner" != 'armbian' ] then git remote add upstream https://github.com/armbian/build From 7f776867a4990139d7f400ebc0385852517f63a4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 17:08:02 +0200 Subject: [PATCH 058/109] v9.4 - CI | Armbian: Fix rebasing if branch contains more than 1 new commit. In this case, with only the last commit in history, any rebase conflicts due to unexpected diffs from previous commits. --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index a998f57432..c8a7ed2130 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -45,7 +45,7 @@ jobs: [ "$owner" ] || owner='MichaIng' branch='${{ github.event.inputs.gitbranch }}' [ "$branch" ] || branch='dietpi' - git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + git clone -b "$branch" "https://github.com/$owner/build" [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : cd build if [ "$owner" != 'MichaIng' ] From 4279e4ac14a2e780941fcb91cef9eadac575d1bc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 17:14:36 +0200 Subject: [PATCH 059/109] v9.4 - CI | Armbian: Further attempt to fix missing /usr/bin/python --- .github/workflows/armbian.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index c8a7ed2130..cc74ed1381 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -71,6 +71,7 @@ jobs: - name: Build asset run: | cd build + which python || sudo ln -sv python3 /usr/bin/python ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From 019b2e81902bbfec7d67bf16f178cef924f8db2f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 17:20:23 +0200 Subject: [PATCH 060/109] v9.4 - CI | Armbian: Final fix for missing /usr/bin/python --- .github/workflows/armbian.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index cc74ed1381..5b68f9f816 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -71,7 +71,8 @@ jobs: - name: Build asset run: | cd build - which python || sudo ln -sv python3 /usr/bin/python + # Add python executable for legacy s5p6818 builds + sudo ln -sv python3 /usr/bin/python ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From 93844ba625e8965f121c42564a05559215e540da Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 23:15:38 +0200 Subject: [PATCH 061/109] v9.4 - DietPi-Software | Enhance cancel button text for Pi-hole/AdGuard home pre-install dialogues, to show both "Skip" instead of "Cancel". --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 66fbfd30e2..820a203c78 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -15009,13 +15009,13 @@ We allow it to take up to 30 minutes, it's process can be followed, please be pa # Add option to use Unbound as upstream DNS server if (( ${aSOFTWARE_INSTALL_STATE[182]} == 0 )) then - G_WHIP_YESNO 'Would you like to use Unbound, a tiny recursive DNS server hosted on your device, as your upstream DNS server? + G_WHIP_BUTTON_CANCEL_TEXT='Skip' G_WHIP_YESNO 'Would you like to use Unbound, a tiny recursive DNS server hosted on your device, as your upstream DNS server? \nThis will increase privacy, because you will not be sending data to Google etc. \nHowever, the downside is that some websites may load slower the first time you visit them.' && aSOFTWARE_INSTALL_STATE[182]=1 fi # Prompt for static IP - if G_WHIP_YESNO 'A static IP address is essential for a DNS server installations. DietPi-Config can be used to quickly setup your static IP address. + if G_WHIP_BUTTON_CANCEL_TEXT='Skip' G_WHIP_YESNO 'A static IP address is essential for a DNS server installation. DietPi-Config can be used to quickly setup your static IP address. \nIf you have already setup your static IP, please ignore this message.\n\nWould you like to setup your static IP address now?' then G_WHIP_MSG 'DietPi-Config will now be launched. Simply select your Ethernet or Wifi connection from the menu to access the IP address settings. From 7cdb014d9a68803be100328dafea111c551f546c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 23:28:15 +0200 Subject: [PATCH 062/109] v9.4 (#7050) - CI | Armbian: Fix rebase syntax and remove obsolete workaround attempts for failing s5p6818 buids: This is now fixed via Armbian patch. --- .github/workflows/armbian.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 5b68f9f816..088be9a818 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -34,11 +34,6 @@ jobs: name: "${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}" runs-on: ubuntu-22.04 steps: - # https://github.com/actions/setup-python/tags - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - check-latest: true - name: Clone Armbian repo run: | owner='${{ github.event.inputs.gitowner }}' @@ -56,7 +51,7 @@ jobs: elif [ "$branch" != 'dietpi' ] then git fetch origin dietpi - git rebase dietpi + git rebase origin/dietpi fi if [ "$owner" != 'armbian' ] then @@ -66,13 +61,11 @@ jobs: elif [ "$branch" != 'main' ] then git fetch origin main - git rebase main + git rebase origin/main fi - name: Build asset run: | cd build - # Add python executable for legacy s5p6818 builds - sudo ln -sv python3 /usr/bin/python ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From 406ddb3f78ceb3ba18c02744120c77d4587380ec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 29 Apr 2024 00:25:59 +0200 Subject: [PATCH 063/109] v9.4 - DietPi-Build | Remove non-functional Trixie armhf workaround for time_t transition: It does not work, since there are still/again hard dependencies on both versions of some packages. We need to wait until all this has settled. --- .build/images/dietpi-build | 2 -- 1 file changed, 2 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 5d9992374c..f6b8c072e7 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -379,8 +379,6 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' -# Workaround for failing build on ARMv6/7 Trixie systems due to conflicting libssl3 and libssl3t64 dependencies -(( $HW_ARCH < 3 && $DISTRO > 7 )) && packages+=',libssl3t64' #G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log From 78d27c070018fd76fc7a7600e8cfa581978e5497 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 1 May 2024 00:08:20 +0200 Subject: [PATCH 064/109] v9.4 - DietPi-Installer | ROCK 4C Plus: Hardcode device tree since even the variant-specific U-Boot build does not pick the correct one --- .build/images/dietpi-installer | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index eb7ca51e26..3f26c90755 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -674,7 +674,13 @@ setenv rootuuid "true"' /boot/boot.cmd 46) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-pinebook-pro.dtb' /boot/dietpiEnv.txt;; 55) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3328-nanopi-r2-rev00.dtb' /boot/dietpiEnv.txt;; # Not necessarily needed as rk3328-nanopi-r2s.dtb is automatically chosen, but provides more consistent /sys/class/leds/{wan,lan}_led interface and blinking instead of steady lid power LED 56) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3328-nanopi-neo3-rev02.dtb' /boot/dietpiEnv.txt;; # Loads rk3328-nanopi-r2s.dtb by default - 72) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-rock-4se.dtb' /boot/dietpiEnv.txt;; + 72) + case $HW_VARIANT in + 2) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-rock-4se.dtb' /boot/dietpiEnv.txt;; + 3) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-rock-4c-plus.dtb' /boot/dietpiEnv.txt;; + *) :;; + esac + ;; 73) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3308-rock-pi-s.dtb' /boot/dietpiEnv.txt;; # U-Boot does not pass any ${fdtfile} 77) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3568-rock-3a.dtb' /boot/dietpiEnv.txt;; 78) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588-rock-5b.dtb' /boot/dietpiEnv.txt;; From 15ab92ec34ac71f4c672033694005f2a86fbd1ee Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 1 May 2024 19:05:16 +0200 Subject: [PATCH 065/109] v9.4 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 820a203c78..b627fe7576 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11129,7 +11129,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.0.2/tasmoadmin_v4.0.2.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.0/tasmoadmin_v4.1.0.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" else Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz' @@ -11707,7 +11707,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.28.0/linux-$arch-filebrowser.tar.gz" + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.29.0/linux-$arch-filebrowser.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall From 9f55baebb3834beb9c9a742a72ca50a7b2a2a7e5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 1 May 2024 22:12:40 +0200 Subject: [PATCH 066/109] v9.4 - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 --- CHANGELOG.txt | 1 + dietpi/dietpi-vpn | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1ded7a0554..ad3a8af1bb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Enhancements: - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: +- DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. diff --git a/dietpi/dietpi-vpn b/dietpi/dietpi-vpn index 9c052ca47a..094d70f82d 100755 --- a/dietpi/dietpi-vpn +++ b/dietpi/dietpi-vpn @@ -124,7 +124,7 @@ Available commands: then [[ $1 != '-f' && -d $FP_IPVANISH ]] && return 0 [[ $1 != '-f' ]] || G_WHIP_YESNO 'This will remove all IPVanish server files and perform a fresh download of IPVanish server configurations. Once completed, you will need to reselect a IPVanish server from the new list.\n\nDo you want to continue?' || return 0 - G_EXEC curl -sSfLO 'https://www.ipvanish.com/software/configs/configs.zip' + G_EXEC curl -sSfLO 'https://configs.ipvanish.com/configs/configs.zip' VPN_SERVER= [[ -d $FP_IPVANISH ]] && G_EXEC_DESC='Removing old IPVanish server configs' G_EXEC rm -R "$FP_IPVANISH" G_EXEC mkdir -p "$FP_IPVANISH" From 7b6a556127b66aa3bcace7696b7e69f621ad7ccd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 1 May 2024 22:23:28 +0200 Subject: [PATCH 067/109] v9.4 - DietPi-VPN | IPVanish: As well remove "keysize" option from config on Bookworm (and above), which has been deprecated and is invalid sine Bookworm. --- CHANGELOG.txt | 2 +- dietpi/dietpi-vpn | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ad3a8af1bb..f96db459b2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,7 +11,7 @@ Enhancements: - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: -- DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 +- DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. diff --git a/dietpi/dietpi-vpn b/dietpi/dietpi-vpn index 094d70f82d..38cc32967d 100755 --- a/dietpi/dietpi-vpn +++ b/dietpi/dietpi-vpn @@ -233,6 +233,8 @@ _EOF_ # Set protocol and port: UDP port 443 is default, but TCP 1194 and UDP 1194 are supported as well. G_CONFIG_INJECT 'proto[[:blank:]]' "proto $PROTOCOL" "$FP_CLIENT_OVPN" G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*remote[[:blank:]]/s/[[:blank:]][0-9][0-9]*$/ 1194/' "$FP_CLIENT_OVPN" + # Bookworm: Remove "keysize" option, which has been removed with OpenVPN 2.6 + (( $G_DISTRO > 6 )) && G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*keysize[[:blank:]]/d' "$FP_CLIENT_OVPN" elif [[ $VPN_PROVIDER == 'PIA' ]] then From 3dedf4009970d4be2e19373b700ccf0ccc3be059 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 2 May 2024 14:16:13 +0200 Subject: [PATCH 068/109] v9.4 (#7053) - CI | Armbian: Set Git user and email to repo owner name and email --- .github/workflows/armbian.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 088be9a818..329064ee06 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -43,6 +43,8 @@ jobs: git clone -b "$branch" "https://github.com/$owner/build" [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : cd build + git config user.name "$GITHUB_REPOSITORY_OWNER" + git config user.email '${{ github.repository.owner.email }}' if [ "$owner" != 'MichaIng' ] then git remote add dietpi https://github.com/MichaIng/build From 0a3a252768b219bf75dabd0d164bdb8b8f6e15f2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 2 May 2024 22:44:25 +0200 Subject: [PATCH 069/109] v9.4 (#7042) - Orange Pi 3 LTS/Radxa ZERO 3 | Add support --- .build/images/dietpi-build | 2 ++ .build/images/dietpi-installer | 19 ++++++++++++------- .github/workflows/dietpi-build.yml | 4 +++- .meta/dietpi-survey_report | 2 ++ CHANGELOG.txt | 2 ++ dietpi/func/dietpi-obtain_hw_model | 12 +++++++++++- dietpi/func/dietpi-set_hardware | 2 +- dietpi/func/dietpi-set_software | 1 + 8 files changed, 34 insertions(+), 10 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index f6b8c072e7..a1465f21d7 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -142,6 +142,8 @@ case $HW_MODEL in 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + 89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=892;; + 90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 3f26c90755..3f7becfcee 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -415,10 +415,12 @@ _EOF_ '72.3' ': ROCK 4C Plus' '73' ': ROCK Pi S' '74' ': Radxa Zero' + '90' ': Radxa ZERO 3' '77' ': ROCK 3A' '78' ': ROCK 5B' '85' ': ROCK 5A' '87' ': Orange Pi 3B' + '89' ': Orange Pi 3 LTS' '80' ': Orange Pi 5' '82' ': Orange Pi 5 Plus' '83.1' ': Orange Pi Zero 3' @@ -619,7 +621,7 @@ _EOF_ G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot - elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87)$ ]] + elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|89|90)$ ]] then armbian_repo=1 G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -660,7 +662,7 @@ setenv rootuuid "true"' /boot/boot.cmd (( $G_HW_MODEL == 15 )) && G_EXEC eval 'echo '\''meson_rng'\'' > /etc/modules-load.d/dietpi-hwrng.conf' # Rockchip 64-bit (configs work with Amlogic OOTB) - elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87)$ ]] + elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90)$ ]] then G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd @@ -687,6 +689,7 @@ setenv rootuuid "true"' /boot/boot.cmd 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; + 90) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-radxa-zero3.dtb' /boot/dietpiEnv.txt;; *) :;; esac case $G_HW_MODEL in @@ -712,7 +715,7 @@ setenv rootuuid "true"' /boot/boot.cmd G_EXEC sed --follow-symlinks -i -e 's/ttyAML0/ttyS2/' -e '/^extraargs=/s/$/ systemd.unified_cgroup_hierarchy=0/' /boot/dietpiEnv.txt # Allwinner 64-bit - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83)$ ]] + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83|89)$ ]] then G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x45000000"' /boot/boot.cmd @@ -1116,6 +1119,8 @@ _EOF_ 85) model='rock-5a' kernel='rk35xx' branch='legacy';; 86) model='tinkerboard-2' kernel='rockchip64';; 87) model='orangepi3b' kernel='rockchip64' branch='edge';; + 89) model='orangepi3-lts' kernel='sunxi64';; + 90) model='radxa-zero3' kernel='rk35xx' branch='legacy';; *) :;; esac @@ -1957,8 +1962,8 @@ _EOF_' then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS2 - # PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64 - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84)$ ]] + # PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64, Orange Pi 3 LTS + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84|89)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS0 @@ -1967,8 +1972,8 @@ _EOF_' then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS1 - # RK3588: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A - elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85)$ ]] + # Rockchip vendor: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A, Radxa ZERO 3 + elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85|90)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyFIQ0 diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 0307a374b4..249fd50fc5 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -91,7 +91,9 @@ jobs: '"-m 84 -d 8", '\ '"-m 85 -d 6", "-m 85 -d 7", "-m 85 -d 8", '\ '"-m 86 -d 6", "-m 86 -d 7", "-m 86 -d 8", '\ - '"-m 87 -d 6", "-m 87 -d 7", "-m 87 -d 8"]' >> "$GITHUB_OUTPUT" + '"-m 87 -d 6", "-m 87 -d 7", "-m 87 -d 8", '\ + '"-m 89 -d 6", "-m 89 -d 7", "-m 89 -d 8", '\ + '"-m 90 -d 6", "-m 90 -d 7", "-m 90 -d 8"]' >> "$GITHUB_OUTPUT" elif [ "${{ github.event.inputs.buildargs }}" = 'quartz64' ] then echo buildargs=[\ diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 367bbc9790..2afeda1bd3 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -92,6 +92,8 @@ shopt -s extglob [85]='ROCK 5A' [86]='ASUS Tinker Board 2' [87]='Orange Pi 3B' + [89]='Orange Pi 3 LTS' + [90]='Radxa ZERO 3' ) ## Benchmark data arrays: aBENCH_XX[$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}] diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f96db459b2..11a29214dd 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,8 @@ v9.4 New images: - ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 +- Orange Pi 3 LTS | Added support for this Allwinner H6 based SBC. +- Radxa ZERO 3 | Added support for this Rockchip RK3566 based SBC, the 3E variant with Ethernet as well as the 3W variant with onboard WiFi. Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index 9a0c8748ef..e49ec26e31 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -316,7 +316,17 @@ G_HW_MODEL=$(mawk 'NR==1' "$FP_G_HW_MODEL_IDENTIFIER") - if (( $G_HW_MODEL == 87 )); then + if (( $G_HW_MODEL == 90 )); then + + G_HW_MODEL_NAME='Radxa ZERO 3' + G_HW_CPUID=9 + + elif (( $G_HW_MODEL == 89 )); then + + G_HW_MODEL_NAME='Orange Pi 3 LTS' + G_HW_CPUID=5 + + elif (( $G_HW_MODEL == 87 )); then G_HW_MODEL_NAME='Orange Pi 3B' G_HW_CPUID=9 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index e5b3747fd0..1d13bb641e 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1519,7 +1519,7 @@ Do you want to continue and disable the serial login console?' || return 1 elif (( $DIETPIENV || $G_HW_MODEL == 49 || $G_HW_MODEL == 76 || $G_HW_MODEL == 79 )) then local baudrate='115200' - if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|87)$ && $INPUT_ADDITIONAL == 'ttyS2' ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] || [[ $G_HW_MODEL =~ ^(76|78|79|80|82|85)$ && $INPUT_ADDITIONAL == 'ttyFIQ0' ]] + if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|78|79|80|82|85|87|90)$ && $INPUT_ADDITIONAL =~ ^('ttyS2'|'ttyFIQ0')$ ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] then baudrate='1500000' [[ -d /etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d ]] || G_EXEC mkdir "/etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d" diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index eeda29c13f..08de43ed98 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -182,6 +182,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; 81) all_components='visionfive2';; 84) all_components='star64';; + 90) all_components='radxazero3';; *) :;; esac G_EXEC eval "echo 'deb https://dietpi.com/apt $G_DISTRO_NAME $components' > /etc/apt/sources.list.d/dietpi.list" From a0e43d7a9d41d8054c8b14623912cb3a5d8eafe7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 3 May 2024 01:42:22 +0200 Subject: [PATCH 070/109] v9.4 - DietPi-Obtain_HW_model | On RPi, if no known revision code has been found, but ARMv7/8 detected, fall back to RPi 2 device index, as it cannot be an RPi 1 or Zero (1) then. For this to be checked a little simpler, detect architecture (and distro version) first. --- dietpi/func/dietpi-obtain_hw_model | 93 +++++++++++++++--------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index e49ec26e31..1e02062e4d 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -303,6 +303,10 @@ fi G_HW_MANUFACTURER='Embest' + elif (( $G_HW_ARCH > 1 )) + then + # In case of ARMv7/8 architecture, if no model was detected, fall back to RPi 2. + G_HW_MODEL=2 fi } @@ -311,6 +315,49 @@ # NBB: DO NOT REORDER INDEX's. These are now fixed and will never change (due to survey results etc) Obtain_HW_Info(){ + # Get distro ID + local distro=$( Date: Fri, 3 May 2024 15:57:30 +0200 Subject: [PATCH 071/109] v9.4 - DietPi-Software | Update fallback URL - DietPi-WiFiDB | Simplify sed command a little --- dietpi/dietpi-software | 2 +- dietpi/func/dietpi-wifidb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b627fe7576..e19ec7ec54 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7530,7 +7530,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.3.1/ampache-6.3.1_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.4.0/ampache-6.4.0_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths diff --git a/dietpi/func/dietpi-wifidb b/dietpi/func/dietpi-wifidb index 8b5c168dcb..f2c4fec1de 100755 --- a/dietpi/func/dietpi-wifidb +++ b/dietpi/func/dietpi-wifidb @@ -227,7 +227,7 @@ _EOF_ do G_WHIP_MENU_ARRAY+=("$line" '') - done < <(iwlist "$wifi_iface" scan | sed -n '/^[[:blank:]]*ESSID:/s/^[[:blank:]]*ESSID:"\(.*\)"/\1/p') + done < <(iwlist "$wifi_iface" scan | sed -n 's/^[[:blank:]]*ESSID:"\(.*\)"/\1/p') [[ ${G_WHIP_MENU_ARRAY[0]} ]] || { G_WHIP_MSG 'No WiFi SSID has been found in your area.'; return 1; } From cdacbc021d264499835b2e47389f33f46b3e02e7 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Fri, 3 May 2024 21:28:43 +0200 Subject: [PATCH 072/109] v9.4 (#7056) - DietPi-Software | X.Org X Server: Resolved an issue where an important config files might might have been missing on RPi 5 an potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 11a29214dd..c36f95330e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -17,6 +17,7 @@ Bug fixes: - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. +- DietPi-Software | X.Org X Server: Resolved an issue where an important config files might might have been missing on RPi 5 an potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e19ec7ec54..aa8a442193 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2657,6 +2657,9 @@ _EOF_ # Generic X server + Mesa OpenGL libraries and utilities aDEPS=('xserver-xorg-core' 'xserver-xorg-input-libinput' 'xinit' 'dbus-user-session' 'xfonts-base' 'x11-xserver-utils' 'x11-utils') + # Disable DPMS and screen blanking + dps_index=$software_id Download_Install '98-dietpi-disable_dpms.conf' /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf + # RPi if (( $G_HW_MODEL < 10 )) then @@ -2700,9 +2703,6 @@ Section "Screen" EndSection _EOF_ fi - - # Disable DPMS and screen blanking - dps_index=$software_id Download_Install '98-dietpi-disable_dpms.conf' /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf fi if To_Install 152 avahi-daemon # Avahi-Daemon From 3d4b8253411e2b95c49183d1f1006d0eb5a71546 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 4 May 2024 13:28:43 +0200 Subject: [PATCH 073/109] v9.4 - DietPi-Software | X.Org X Server: Fix fix for missing config dir on RPi 5: Download_Install installs aDEPS, hence must stay where it was. --- CHANGELOG.txt | 2 +- dietpi/dietpi-software | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c36f95330e..58df2a1d7c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -17,7 +17,7 @@ Bug fixes: - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. -- DietPi-Software | X.Org X Server: Resolved an issue where an important config files might might have been missing on RPi 5 an potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 +- DietPi-Software | X.Org X Server: Resolved an issue where an important config file might have been missing on RPi 5 and potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index aa8a442193..9cac6e1e92 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2654,11 +2654,11 @@ _EOF_ if To_Install 6 # X.Org X Server then - # Generic X server + Mesa OpenGL libraries and utilities + # Generic X server and utilities aDEPS=('xserver-xorg-core' 'xserver-xorg-input-libinput' 'xinit' 'dbus-user-session' 'xfonts-base' 'x11-xserver-utils' 'x11-utils') - # Disable DPMS and screen blanking - dps_index=$software_id Download_Install '98-dietpi-disable_dpms.conf' /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf + # Pre-create config dir: https://dietpi.com/forum/t/19963 + G_EXEC mkdir -p /etc/X11/xorg.conf.d # RPi if (( $G_HW_MODEL < 10 )) @@ -2703,6 +2703,9 @@ Section "Screen" EndSection _EOF_ fi + + # Disable DPMS and screen blanking + dps_index=$software_id Download_Install '98-dietpi-disable_dpms.conf' /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf fi if To_Install 152 avahi-daemon # Avahi-Daemon From d1266cf72a0d022f6095f3ea1f116a90145761ce Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:33:24 +0200 Subject: [PATCH 074/109] v9.4 (#6995) - Image | Add support for Orange Pi Zero 2W --- .build/images/dietpi-build | 1 + .build/images/dietpi-installer | 42 +++++++++++++++--------------- .github/workflows/dietpi-build.yml | 1 + .meta/dietpi-survey_report | 1 + CHANGELOG.txt | 1 + dietpi/dietpi-config | 4 +-- dietpi/func/dietpi-obtain_hw_model | 7 +++++ dietpi/func/dietpi-set_hardware | 18 ++++++------- dietpi/func/dietpi-set_software | 1 + 9 files changed, 44 insertions(+), 32 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index a1465f21d7..e8af5b05ae 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -142,6 +142,7 @@ case $HW_MODEL in 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + 88) iname='OrangePiZero2W' HW_ARCH=3 partition_start=4 root_size=1148;; 89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=892;; 90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 3f7becfcee..063da44e33 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -425,6 +425,7 @@ _EOF_ '82' ': Orange Pi 5 Plus' '83.1' ': Orange Pi Zero 3' '83.2' ': Orange Pi Zero 3 (1.5 GB RAM)' + '88' ': Orange Pi Zero 2W' '86' ': ASUS Tinker Board 2' '23' ': Generic Rockchip RK3328' '24' ': Generic Rockchip RK3399' @@ -621,7 +622,7 @@ _EOF_ G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot - elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|89|90)$ ]] + elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90)$ ]] then armbian_repo=1 G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -715,30 +716,33 @@ setenv rootuuid "true"' /boot/boot.cmd G_EXEC sed --follow-symlinks -i -e 's/ttyAML0/ttyS2/' -e '/^extraargs=/s/$/ systemd.unified_cgroup_hierarchy=0/' /boot/dietpiEnv.txt # Allwinner 64-bit - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83|89)$ ]] + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83|88|89)$ ]] then G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x45000000"' /boot/boot.cmd G_CONFIG_INJECT 'overlay_path=' 'overlay_path=allwinner' /boot/dietpiEnv.txt + # Device tree case $G_HW_MODEL in 45) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h6-pine-h64-model-b.dtb' /boot/dietpiEnv.txt;; + 83) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb' /boot/dietpiEnv.txt;; + 88) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero2w.dtb' /boot/dietpiEnv.txt;; *) :;; esac + # Overlay prefix case $G_HW_MODEL in 40|44) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-a64' /boot/dietpiEnv.txt;; 45) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-h6' /boot/dietpiEnv.txt;; 57|65|67) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-h5' /boot/dietpiEnv.txt;; - 83) - G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-h616' /boot/dietpiEnv.txt - (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb' /boot/dietpiEnv.txt - ;; + 83|88) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-h616' /boot/dietpiEnv.txt;; *) :;; esac + # Overlays case $G_HW_MODEL in 57|65) G_CONFIG_INJECT 'overlays=' 'overlays=usbhost1 usbhost2' /boot/dietpiEnv.txt;; 67) G_CONFIG_INJECT 'overlays=' 'overlays=analog-codec' /boot/dietpiEnv.txt;; *) :;; esac + # Console args case $G_HW_MODEL in 57|65) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS0,115200' /boot/dietpiEnv.txt;; # headless *) G_EXEC sed --follow-symlinks -i 's/ttyAML0/ttyS0/' /boot/dietpiEnv.txt;; @@ -1005,7 +1009,7 @@ setenv rootuuid "true"' /boot/boot.cmd fi # Skip creating kernel symlinks and remove existing ones - G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' + G_DIETPI-NOTIFY 2 'Preventing needless kernel and initramfs symlink generation' G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' G_EXEC rm -f /{,boot/}{initrd.img,vmlinuz}{,.old} @@ -1119,6 +1123,7 @@ _EOF_ 85) model='rock-5a' kernel='rk35xx' branch='legacy';; 86) model='tinkerboard-2' kernel='rockchip64';; 87) model='orangepi3b' kernel='rockchip64' branch='edge';; + 88) model='orangepizero2w' kernel='sunxi64';; 89) model='orangepi3-lts' kernel='sunxi64';; 90) model='radxa-zero3' kernel='rk35xx' branch='legacy';; *) :;; @@ -1246,7 +1251,7 @@ _EOF_ # Skip creating kernel symlinks and remove existing ones if [[ -L '/vmlinuz' ]] then - G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' + G_DIETPI-NOTIFY 2 'Preventing needless kernel and initramfs symlink generation' G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} fi @@ -1259,6 +1264,9 @@ _EOF_ (( $G_HW_ARCH == 3 )) || a32bit=('raspi-copies-and-fills') if findmnt -M /boot/firmware &> /dev/null then + G_DIETPI-NOTIFY 2 'Preventing needless kernel and initramfs symlink generation' + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} local kernel=() case $G_HW_MODEL in 0) @@ -1298,14 +1306,6 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' - # Skip creating kernel symlinks and remove existing ones - if [[ -L '/vmlinuz' ]] - then - G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' - G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' - G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} - fi - # Quartz64 elif [[ $G_HW_MODEL == 49 && $(findmnt -Ufnro TARGET -T /boot) == '/' ]] then @@ -1442,7 +1442,7 @@ _EOF_ # Skip creating kernel symlinks and remove existing ones if [[ -L '/vmlinuz' ]] then - G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' + G_DIETPI-NOTIFY 2 'Preventing needless kernel and initramfs symlink generation' G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} fi @@ -1962,8 +1962,8 @@ _EOF_' then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS2 - # PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64, Orange Pi 3 LTS - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84|89)$ ]] + # PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64, Orange Pi Zero 2W, Orange Pi 3 LTS + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84|88|89)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS0 @@ -2184,8 +2184,8 @@ SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATT SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" _EOF_ - # Orange Pi 3B/Zero 3: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi - elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] + # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi + elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' fi diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 249fd50fc5..601b6a1291 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -92,6 +92,7 @@ jobs: '"-m 85 -d 6", "-m 85 -d 7", "-m 85 -d 8", '\ '"-m 86 -d 6", "-m 86 -d 7", "-m 86 -d 8", '\ '"-m 87 -d 6", "-m 87 -d 7", "-m 87 -d 8", '\ + '"-m 88 -d 6", "-m 88 -d 7", "-m 88 -d 8", '\ '"-m 89 -d 6", "-m 89 -d 7", "-m 89 -d 8", '\ '"-m 90 -d 6", "-m 90 -d 7", "-m 90 -d 8"]' >> "$GITHUB_OUTPUT" elif [ "${{ github.event.inputs.buildargs }}" = 'quartz64' ] diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 2afeda1bd3..cb2c6a5599 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -92,6 +92,7 @@ shopt -s extglob [85]='ROCK 5A' [86]='ASUS Tinker Board 2' [87]='Orange Pi 3B' + [88]='Orange Pi Zero 2W' [89]='Orange Pi 3 LTS' [90]='Radxa ZERO 3' ) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 58df2a1d7c..4841de64c0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ New images: - ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 - Orange Pi 3 LTS | Added support for this Allwinner H6 based SBC. - Radxa ZERO 3 | Added support for this Rockchip RK3566 based SBC, the 3E variant with Ethernet as well as the 3W variant with onboard WiFi. +- Orange Pi Zero 2W | Support for this small form factor SBC with Allwinner H618 SoC was added. Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 258900fff6..35e9c1bb13 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1094,8 +1094,8 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]] && bluetooth_state=0 bluetooth_state_text='Off' G_WHIP_MENU_ARRAY+=('Bluetooth' ": [$bluetooth_state_text]") - # Orange Pi Zero 3 specific - if (( $G_HW_MODEL == 83 )) + # Orange Pi Zero 3/Zero 2W specific + if (( $G_HW_MODEL == 83 || $G_HW_MODEL == 88 )) then # SPI state local spi_enabled=$(grep -Ecm1 '^[[:blank:]]*overlays=(.*[[:blank:]])?spi1-cs1-spidev([[:blank:]]|$)' /boot/dietpiEnv.txt) diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index 1e02062e4d..030bf3cceb 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -12,6 +12,9 @@ # - Generates /boot/dietpi/.hw_model # - Called from /boot/dietpi/preboot, called by /etc/systemd/system/dietpi-preboot.service # + # G_HW_MODEL 90 Radxa ZERO 3 + # G_HW_MODEL 89 Orange Pi 3 LTS + # G_HW_MODEL 88 Orange Pi Zero 2W # G_HW_MODEL 87 Orange Pi 3B # G_HW_MODEL 86 ASUS Tinker Board 2 # G_HW_MODEL 85 ROCK 5A @@ -373,6 +376,10 @@ G_HW_MODEL_NAME='Orange Pi 3 LTS' G_HW_CPUID=5 + elif (( $G_HW_MODEL == 88 )); then + + G_HW_MODEL_NAME='Orange Pi Zero 2W' + elif (( $G_HW_MODEL == 87 )); then G_HW_MODEL_NAME='Orange Pi 3B' diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 1d13bb641e..492bf545e1 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1112,8 +1112,8 @@ _EOF_ Unknown_Input_Mode fi - # Orange Pi Zero 3 - elif (( $G_HW_MODEL == 83 )) + # Orange Pi Zero 3/Zero 2W + elif (( $G_HW_MODEL == 83 || $G_HW_MODEL == 88 )) then if [[ $INPUT_DEVICE_VALUE == 'enable' ]] then @@ -1148,7 +1148,7 @@ _EOF_ 'hci_uart' ) - [[ $G_HW_MODEL =~ ^(83|87)$ ]] && aBLUETOOTH_MODULES+=('sprdbt_tty') # Orange Pi 3B/Zero 3 + [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] && aBLUETOOTH_MODULES+=('sprdbt_tty') # Orange Pi 3B/Zero 3/Zero 2W if [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then @@ -1244,8 +1244,8 @@ Do you want to continue and disable the serial login console?' || return 1 then (( $G_HW_ONBOARD_WIFI )) && G_EXEC systemctl enable hciuart - # Orange Pi 3B/Zero 3: Module does not load automatically - elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] + # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically + elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then modprobe -n sprdbt_tty 2> /dev/null && G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' fi @@ -1340,8 +1340,8 @@ Do you want to continue and disable the serial login console?' || return 1 then aWIFI_MODULES+=('bcmdhd') - # + Orange Pi 3B/Zero 3 - elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] + # + Orange Pi 3B/Zero 3/Zero 2W + elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then aWIFI_MODULES+=('sprdwl_ng') fi @@ -1387,8 +1387,8 @@ Do you want to continue and disable the serial login console?' || return 1 then G_EXEC eval 'echo -e '\''options wlan_8192eu rtw_power_mgnt=0\noptions wlan_8812au rtw_power_mgnt=0'\'' > /etc/modprobe.d/dietpi-disable_wifi_powersaving.conf' - # - Orange Pi 3B/Zero 3: Module does not load automatically - elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] + # - Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically + elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then modprobe -n sprdwl_ng 2> /dev/null && G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' fi diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 08de43ed98..c5bb1cd91f 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -182,6 +182,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; 81) all_components='visionfive2';; 84) all_components='star64';; + 88) all_components='orangepizero2w';; 90) all_components='radxazero3';; *) :;; esac From 743622ef2cfc802cd6a2b5363a1894c1f54ffe1a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:39:35 +0200 Subject: [PATCH 075/109] v9.4 - DietPi-Set_software | Add more APT repo components for SBCs we started to host kernel/U-Boot/firmware fore --- dietpi/func/dietpi-set_software | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index c5bb1cd91f..b7bb255d97 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -123,6 +123,10 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R case $G_HW_MODEL in [0-9]) all_components='rpi';; 10) all_components='odroidc1';; + 40) all_components='pinea64';; + 44) all_components='pinebook';; + 45) all_components='pineh64';; + 48) all_components='nanopir1';; 49) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed kernel/firmware package # shellcheck disable=SC2154 @@ -141,6 +145,10 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; esac ;; + 56) all_components='nanopineo3';; + 45) all_components='nanopineoplus2';; + 59) all_components='zeropi';; + 60) all_components='nanopineo';; 61) all_components='nanopi2';; 62) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package @@ -160,7 +168,26 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R esac ;; 63) all_components='nanopim1';; + 64) all_components='nanopineoair';; + 65) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 + case $HW_VARIANT in + 1) all_components='nanopineo2';; + 2) all_components='nanopineo2black';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + [[ $all_components ]] || for i in nanopineo2{,black} + do + dpkg-query -s "linux-u-boot-$i-legacy" &> /dev/null || continue + all_components=$i + break + done + ;; + esac + ;; 66) all_components='nanopim1plus';; + 67) all_components='nanopik1plus';; 70) all_components='sparkysbc';; 76) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package @@ -181,8 +208,10 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R esac ;; 81) all_components='visionfive2';; + 83) all_components='orangepizero3';; 84) all_components='star64';; 88) all_components='orangepizero2w';; + 89) all_components='orangepi3lts';; 90) all_components='radxazero3';; *) :;; esac From 96c735eb56d9bc7167941d9d9474d11219b8182a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:46:05 +0200 Subject: [PATCH 076/109] v9.4 - DietPi-Software | Fix NanoPi NEO Plus2 hardware ID - DietPi-Patches | Update DietPi APT list for several SBCs we added components to our repo for --- .update/patches | 10 ++++++++-- dietpi/func/dietpi-set_software | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.update/patches b/.update/patches index e1e0b951bf..bb8669cd4f 100755 --- a/.update/patches +++ b/.update/patches @@ -1560,8 +1560,14 @@ Patch_9_3() Patch_9_4() { - # Update DietPi APT list for NanoPi R5C - (( $G_HW_MODEL == 76 )) && /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + # Update DietPi APT list for several SBCs we added components to our repo for + if (( $G_HW_MODEL =~ ^(40|44|45|48|56|57||59||60|64|65|67|76|83|88|89|90)$ )) + then + /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + G_AGUP -v + # shellcheck disable=SC2154 + (( $G_AGUP_COUNT )) && G_AGUG + fi if [[ -f '/boot/dietpi/.installed' ]] then diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index b7bb255d97..1d2ba000e6 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -146,7 +146,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R esac ;; 56) all_components='nanopineo3';; - 45) all_components='nanopineoplus2';; + 57) all_components='nanopineoplus2';; 59) all_components='zeropi';; 60) all_components='nanopineo';; 61) all_components='nanopi2';; From d2701918c9ad7ba3cfc526f02be9fb925455359d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:51:45 +0200 Subject: [PATCH 077/109] v9.4 (#7059) - DietPi-WiFiDB | Minor coding --- dietpi/func/dietpi-wifidb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dietpi/func/dietpi-wifidb b/dietpi/func/dietpi-wifidb index f2c4fec1de..661652c9a3 100755 --- a/dietpi/func/dietpi-wifidb +++ b/dietpi/func/dietpi-wifidb @@ -207,20 +207,19 @@ _EOF_ # Menus #///////////////////////////////////////////////////////////////////////////////////// - Scan_Wifi(){ - + Scan_Wifi() + { local wifi_iface=$(G_GET_NET -t wlan iface) # Return if no WiFi adapter is detected - [[ ! $wifi_iface ]] && G_WHIP_MSG 'No WiFi adapter was detected on your device. Scanning for interfaces cannot be done.' && return 1 + [[ $wifi_iface ]] || { G_WHIP_MSG 'No WiFi adapter was detected on your device. Scanning for interfaces cannot be done.'; return 1; } + + G_DIETPI-NOTIFY 0 'Scanning for WiFi SSIDs, please wait....' # Assure WiFi adapter is up to allow SSID scanning # - Compared to "ifup", this method does not imply DHCP scanning, which times out when no SSID has been configured yet. ip l set dev "$wifi_iface" up - # Get all SSIDs - G_DIETPI-NOTIFY 0 'Scanning for WiFi SSIDs, please wait....' - # ToDo: We would love to use modern 'iw dev "$wifi_iface" scan' here, but on NanoPi Fire3 with modern USB WiFi adapter this command runs forever without showing any output. Probably the old vendor kernel has something to do with it. G_WHIP_MENU_ARRAY=() while read -r line @@ -235,7 +234,6 @@ _EOF_ aWIFI_SSID[$WIFI_SSID_INDEX]=$G_WHIP_RETURNED_VALUE Change_WifiKey - } Change_WifiSsid(){ From 7560c253af4ef52041db55a76e07908638d7bc12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:52:23 +0200 Subject: [PATCH 078/109] v9.4 - DietPi-Patches | Syntax --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index bb8669cd4f..a1eba3fbce 100755 --- a/.update/patches +++ b/.update/patches @@ -1561,7 +1561,7 @@ Patch_9_3() Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if (( $G_HW_MODEL =~ ^(40|44|45|48|56|57||59||60|64|65|67|76|83|88|89|90)$ )) + if [[ $G_HW_MODEL =~ ^(40|44|45|48|56|57||59||60|64|65|67|76|83|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v From e1eca1b71961e2d87439c97847509810cfb71745 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:54:59 +0200 Subject: [PATCH 079/109] v9.4 - CHANGELOG | Add entry about solved NanoPi NEO3 issue --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4841de64c0..a9f98a1d39 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,6 +14,7 @@ Enhancements: - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: +- NanoPi NEO3 | Resolved an issue where the Ethernet adapter was not available after reboots. Many thanks to @murraythegoz for reporting this issue: https://github.com/MichaIng/DietPi/issues/6987 - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. From be3dacebff7eb2780e6da833f4b56dbd2a983c05 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:56:12 +0200 Subject: [PATCH 080/109] v9.4 - DietPi-Patches | Coding --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index a1eba3fbce..56dc3a70af 100755 --- a/.update/patches +++ b/.update/patches @@ -1561,7 +1561,7 @@ Patch_9_3() Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if [[ $G_HW_MODEL =~ ^(40|44|45|48|56|57||59||60|64|65|67|76|83|88|89|90)$ ]] + if [[ $G_HW_MODEL =~ ^(40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v From 13898a20a0321ba4267efdfeaf0d8a5401b6a62f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 23:00:57 +0200 Subject: [PATCH 081/109] v9.4 - RC up --- .update/version | 2 +- CHANGELOG.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index e2d57b846a..eaecf7dfba 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=4 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a9f98a1d39..6a019a13ea 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.4 -(2024-05-12) +(2024-05-11) New images: - ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 From 2a97ec8e0d6c03710d62949c4fa71ecd42c3b650 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 23:10:43 +0200 Subject: [PATCH 082/109] v9.4 - DietPi-Globals | Update default RC version --- dietpi/func/dietpi-globals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 314e3c3089..403bdf85b8 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 6768bee4483c3a9d38a38a515dbc85ef754fb0da Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 7 May 2024 02:35:03 +0200 Subject: [PATCH 083/109] v9.4 - DietPi-Pre-patches | Typo --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index c041090ab0..92a022d80c 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -425,7 +425,7 @@ then elif apt-mark showauto | grep '^initramfs-tools$' then - G_AGI tiny-initamfs + G_AGI tiny-initramfs G_AGP initramfs-tools # ToDo: Remove existing initramfs images in /boot/initrd-* and /boot/firmware/initramfs* fi From 3edba117009e12fa276f178608d2ec6ac8c3e143 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 7 May 2024 14:01:13 +0200 Subject: [PATCH 084/109] v9.4 - DietPi-Software | frp: Update fallback URL and use new ARM hard-float build on ARMv6/7 --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9cac6e1e92..f50b3b76bf 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6509,11 +6509,11 @@ _EOF_ 3) local arch='arm64';; 10) local arch='amd64';; 11) local arch='riscv64';; - *) local arch='arm';; + *) local arch='arm_hf';; esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.57.0/frp_0.57.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.0/frp_0.58.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* From e9bcca66de033b7ff0b1cda389cea0e73a54a9e7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 7 May 2024 17:22:53 +0200 Subject: [PATCH 085/109] v9.4 - DietPi-Software | Remote.It: Update device registratio docs URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f50b3b76bf..f580d9a8ba 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6371,7 +6371,7 @@ _EOF_ G_WHIP_MSG "[ INFO ] The installation of Remote.It is complete. \nThe final step is to register your claim code with your desktop application. See the manual below for instructions on how to do this. -\nhttps://docs.remote.it/software/device-package/installation#3.-claim-and-register-the-device +\nhttps://docs.remote.it/software/device-package/installation#id-3.-claim-and-register-the-device \nYour claim code: $(mawk -F\" '/claim/{print $4}' /etc/remoteit/config.json) \nThen this DietPi device will be online as your Remote.It device and you can start using it." From d02b59513f6032eaa59a3b2b6f6df0064b0f10fb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 13:25:19 +0200 Subject: [PATCH 086/109] v9.4 - DietPi-Software | Syncthing: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f580d9a8ba..47060c7dae 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8917,7 +8917,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.6/syncthing-linux-$arch-v1.27.6.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.7/syncthing-linux-$arch-v1.27.7.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi From 56770e91aa484c3fbc6cc4006abf2f2e75162555 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 13:56:15 +0200 Subject: [PATCH 087/109] v9.4 - CHANGELOG | Add v9.4 PR URL --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6a019a13ea..1798547579 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,7 +21,7 @@ Bug fixes: - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. - DietPi-Software | X.Org X Server: Resolved an issue where an important config file might have been missing on RPi 5 and potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 -As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME +As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/7063 ----------------------------------------------------------------------------------------------------------- From c7a7975f680fe48e2998a138af0f04dbe8e39685 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 22:49:30 +0200 Subject: [PATCH 088/109] v9.4 - CI | Armbian: Add own version suffix for packages --- .github/workflows/armbian.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 329064ee06..221335980b 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -65,6 +65,31 @@ jobs: git fetch origin main git rebase origin/main fi + - name: Obtain version suffix + run: | + cd build + read -r version < VERSION + case '${{ github.event.inputs.asset }}' in + firmware) package='armbian-firmware';; + uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.board }}';; + kernel) + family=$(. 'config/boards/${{ github.event.inputs.board }}.'* &> /dev/null; echo "$BOARDFAMILY") + echo "Board family is: $family" + family=$(BRANCH='${{ github.event.inputs.branch }}'; . "config/sources/families/$family.conf" &> /dev/null; echo "$LINUXFAMILY") + echo "Linux family is: $family" + package="linux-image-${{ github.event.inputs.branch }}-$family" + ;; + *) echo 'ERROR: Invalid asset "${{ github.event.inputs.asset }}"'; exit 1;; + esac + curl -fO "https://dietpi.com/downloads/binaries/$package.deb" + cur_version=$(dpkg-deb -f "$package.deb" Version) + rm "$package.deb" + cur_suffix=${cur_version#*-dietpi} + echo "Current package version is: $cur_version" + echo "New Armbian version is: $version" + [ "$version-dietpi$cur_suffix" = "$cur_version" ] && version="$version-dietpi$((cur_suffix+1))" || version="$version-dietpi1" + echo "New package version will be: $version" + echo "version" > VERSION - name: Build asset run: | cd build From 1f60b87c5e99b70733a2cc45631d4d57d491e3a0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 22:57:41 +0200 Subject: [PATCH 089/109] v9.4 (#7064) - Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots. --- .build/images/dietpi-build | 3 +-- .build/images/dietpi-installer | 15 +++------------ .github/workflows/dietpi-build.yml | 3 +-- .update/patches | 14 ++++++++++++++ CHANGELOG.txt | 1 + 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index e8af5b05ae..c13fbf7041 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -136,8 +136,7 @@ case $HW_MODEL in 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 81) iname='VisionFive2' HW_ARCH=11 root_size=639;; 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - '83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; - '83.2') iname='OrangePiZero3-1.5G' HW_ARCH=3 partition_start=4 root_size=1148;; + 83) iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; 84) iname='Star64' HW_ARCH=11 root_size=639;; 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 063da44e33..289cf0cc13 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -423,8 +423,7 @@ _EOF_ '89' ': Orange Pi 3 LTS' '80' ': Orange Pi 5' '82' ': Orange Pi 5 Plus' - '83.1' ': Orange Pi Zero 3' - '83.2' ': Orange Pi Zero 3 (1.5 GB RAM)' + '83' ': Orange Pi Zero 3' '88' ': Orange Pi Zero 2W' '86' ': ASUS Tinker Board 2' '23' ': Generic Rockchip RK3328' @@ -724,7 +723,6 @@ setenv rootuuid "true"' /boot/boot.cmd # Device tree case $G_HW_MODEL in 45) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h6-pine-h64-model-b.dtb' /boot/dietpiEnv.txt;; - 83) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb' /boot/dietpiEnv.txt;; 88) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero2w.dtb' /boot/dietpiEnv.txt;; *) :;; esac @@ -1177,15 +1175,8 @@ _EOF_ G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb G_EXEC rm package.deb fi - # Orange Pi Zero 3 1.5G RAM variant: Install original Orange Pi bootloader - if (( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 2 )) - then - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-u-boot-orangepizero3-next_1.5G.deb' - G_AGI linux-{image,dtb}-"$branch-$kernel" ./package.deb - G_EXEC rm package.deb - else - G_AGI linux-{image,dtb}-"$branch-$kernel" "linux-u-boot-$model-$branch" - fi + # Install kernel and bootloader + G_AGI linux-{image,dtb}-"$branch-$kernel" "linux-u-boot-$model-$branch" # Cleanup [[ $G_HW_MODEL != 10 && -f '/boot/uImage' ]] && G_EXEC rm /boot/uImage [[ -f '/boot/.next' ]] && G_EXEC rm /boot/.next diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 601b6a1291..273bc1a334 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -86,8 +86,7 @@ jobs: '"-m 80 -d 6", "-m 80 -d 7", "-m 80 -d 8", '\ '"-m 81 -d 8", '\ '"-m 82 -d 6", "-m 82 -d 7", "-m 82 -d 8", '\ - '"-m 83.1 -d 6", "-m 83.1 -d 7", "-m 83.1 -d 8", '\ - '"-m 83.2 -d 6", "-m 83.2 -d 7", "-m 83.2 -d 8", '\ + '"-m 83 -d 6", "-m 83 -d 7", "-m 83 -d 8", '\ '"-m 84 -d 8", '\ '"-m 85 -d 6", "-m 85 -d 7", "-m 85 -d 8", '\ '"-m 86 -d 6", "-m 86 -d 7", "-m 86 -d 8", '\ diff --git a/.update/patches b/.update/patches index 56dc3a70af..d489497e72 100755 --- a/.update/patches +++ b/.update/patches @@ -1569,6 +1569,20 @@ Patch_9_4() (( $G_AGUP_COUNT )) && G_AGUG fi + # Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938 + if (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null + then + G_DIETPI-NOTIFY 2 'Switching to new U-Boot build which fixes lost Ethernet adapter on reboot ...' + G_AGP linux-u-boot-orangepizero3-next + G_AGI linux-u-boot-orangepizero3-current + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh + # Do not mute progress and error messages + eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" + # shellcheck disable=SC2154 + write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")" + fi + if [[ -f '/boot/dietpi/.installed' ]] then # GMediaRender diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1798547579..2e540f0ba3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -15,6 +15,7 @@ Enhancements: Bug fixes: - NanoPi NEO3 | Resolved an issue where the Ethernet adapter was not available after reboots. Many thanks to @murraythegoz for reporting this issue: https://github.com/MichaIng/DietPi/issues/6987 +- Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots. - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. From f0b049001bd8197b353c4f59a413653a9bd08bab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 23:12:42 +0200 Subject: [PATCH 090/109] v9.4 - CI | Armbian: Typo --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 221335980b..47c4fac0fd 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -89,7 +89,7 @@ jobs: echo "New Armbian version is: $version" [ "$version-dietpi$cur_suffix" = "$cur_version" ] && version="$version-dietpi$((cur_suffix+1))" || version="$version-dietpi1" echo "New package version will be: $version" - echo "version" > VERSION + echo "$version" > VERSION - name: Build asset run: | cd build From 03b8282751f6020a116809314868aa589b395b7b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 00:06:10 +0200 Subject: [PATCH 091/109] v9.4 - DietPi-Set_hardware | Fix condition for Raspberry Pi check, to avoid (visual-only) failure when non-RPi devices enable Bluetooth --- dietpi/func/dietpi-set_hardware | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 492bf545e1..dc70037ac1 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1240,9 +1240,9 @@ Do you want to continue and disable the serial login console?' || return 1 G_EXEC systemctl enable --now bluetooth # RPi - if (( $G_HW_MODEL > 9 )) + if (( $G_HW_MODEL < 10 )) && (( $G_HW_ONBOARD_WIFI )) then - (( $G_HW_ONBOARD_WIFI )) && G_EXEC systemctl enable hciuart + G_EXEC systemctl enable hciuart # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] From 101401b7536b00a2f6bddcee1c052ca836ee1352 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 13:36:30 +0200 Subject: [PATCH 092/109] v9.4 - CI | Skip APT dist/full-upgrade on ARMv6/7 Trixie systems, until time_t transition has finished, as the repo currently contains dependency conflicts - CI | Amiberry: Shutdown system if first run setup failed, and print debug info --- .build/software/Amiberry/container_build.bash | 6 ++++++ .build/software/dietpi-software-build.bash | 3 +++ .github/workflows/dietpi-software.bash | 3 +++ 3 files changed, 12 insertions(+) diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index ec02d67c2c..ef5063d4a9 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -116,6 +116,9 @@ G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsup # Workaround for failing IPv4 network connectivity check as GitHub Actions runners do not receive external ICMP echo replies G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=127.0.0.1' rootfs/boot/dietpi.txt +# Shutdown on failures before the custom script is executed +G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login + # Avoid DietPi-Survey uploads to not mess with the statistics G_EXEC rm rootfs/root/.ssh/known_hosts @@ -134,6 +137,9 @@ Pin-Priority: -1 _EOF_ fi +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade + # Automated build cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh || Error_Exit 'Failed to generate Automation_Custom_Script.sh' echo '[ INFO ] Running Amiberry build script ...' diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index b29492cb9c..922283360b 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -129,6 +129,9 @@ G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tu # Avoid DietPi-Survey uploads to not mess with the statistics G_EXEC rm rootfs/root/.ssh/known_hosts +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade + # Automated build cat << _EOF_ > rootfs/boot/Automation_Custom_Script.sh || Error_Exit 'Failed to generate Automation_Custom_Script.sh' #!/bin/dash diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index d735537fa5..397e94220d 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -368,6 +368,9 @@ G_EXEC eval 'echo -e '\''[Service]\nAmbientCapabilities='\'' > rootfs/etc/system # Workaround for sysctl: permission denied on key "net.core.rmem_max" in containers G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/a\sed -i '\''/G_EXEC sysctl -w net\.core\.rmem_max/d'\'' /boot/dietpi/dietpi-software' rootfs/boot/dietpi/dietpi-login +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade + # Check for service status, ports and commands # shellcheck disable=SC2016 # - Start all services From d2251bb4b93af6385b32a07f3c1a3a8ebe09dae1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 15:26:46 +0200 Subject: [PATCH 093/109] v9.4 - Raspberry Pi | On images with new kernel/firmware stack, remove left over initramfs images, and skip it in pre-patches, if any initramfs implementation was manually installed. --- .build/images/dietpi-installer | 2 ++ .update/pre-patches | 18 ++++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 289cf0cc13..001d06a338 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1284,6 +1284,8 @@ _EOF_ G_AGI raspi-firmware G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware G_AGI "${kernel[@]}" raspi-utils raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs + G_EXEC apt-mark auto tiny-initramfs + G_EXEC rm -f /boot/initrd.img-* /boot/firmware/initramfs* else G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" fi diff --git a/.update/pre-patches b/.update/pre-patches index 92a022d80c..11fbb5afe4 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -415,20 +415,14 @@ fi # v9.4 if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 4 ) )) then - if (( $G_HW_MODEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null + if (( $G_HW_MODEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null && ! apt-mark showmanual | grep -E '^(initramfs-tools|dracut|tiny-initramfs)(-core)?$' then - # Satisfy upcoming initramfs dependency of new kernel packages with slim tiny-initramfs: https://github.com/RPi-Distro/repo/issues/358 + G_DIETPI-NOTIFY 2 'Satisfying initramfs package dependency of raspi-firmware with tiny-initramfs' # https://github.com/RPi-Distro/repo/issues/358 G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware - if ! dpkg-query -s 'initramfs-tools' &> /dev/null - then - G_AGI tiny-initramfs - - elif apt-mark showauto | grep '^initramfs-tools$' - then - G_AGI tiny-initramfs - G_AGP initramfs-tools - # ToDo: Remove existing initramfs images in /boot/initrd-* and /boot/firmware/initramfs* - fi + G_AGI tiny-initramfs + G_EXEC apt-mark auto tiny-initramfs + G_AGP initramfs-tools + G_EXEC rm -f /boot/initrd.img-* /boot/firmware/initramfs* fi fi From 0c53d73dc6e021058b39a5e3109013ff3e89c321 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 16:11:51 +0200 Subject: [PATCH 094/109] v9.4 - CI | Armbian: Allow current package download to fail, since we do not host all of them yet --- .github/workflows/armbian.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 47c4fac0fd..ab86ec4f0c 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -81,11 +81,13 @@ jobs: ;; *) echo 'ERROR: Invalid asset "${{ github.event.inputs.asset }}"'; exit 1;; esac - curl -fO "https://dietpi.com/downloads/binaries/$package.deb" - cur_version=$(dpkg-deb -f "$package.deb" Version) - rm "$package.deb" - cur_suffix=${cur_version#*-dietpi} - echo "Current package version is: $cur_version" + if curl -fO "https://dietpi.com/downloads/binaries/$package.deb" + then + cur_version=$(dpkg-deb -f "$package.deb" Version) + rm "$package.deb" + cur_suffix=${cur_version#*-dietpi} + echo "Current package version is: $cur_version" + fi echo "New Armbian version is: $version" [ "$version-dietpi$cur_suffix" = "$cur_version" ] && version="$version-dietpi$((cur_suffix+1))" || version="$version-dietpi1" echo "New package version will be: $version" From a8ef0d7e8b3db0a59cb51e3067ff196e96f4db61 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 01:41:05 +0200 Subject: [PATCH 095/109] v9.4 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index eaecf7dfba..dfc5291528 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=4 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 403bdf85b8..0c51d713cc 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From b1cbc54ff68a6abbf41295c820d4267359331b7a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 01:52:42 +0200 Subject: [PATCH 096/109] v9.4 (#7067) - Odroid XU4 | Update boot.ini for Linux 6.1/6.6 --- .build/images/OdroidXU4/boot.ini | 87 +++++++------------------------- .build/images/dietpi-installer | 7 +-- .update/patches | 21 +++++--- CHANGELOG.txt | 1 + dietpi/dietpi-config | 14 ++--- dietpi/func/dietpi-set_hardware | 22 +++++++- dietpi/func/dietpi-set_software | 1 + 7 files changed, 60 insertions(+), 93 deletions(-) diff --git a/.build/images/OdroidXU4/boot.ini b/.build/images/OdroidXU4/boot.ini index efcbd66771..e86febe9f7 100644 --- a/.build/images/OdroidXU4/boot.ini +++ b/.build/images/OdroidXU4/boot.ini @@ -4,24 +4,25 @@ ODROIDXU-UBOOT-CONFIG setenv initrd_high "0xffffffff" setenv fdt_high "0xffffffff" -# MAC address configuration -setenv macaddr "00:1e:06:61:7a:72" - # Kernel command-line parameters setenv bootrootfs "root=/dev/mmcblk0p1 rootfstype=ext4 rootwait ro console=ttySAC2,115200n8 console=tty1 consoleblank=0 net.ifnames=0" -# HDMI/DVI selection: "hdmi" or "dvi" -# - DVI mode disables HDMI sound -setenv vout "hdmi" - -# HDMI Hot Plug Detect -# - "false" disables auto-detection and forces HDMI output. -# - "true" enables HDMI detection based on cable connection. -setenv HPD "true" - # HDMI CEC: "false" or "true", defaults to "true" #setenv cecenable "true" +# Disable ODROID-VU7 touchscreen support: "false" or "true", defaults to "true" +#setenv disable_vu7 "true" + +# ODROID CloudShell 2 TFT LCD and FAN control via I2C bus: "false" or "true", defaults to "false" +#setenv cs2enable "false" + +# Device tree overlays +# - See /boot/dtb/overlays or /boot/dtb for available overlays (*.dtbo files): defaults to empty string "" +#setenv overlays "i2c0" + +# DDR frequency [MHz]: "633", "728", "825" or "933", defaults to "825" +#setenv ddr_freq "825" + # HDMI resolution # - Uncomment only ONE line! Leave all commented for automatic selection. # - Uncomment only the setenv line! @@ -123,71 +124,21 @@ setenv HPD "true" #setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x800.bin" # ----------------------------------------------- -# Disable ODROID-VU7 touchscreen support: "false" or "true", defaults to "true" -#setenv disable_vu7 "true" - -# ODROID CloudShell 2 TFT LCD and FAN control via I2C bus: "false" or "true", defaults to "false" -#setenv cs2enable "false" - -# Device tree overlays -# - See /boot/dtb/overlays for available overlays: defaults to empty string "" -#setenv overlays "i2c0" - -# CPU governor -# - DietPi will override this setting to user configured in dietpi-config > Performance Options > CPU governor -setenv governor "performance" - -# DDR frequency [MHz]: "633", "728", "825" or "933", defaults to "825" -#setenv ddr_freq "825" - -# TMDS data amplitude control. -# - 1LSB corresponds to 20 mVdiff amplitude level -# - tx_amp_lvl : 0 = 760 mVdiff(Min), 31 = 1380 mVdiff(Max) -# - Hardkernel default: hdmi_tx_amp_lvl = 31(1380 mVdiff) -setenv hdmi_tx_amp_lvl "31" - -# TMDS data amplitude fine control for each channel -# - 1LSB corresponds to 20 mVdiff amplitude level -# - tx_lvl : 0 = 0 mVdiff(Min), 3 = 60 mVdiff(Max) -# - Hardkernel default: hdmi_tx_lvl_ch0=hdmi_tx_lvl_ch1=hdmi_tx_lvl_ch2 = 3 -setenv hdmi_tx_lvl_ch0 "3" -setenv hdmi_tx_lvl_ch1 "3" -setenv hdmi_tx_lvl_ch2 "3" - -# TMDS data pre-emphasis level control -# - 1LSB corresponds to -0.45dB emphasis level except for 1 -# - tx_emp_lvl : 0 = 0 db(Min), 1 = -0.25 db, 2 = 0.7 db, 15 = -7.45 db(Max) -# - Hardkernel default: hdmi_tx_emp_lvl = 6 (-2.50 db) -setenv hdmi_tx_emp_lvl "6" - -# TMDS clock amplitude control -# - 1LSB corresponds to 20 mVdiff amplitude level. -# - clk_amp_lvl : 0 = 790 mVdiff(Min), 31 = 1410 mVdiff(Max) -# - Hardkernel default hdmi_clk_amp_lvl = 31 (1410 mVdiff) -setenv hdmi_clk_amp_lvl "31" - -# TMDS data source termination resistor control -# - tx_res : 0 = Source Termination OFF(Min), 1 = 200 ohm, 2 = 300 ohm, 3 = 120 ohm(Max) -# - Hardkernel default hdmi_tx_res = 0 (Source Termination OFF) -setenv hdmi_tx_res "0" - ### DO NOT EDIT ANYTHING BELOW THIS LINE ### -setenv hdmi_phy_control "hdmi_tx_amp_lvl=${hdmi_tx_amp_lvl} hdmi_tx_lvl_ch0=${hdmi_tx_lvl_ch0} hdmi_tx_lvl_ch1=${hdmi_tx_lvl_ch1} hdmi_tx_lvl_ch2=${hdmi_tx_lvl_ch2} hdmi_tx_emp_lvl=${hdmi_tx_emp_lvl} hdmi_clk_amp_lvl=${hdmi_clk_amp_lvl} hdmi_tx_res=${hdmi_tx_res} HPD=${HPD} vout=${vout}" - # Load kernel, initrd and dtb in that sequence -ext4load mmc 0:1 0x40008000 /boot/zImage || fatload mmc 0:1 0x40008000 zImage || ext4load mmc 0:1 0x40008000 zImage -ext4load mmc 0:1 0x42000000 /boot/uInitrd || fatload mmc 0:1 0x42000000 uInitrd || ext4load mmc 0:1 0x42000000 uInitrd +load mmc 0:1 0x40008000 /boot/zImage || load mmc 0:1 0x40008000 zImage +load mmc 0:1 0x42000000 /boot/uInitrd || load mmc 0:1 0x42000000 uInitrd if test "${board_name}" = "xu4"; then setenv fdtfile "exynos5422-odroidxu4.dtb"; fi if test "${board_name}" = "xu3"; then setenv fdtfile "exynos5422-odroidxu3.dtb"; fi if test "${board_name}" = "xu3l"; then setenv fdtfile "exynos5422-odroidxu3-lite.dtb"; fi if test "${board_name}" = "hc1"; then setenv fdtfile "exynos5422-odroidhc1.dtb"; fi -ext4load mmc 0:1 0x44000000 /boot/dtb/${fdtfile} || fatload mmc 0:1 0x44000000 dtb/${fdtfile} || ext4load mmc 0:1 0x44000000 dtb/${fdtfile} +load mmc 0:1 0x44000000 /boot/dtb/${fdtfile} || load mmc 0:1 0x44000000 dtb/${fdtfile} # Set FDT address fdt addr 0x44000000 -if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi +if test "${cecenable}" = "false"; then fdt rm /soc/cec@101b0000; fi if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi # Add overlays for CloudShell @@ -205,7 +156,7 @@ fi if test "x${overlays}" != "x"; then fdt resize 8192 for overlay in ${overlays}; do - ext4load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || fatload mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo || ext4load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo + load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo fdt apply 0x60000000 done fi @@ -214,7 +165,7 @@ fi if test "x${ddr_freq}" != "x"; then dmc "${ddr_freq}"; fi # Final boot args (DRM debugging: drm.debug=0xff) -setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control} ${hid_quirks}" +setenv bootargs "${bootrootfs} ${videoconfig} ${hid_quirks}" # Boot the board bootz 0x40008000 0x42000000 0x44000000 diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 001d06a338..4eb8b9588a 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1186,12 +1186,7 @@ _EOF_ # Compile U-Boot script [[ -f '/boot/boot.cmd' ]] && G_EXEC mkimage -C none -A "$arch" -T script -d /boot/boot.cmd /boot/boot.scr # Flash U-Boot - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - # - Do not mute progress and error messages - eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" - # shellcheck disable=SC2154 - write_uboot_platform "$DIR" "$BOOT_DEVICE" + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc "$BOOT_DEVICE" # Odroid C1 cleanup: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 if (( $G_HW_MODEL == 10 )) diff --git a/.update/patches b/.update/patches index d489497e72..973ed5f67d 100755 --- a/.update/patches +++ b/.update/patches @@ -1561,7 +1561,7 @@ Patch_9_3() Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if [[ $G_HW_MODEL =~ ^(40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]] + if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v @@ -1569,18 +1569,23 @@ Patch_9_4() (( $G_AGUP_COUNT )) && G_AGUG fi + # Odroid XU4 + if (( $G_HW_MODEL == 11 )) + then + G_DIETPI-NOTIFY 2 'Migrating boot.ini to support new Linux 6.6 device tree overlay locations' + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + # shellcheck disable=SC2016 + G_EXEC sed -i '\|/boot/dtb/overlays/${overlay}.dtbo|c load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo' /boot/boot.ini + G_DIETPI-NOTIFY 2 'Fixing CEC toggle in boot.ini' + G_EXEC sed -i 's|rm /cec@101B0000;|rm /soc/cec@101b0000;|' /boot/boot.ini + # Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938 - if (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null + elif (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null then G_DIETPI-NOTIFY 2 'Switching to new U-Boot build which fixes lost Ethernet adapter on reboot ...' G_AGP linux-u-boot-orangepizero3-next G_AGI linux-u-boot-orangepizero3-current - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - # Do not mute progress and error messages - eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" - # shellcheck disable=SC2154 - write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")" + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc fi if [[ -f '/boot/dietpi/.installed' ]] diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2e540f0ba3..93e83feb40 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. - Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. +- Odroid XU4 | The kernel will be upgraded to Linux 6.6. - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 35e9c1bb13..cff560b470 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1050,8 +1050,8 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the # Armbian U-Boot update if [[ -f '/usr/lib/u-boot/platform_install.sh' ]] then - local rootdev=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") - G_WHIP_MENU_ARRAY+=('Update MMC bootloader' ": Flash current U-Boot to $rootdev") + local bootdev=$(lsblk -npo PKNAME "$(findmnt -Ufnro SOURCE -T /boot)") + G_WHIP_MENU_ARRAY+=('Update MMC bootloader' ": Flash current U-Boot to $bootdev") fi # RPi 4/5 EEPROM update: https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md @@ -1214,14 +1214,9 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr elif [[ $G_WHIP_RETURNED_VALUE == 'Update MMC bootloader' ]]; then G_WHIP_YESNO "[ INFO ] MMC bootloader update -\nThis will flash the U-Boot image of the installed linux-u-boot-* package to the MMC device $rootdev. +\nThis will flash the U-Boot image of the installed linux-u-boot-* package to the MMC device $bootdev. \nDo you want to continue?" || return 0 - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - # Do not mute progress and error messages - eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" - # shellcheck disable=SC2154 - write_uboot_platform "$DIR" "$rootdev" + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc "$bootdev" elif [[ $G_WHIP_RETURNED_VALUE == 'Update SPI bootloader' ]]; then @@ -1261,6 +1256,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr \nDo you want to continue?' || return 0 # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh + # shellcheck disable=SC2154 [[ -f $DIR/rkspi_loader.img ]] || { G_WHIP_MSG "[FAILED] SPI U-Boot image missing\n\nThe expected U-Boot image at $DIR/rkspi_loader.img could not be found. Please report this to our GitHub or forum, so we can check back and in case update this dietpi-config option."; return 1; } # shellcheck disable=SC2154 G_EXEC_OUTPUT=1 G_EXEC dd if="$DIR/rkspi_loader.img" of=/dev/mtdblock0 oflag=direct conv=notrunc status=progress diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index dc70037ac1..1cf1e5a6de 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -30,8 +30,9 @@ $FP_SCRIPT rpi-camera enable/disable $FP_SCRIPT rpi-codec enable/disable $FP_SCRIPT rpi-opengl vc4-kms-v3d/vc4-fkms-v3d/disable $FP_SCRIPT rpi3_usb_boot enable -$FP_SCRIPT rpi-eeprom Update RPi 4 EEPROM bootloader and USB firmware +$FP_SCRIPT rpi-eeprom Update RPi 4/5 EEPROM bootloader and USB firmware $FP_SCRIPT vf2-spi-update Update StarFive VisionFive 2 SPI bootloader +$FP_SCRIPT flash-u-boot-mmc [] Flash U-Boot binary to eMMC/SD card, taking device path as optional argument, else flashes to /boot drive $FP_SCRIPT gpudriver none|intel|nvidia|amd|custom $FP_SCRIPT qemu-guest-agent|qga enable/disable " #//////////////////////////////////// @@ -215,7 +216,7 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// RPi_EEPROM() { - (( $G_HW_MODEL > 3 )) || { Unsupported_Input_Name; return 1; } # Exit path for non-RPi 4/5 + (( $G_HW_MODEL > 3 && $G_HW_MODEL < 10 )) || { Unsupported_Input_Name; return 1; } # Exit path for non-RPi 4/5 # Install required APT package G_AG_CHECK_INSTALL_PREREQ rpi-eeprom @@ -243,6 +244,22 @@ _EOF_ G_EXEC rm u-boot-spl.bin.normal.out visionfive2_fw_payload.img } + #///////////////////////////////////////////////////////////////////////////////////// + # flash-u-boot-mmc + #///////////////////////////////////////////////////////////////////////////////////// + Flash_U-Boot_MMC() + { + [[ -f '/usr/lib/u-boot/platform_install.sh' ]] || { G_DIETPI-NOTIFY 1 'Flash script /usr/lib/u-boot/platform_install.sh not found. Aborting ...'; return 1; } + [[ $INPUT_DEVICE_VALUE ]] || INPUT_DEVICE_VALUE=$(lsblk -npo PKNAME "$(findmnt -Ufnro SOURCE -T /boot)") + [[ -b $INPUT_DEVICE_VALUE ]] || { G_DIETPI-NOTIFY 1 "Block device \"$INPUT_DEVICE_VALUE\" not found. Aborting ..."; return 1; } + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh || return 1 + # Do not mute progress and error messages + eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" + # shellcheck disable=SC2154 + write_uboot_platform "$DIR" "$rootdev" + } + #///////////////////////////////////////////////////////////////////////////////////// # gpumemsplit #///////////////////////////////////////////////////////////////////////////////////// @@ -2381,6 +2398,7 @@ _EOF_ 'rpi3_usb_boot') RPi_USB_Boot_Main;; 'rpi-eeprom') RPi_EEPROM;; 'vf2-spi-update') VF2_SPI_Update;; + 'flash-u-boot-mmc') Flash_U-Boot_MMC || EXIT_CODE=1;; 'headless') Headless_Main;; 'gpudriver') GPUDriver_Main;; 'qemu-guest-agent'|'qga') QEMU_Guest_Agent_Main;; diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 1d2ba000e6..929d90b182 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -123,6 +123,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R case $G_HW_MODEL in [0-9]) all_components='rpi';; 10) all_components='odroidc1';; + 11) all_components='odroidxu4';; 40) all_components='pinea64';; 44) all_components='pinebook';; 45) all_components='pineh64';; From 5d137607bb10e98ff190899dd8f65813d0a6e720 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 02:06:43 +0200 Subject: [PATCH 097/109] v9.4 - CHANGELOG | Add missing dietpi-config bug fix entry --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 93e83feb40..253b05b59a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,7 @@ Bug fixes: - Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots. - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 +- DietPi-Config | Resolved a visual-only failure message on non-RPi systems, when enabling Bluetooth, and an actual failure doing so on Orange Pi Zero 3, Orange Pi 3B and Orange Pi Zero 2W, since the required kernel module "sprdbt_tty" was not loaded. Many thanks to @b9AcE for reporting this issue: https://dietpi.com/forum/t/19929/45 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. - DietPi-Software | X.Org X Server: Resolved an issue where an important config file might have been missing on RPi 5 and potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 From 0ab8c429a4cfbb5f0565943acbb09841d704719d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 18:56:55 +0200 Subject: [PATCH 098/109] v9.4 - DietPi-Patches | Fix syntax for replacing overlay load commands, to assure indentation - DietPi-Set_hardware | Fix variable name for flashing U-Boot t SD/eMMC - DietPi-CloudShell | On Odroid XU4, when using the CloudShell 2 LCD, during configured auto screen off times, the backlight power of the LCD will be disabled as well, to safe energy and avoid still visible black display content. Many thanks to @smac for suggesting this enhancement: https://dietpi.com/forum/t/15331/55 - DietPi-Config | Added an option to the LCD display menu to toggle the Odroid XU4 CloudShell 2 LCD. - DietPi-Config | Fix detection for Odroid IR remote state - DietPi-Set_hardware | Cleanup Odroid LCD and IR functions, remove handling/config of kernel modules which do not exist anymore since Linux 5.4 --- .update/patches | 7 +- CHANGELOG.txt | 2 + dietpi/dietpi-cloudshell | 5 ++ dietpi/dietpi-config | 9 ++- dietpi/func/dietpi-set_hardware | 116 +++++++++++++++----------------- 5 files changed, 72 insertions(+), 67 deletions(-) diff --git a/.update/patches b/.update/patches index 973ed5f67d..45deca45e0 100755 --- a/.update/patches +++ b/.update/patches @@ -1575,9 +1575,12 @@ Patch_9_4() G_DIETPI-NOTIFY 2 'Migrating boot.ini to support new Linux 6.6 device tree overlay locations' /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc # shellcheck disable=SC2016 - G_EXEC sed -i '\|/boot/dtb/overlays/${overlay}.dtbo|c load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo' /boot/boot.ini + G_EXEC sed --follow-symlinks -i '\|/boot/dtb/overlays/${overlay}.dtbo|c\ load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo' /boot/boot.ini G_DIETPI-NOTIFY 2 'Fixing CEC toggle in boot.ini' - G_EXEC sed -i 's|rm /cec@101B0000;|rm /soc/cec@101b0000;|' /boot/boot.ini + G_EXEC sed --follow-symlinks -i 's|rm /cec@101B0000;|rm /soc/cec@101b0000;|' /boot/boot.ini + G_DIETPI-NOTIFY 2 'Cleaning up obsolete configs' + [[ -f '/etc/modprobe.d/odroid-cloudshell.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-cloudshell.conf + G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*(gpioplug-ir-recv|fbtft_device)[[:blank:]]*$/d' /etc/modules # Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938 elif (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 253b05b59a..3d0024d5e9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,8 @@ Enhancements: - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. - Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. - Odroid XU4 | The kernel will be upgraded to Linux 6.6. +- DietPi-CloudShell | On Odroid XU4, when using the CloudShell 2 LCD, during configured auto screen off times, the backlight power of the LCD will be disabled as well, to safe energy and avoid still visible black display content. Many thanks to @smac for suggesting this enhancement: https://dietpi.com/forum/t/15331/55 +- DietPi-Config | Added an option to the LCD display menu to toggle the Odroid XU4 CloudShell 2 LCD. - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: diff --git a/dietpi/dietpi-cloudshell b/dietpi/dietpi-cloudshell index d5927cee6c..1198b1afcf 100755 --- a/dietpi/dietpi-cloudshell +++ b/dietpi/dietpi-cloudshell @@ -53,6 +53,9 @@ setterm --blank 1 --powersave on # Blank after 1 minute as force requires a poke to bring it back up BLANK_SCREEN_ACTIVE=1 + # Odroid XU4 CloudShell 2 backlight + [[ $G_HW_MODEL == 11 && -f '/sys/class/backlight/fb_hktft32/bl_power' ]] && echo 0 > /sys/class/backlight/fb_hktft32/bl_power + # Turn screen on elif (( $BLANK_SCREEN_TIME_HOUR_END == $current_hour )); then @@ -68,6 +71,8 @@ setterm --blank 0 --powersave off BLANK_SCREEN_ACTIVE=0 + # Odroid XU4 CloudShell 2 backlight + [[ $G_HW_MODEL == 11 && -f '/sys/class/backlight/fb_hktft32/bl_power' ]] && echo 1 > /sys/class/backlight/fb_hktft32/bl_power } # Converts a byte int to string, in human readable byte format. diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index cff560b470..f97fc96d59 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -216,11 +216,10 @@ # Remote local odroid_remote_text='Off' local odroid_remote_enabled=0 - if [[ -f '/etc/systemd/system/odroid-remote.service' ]]; then - + if grep -Eq '^[[:blank:]]*(gpio-ir-recv|meson_ir)[[:blank:]]*$' /etc/modules || systemctl -q is-enabled lircd 2> /dev/null + then odroid_remote_text='On' odroid_remote_enabled=1 - fi G_WHIP_MENU_ARRAY+=('10' ": Odroid remote : [$odroid_remote_text]") @@ -260,7 +259,7 @@ else G_WHIP_MENU_ARRAY+=('odroid-lcd35' ': 480x320 panel with touch input') - (( $G_HW_MODEL == 11 )) && G_WHIP_MENU_ARRAY+=('odroid-cloudshell' ': 320x240 panel') + (( $G_HW_MODEL == 11 )) && G_WHIP_MENU_ARRAY+=('odroid-cloudshell' ': 320x240 panel' 'odroid-cloudshell2' ': Odroid XU4 CloudShell 2 LCD') fi @@ -330,7 +329,7 @@ A long (or insufficiently manufactured) cable may required a higher boost settin /boot/dietpi/func/dietpi-set_hardware remoteir none && REBOOT_REQUIRED=1 - elif G_WHIP_YESNO 'This will enable the IR modules, setup Lirc and the Odroid Remote for Odroid C1, C2 and XU4 Cloudshell. + elif G_WHIP_YESNO 'This will enable the IR modules, setup Lirc and the Odroid Remote for Odroid C1, C2 and XU4 CloudShell. \nNB: Other remotes can be configured by running "irrecord" and applying the codes to "/etc/lirc/lircd.conf"\n\nDo you wish to continue?'; then /boot/dietpi/func/dietpi-set_hardware remoteir odroid_remote && REBOOT_REQUIRED=1 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 1cf1e5a6de..f2ad38477b 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -257,7 +257,7 @@ _EOF_ # Do not mute progress and error messages eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" # shellcheck disable=SC2154 - write_uboot_platform "$DIR" "$rootdev" + write_uboot_platform "$DIR" "$INPUT_DEVICE_VALUE" } #///////////////////////////////////////////////////////////////////////////////////// @@ -332,65 +332,52 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # remoteir #///////////////////////////////////////////////////////////////////////////////////// - RemoteIR_Prereqs(){ G_AG_CHECK_INSTALL_PREREQ lirc; } - - RemoteIR_Reset(){ - + RemoteIR_Reset() + { # Disable JustBoom - if (( $G_HW_MODEL < 10 )); then - - if [[ -f '/etc/systemd/system/justboom-ir-mpd.service' ]]; then - + if (( $G_HW_MODEL < 10 )) + then + if [[ -f '/etc/systemd/system/justboom-ir-mpd.service' ]] + then G_EXEC systemctl disable --now justboom-ir-mpd G_EXEC rm /etc/systemd/system/justboom-ir-mpd.service - fi [[ -d '/etc/systemd/system/justboom-ir-mpd.service.d' ]] && G_EXEC rm -R /etc/systemd/system/justboom-ir-mpd.service.d - G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*dtoverlay=gpio-ir/d' /boot/config.txt # Disable Odroids - elif (( $G_HW_MODEL < 20 )); then - - if [[ -f '/etc/systemd/system/odroid-remote.service' ]]; then - - G_EXEC systemctl disable --now odroid-remote - G_EXEC rm /etc/systemd/system/odroid-remote.service - + elif (( $G_HW_MODEL < 20 )) + then + if systemctl -q is-active lircd || systemctl -q is-enabled lircd 2> /dev/null + then + G_EXEC systemctl disable --now lircd fi - [[ -d '/etc/systemd/system/odroid-remote.service.d' ]] && G_EXEC rm -R /etc/systemd/system/odroid-remote.service.d - + G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*(gpio-ir-recv|meson_ir)[[:blank:]]*$/d' /etc/modules fi - } - RemoteIR_Main(){ - + RemoteIR_Main() + { (( $G_HW_MODEL > 19 )) && { Unsupported_Input_Name; return 1; } # Exit path for non-Odroid/non-RPi RemoteIR_Reset - if [[ $INPUT_DEVICE_VALUE == 'odroid_remote' ]]; then - + if [[ $INPUT_DEVICE_VALUE == 'odroid_remote' ]] + then (( $G_HW_MODEL > 9 )) || { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid - RemoteIR_Prereqs - - # XU4 Cloudshell - if (( $G_HW_MODEL == 11 )); then + G_AG_CHECK_INSTALL_PREREQ lirc - # Modules - local string='options gpioplug_ir_recv gpio_nr=24 active_low=1' - G_CONFIG_INJECT "$string" "$string" /etc/modprobe.d/odroid-cloudshell.conf + # Kernel modules + # - XU4 CloudShell + if (( $G_HW_MODEL == 11 )) + then G_CONFIG_INJECT 'gpio-ir-recv' 'gpio-ir-recv' /etc/modules - G_CONFIG_INJECT 'gpioplug-ir-recv' 'gpioplug-ir-recv' /etc/modules - - # C2 - elif (( $G_HW_MODEL == 12 )); then - # Module + # - C2 + elif (( $G_HW_MODEL == 12 )) + then G_CONFIG_INJECT 'meson_ir' 'meson_ir' /etc/modules - fi # Config @@ -433,12 +420,13 @@ _EOF_ # Service G_EXEC systemctl enable --now lircd - elif [[ $INPUT_DEVICE_VALUE == 'justboom_ir_remote' ]]; then - + elif [[ $INPUT_DEVICE_VALUE == 'justboom_ir_remote' ]] + then (( $G_HW_MODEL > 9 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-RPi - RemoteIR_Prereqs + G_AG_CHECK_INSTALL_PREREQ lirc mpc + # Device tree overlay G_CONFIG_INJECT 'dtoverlay=gpio-ir' 'dtoverlay=gpio-ir,gpio_pin=25' /boot/config.txt # Config @@ -490,9 +478,6 @@ begin remote end remote _EOF_ - # MPD control - G_AG_CHECK_INSTALL_PREREQ mpc - cat << '_EOF_' > /root/.lircrc begin prog = irexec @@ -555,12 +540,10 @@ _EOF_ G_EXEC systemctl daemon-reload G_EXEC systemctl enable --now justboom-ir-mpd - elif [[ $INPUT_DEVICE_VALUE != 'none' ]]; then - + elif [[ $INPUT_DEVICE_VALUE != 'none' ]] + then Unknown_Input_Mode - fi - } #///////////////////////////////////////////////////////////////////////////////////// @@ -660,11 +643,13 @@ _EOF_ 'odroid-lcd35') Lcd_Panel_OdroidLCD35_Enable;; 'waveshare32') Lcd_Panel_Waveshare32_Enable;; 'odroid-cloudshell') Lcd_Panel_Odroidcloudshell_Enable;; + 'odroid-cloudshell2') Lcd_Panel_Odroidcloudshell2_Enable;; 'esp01215e') Lcd_Panel_ESP01215E_Enable;; 'allo-boss2-oled') OLED_Allo_Boss2_Enable;; 'none') Lcd_Panel_Waveshare32_Disable Lcd_Panel_Odroidcloudshell_Disable + Lcd_Panel_Odroidcloudshell2_Disable Lcd_Panel_OdroidLCD35_Disable Lcd_Panel_ESP01215E_Disable OLED_Allo_Boss2_Disable @@ -848,23 +833,34 @@ _EOF_ } - # Odroid CloudShell - Lcd_Panel_Odroidcloudshell_Enable(){ - - echo 'options fbtft_device name=hktft9340 busnum=1 rotate=270' > /etc/modprobe.d/odroid-cloudshell.conf - + # Odroid CloudShell: ToDo: Broken after fbtft_device kernel module does not exist anymore with Linux 5.4/6.1/6.6... + Lcd_Panel_Odroidcloudshell_Enable() + { G_CONFIG_INJECT 'spi_s3c64xx' 'spi_s3c64xx' /etc/modules - G_CONFIG_INJECT 'fbtft_device' 'fbtft_device' /etc/modules - echo 'fbtft_device' >> /etc/modules # XU4 4.9 workaround: https://github.com/MichaIng/DietPi/issues/926#issuecomment-299480918 - } - Lcd_Panel_Odroidcloudshell_Disable(){ + Lcd_Panel_Odroidcloudshell_Disable() + { + G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*spi_s3c64xx[[:blank:]]*/d' /etc/modules + } - [[ -f '/etc/modprobe.d/odroid-cloudshell.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-cloudshell.conf - G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*spi_s3c64xx/d' /etc/modules - G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*fbtft_device/d' /etc/modules + # Odroid CloudShell 2 + Lcd_Panel_Odroidcloudshell2_Enable() + { + (( $G_HW_MODEL == 11 )) && { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + # Device tree overlay + G_CONFIG_INJECT 'setenv[[:blank:]]+cs2enable[[:blank:]]' 'setenv cs2enable "true"' /boot/boot.ini 'ODROIDXU-UBOOT-CONFIG' + # udev rule to enable backlight power + G_EXEC eval 'echo '\''SUBSYSTEM=="backlight", KERNEL=="fb_hktft32", ACTION=="add", ATTR{bl_power}="1"'\'' > /etc/udev/rules.d/dietpi-odroid-cloudshell2.rules' + } + Lcd_Panel_Odroidcloudshell2_Disable() + { + (( $G_HW_MODEL == 11 )) && { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + # udev rule to enable backlight power + [[ -f '/etc/udev/rules.d/dietpi-odroid-cloudshell2.rules' ]] && G_EXEC rm /etc/udev/rules.d/dietpi-odroid-cloudshell2.rules + # Device tree overlay + G_CONFIG_INJECT 'setenv[[:blank:]]+cs2enable[[:blank:]]' '#setenv cs2enable "false"' /boot/boot.ini 'ODROIDXU-UBOOT-CONFIG' } # Odroid LCD 3.5 From fd8b25d2576997a82398800c5fc4e54fc4c4278f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 19:20:41 +0200 Subject: [PATCH 099/109] v9.4 - DietPi-Set_hardware | Fix CloudShell 2 device condition --- dietpi/func/dietpi-set_hardware | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index f2ad38477b..4f30d16418 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -847,7 +847,7 @@ _EOF_ # Odroid CloudShell 2 Lcd_Panel_Odroidcloudshell2_Enable() { - (( $G_HW_MODEL == 11 )) && { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + (( $G_HW_MODEL == 11 )) || { Unsupported_Input_Mode; return 1; } # Odroid XU4 only # Device tree overlay G_CONFIG_INJECT 'setenv[[:blank:]]+cs2enable[[:blank:]]' 'setenv cs2enable "true"' /boot/boot.ini 'ODROIDXU-UBOOT-CONFIG' # udev rule to enable backlight power @@ -856,7 +856,7 @@ _EOF_ Lcd_Panel_Odroidcloudshell2_Disable() { - (( $G_HW_MODEL == 11 )) && { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + (( $G_HW_MODEL == 11 )) || { Unsupported_Input_Mode; return 1; } # Odroid XU4 only # udev rule to enable backlight power [[ -f '/etc/udev/rules.d/dietpi-odroid-cloudshell2.rules' ]] && G_EXEC rm /etc/udev/rules.d/dietpi-odroid-cloudshell2.rules # Device tree overlay From 1cb56318ca59f21d8b91b12451570425584b333f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 19:48:21 +0200 Subject: [PATCH 100/109] v9.4 - DietPi-Set_hardware | Reset all LCD settings before applying a new one, so that changes from one to another, without selecting "none" in between, works cleanly. For this, assure that all "Disable" functions are skipped on unsupported SBCs. Also hard fail when calling the "lcdpanel" command or giving an invalid/unsupported LCD name, or if an error-handled command fails. --- dietpi/func/dietpi-set_hardware | 53 +++++++++++++++++---------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 4f30d16418..af4a19e95d 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -639,25 +639,25 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// Lcd_Panel_Main() { + (( $G_HW_MODEL > 19 )) && { Unsupported_Input_Name; return 1; } # Exit path for non-RPi/non-Odroid + + # Reset all LCDs + Lcd_Panel_Waveshare32_Disable + Lcd_Panel_Odroidcloudshell_Disable + Lcd_Panel_Odroidcloudshell2_Disable + Lcd_Panel_OdroidLCD35_Disable + Lcd_Panel_ESP01215E_Disable + OLED_Allo_Boss2_Disable + case $INPUT_DEVICE_VALUE in - 'odroid-lcd35') Lcd_Panel_OdroidLCD35_Enable;; - 'waveshare32') Lcd_Panel_Waveshare32_Enable;; - 'odroid-cloudshell') Lcd_Panel_Odroidcloudshell_Enable;; - 'odroid-cloudshell2') Lcd_Panel_Odroidcloudshell2_Enable;; - 'esp01215e') Lcd_Panel_ESP01215E_Enable;; - 'allo-boss2-oled') OLED_Allo_Boss2_Enable;; - 'none') - Lcd_Panel_Waveshare32_Disable - Lcd_Panel_Odroidcloudshell_Disable - Lcd_Panel_Odroidcloudshell2_Disable - Lcd_Panel_OdroidLCD35_Disable - Lcd_Panel_ESP01215E_Disable - OLED_Allo_Boss2_Disable - ;; - *) - Unknown_Input_Mode - return 1 - ;; + 'odroid-lcd35') Lcd_Panel_OdroidLCD35_Enable || return 1;; + 'waveshare32') Lcd_Panel_Waveshare32_Enable || return 1;; + 'odroid-cloudshell') Lcd_Panel_Odroidcloudshell_Enable || return 1;; + 'odroid-cloudshell2') Lcd_Panel_Odroidcloudshell2_Enable || return 1;; + 'esp01215e') Lcd_Panel_ESP01215E_Enable || return 1;; + 'allo-boss2-oled') OLED_Allo_Boss2_Enable || return 1;; + 'none') :;; + *) Unknown_Input_Mode; return 1;; esac # Update dietpi.txt entry @@ -666,6 +666,8 @@ _EOF_ Lcd_Panel_ESP01215E_Enable(){ + (( $G_HW_MODEL > 9 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-RPi + G_CONFIG_INJECT 'framebuffer_width=' 'framebuffer_width=1024' /boot/config.txt G_CONFIG_INJECT 'framebuffer_height=' 'framebuffer_height=600' /boot/config.txt G_CONFIG_INJECT 'SOFTWARE_CHROMIUM_RES_X=' "SOFTWARE_CHROMIUM_RES_X=1024" /boot/dietpi.txt @@ -715,8 +717,6 @@ _EOF_ Lcd_Panel_Waveshare32_Enable(){ - (( $G_HW_MODEL > 19 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-RPi/non-Odroid - # Disable 1st to reset any existing installations Lcd_Panel_Waveshare32_Disable @@ -836,11 +836,13 @@ _EOF_ # Odroid CloudShell: ToDo: Broken after fbtft_device kernel module does not exist anymore with Linux 5.4/6.1/6.6... Lcd_Panel_Odroidcloudshell_Enable() { + (( $G_HW_MODEL == 11 )) || { Unsupported_Input_Mode; return 1; } # Odroid XU4 only G_CONFIG_INJECT 'spi_s3c64xx' 'spi_s3c64xx' /etc/modules } Lcd_Panel_Odroidcloudshell_Disable() { + (( $G_HW_MODEL == 11 )) || return 0 G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*spi_s3c64xx[[:blank:]]*/d' /etc/modules } @@ -856,7 +858,7 @@ _EOF_ Lcd_Panel_Odroidcloudshell2_Disable() { - (( $G_HW_MODEL == 11 )) || { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + (( $G_HW_MODEL == 11 )) || return 0 # udev rule to enable backlight power [[ -f '/etc/udev/rules.d/dietpi-odroid-cloudshell2.rules' ]] && G_EXEC rm /etc/udev/rules.d/dietpi-odroid-cloudshell2.rules # Device tree overlay @@ -866,7 +868,7 @@ _EOF_ # Odroid LCD 3.5 Lcd_Panel_OdroidLCD35_Enable(){ - (( $G_HW_MODEL > 9 && $G_HW_MODEL < 20 )) || { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid + (( $G_HW_MODEL > 9 )) || { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid # Reset to disabled Lcd_Panel_OdroidLCD35_Disable @@ -970,7 +972,9 @@ EndSection _EOF_ } - Lcd_Panel_OdroidLCD35_Disable(){ + Lcd_Panel_OdroidLCD35_Disable() + { + (( $G_HW_MODEL > 9 )) || return 0 # Skip on non-Odroid [[ -f '/etc/X11/xorg.conf.d/99-calibration.conf' ]] && G_EXEC rm /etc/X11/xorg.conf.d/99-calibration.conf [[ -f '/etc/modprobe.d/odroid-lcd35.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-lcd35.conf @@ -981,7 +985,6 @@ _EOF_ fi [[ -d '/etc/systemd/system/odroid-lcd35.service.d' ]] && G_EXEC rm -R /etc/systemd/system/odroid-lcd35.service.d [[ -f '/etc/X11/xorg.conf.d/99-odroid-lcd35.conf' ]] && G_EXEC rm /etc/X11/xorg.conf.d/99-odroid-lcd35.conf - } OLED_Allo_Boss2_Enable(){ @@ -2384,7 +2387,7 @@ _EOF_ 'wificountrycode') Wifi_Countrycode_Main;; 'i2c') I2c_Main;; 'spi') SPI_Main;; - 'lcdpanel') Lcd_Panel_Main;; + 'lcdpanel') Lcd_Panel_Main || EXIT_CODE=1;; 'rpi-opengl') RPi_OpenGL_Main;; 'eth-forcespeed') Eth_Force_Speed_Main;; 'remoteir') RemoteIR_Main;; From 1e8c0af3c0b693c55e3d1b9fcd47b01b7e51a485 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 23:56:47 +0200 Subject: [PATCH 101/109] v9.4 - APT | Add repo components for all RK3588 SBCs --- .update/patches | 2 +- dietpi/func/dietpi-set_software | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 45deca45e0..85738f9809 100755 --- a/.update/patches +++ b/.update/patches @@ -1561,7 +1561,7 @@ Patch_9_3() Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]] + if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|78|79|80|82|83|85|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 929d90b182..0b6631f002 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -208,9 +208,31 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; esac ;; + 78) all_components='rock5b';; + 79) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 + case $HW_VARIANT in + 1|2) all_components='nanopir6s';; # R6C shares R6S component (and bootloader) for now + 3) all_components='nanopct6';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + # shellcheck disable=SC2043 + [[ $all_components ]] || for i in nano{pi-r6s,pct6} + do + dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue + all_components=${i/-//} + break + done + ;; + esac + ;; + 80) all_components='orangepi5';; 81) all_components='visionfive2';; + 82) all_components='orangepi5plus';; 83) all_components='orangepizero3';; 84) all_components='star64';; + 85) all_components='rock5a';; 88) all_components='orangepizero2w';; 89) all_components='orangepi3lts';; 90) all_components='radxazero3';; From 35c72b15af53c6e2fa196d813e43af335f2b6d48 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 00:23:57 +0200 Subject: [PATCH 102/109] v9.4 - DietPi-CloudShell | Do not disable screen blanking when it has been disabled already --- dietpi/dietpi-cloudshell | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/dietpi/dietpi-cloudshell b/dietpi/dietpi-cloudshell index 1198b1afcf..3d2e91e048 100755 --- a/dietpi/dietpi-cloudshell +++ b/dietpi/dietpi-cloudshell @@ -39,15 +39,13 @@ BLANK_SCREEN_TIME_HOUR_END=0 # This will only work if dietpi-cloudshell was started via dietpi-autostart/dietpi-login, as the setterm power options can only be applied when the command originates from the same terminal without redirects. - RUN_BLANK_SCREEN_AT_SPECIFIC_TIME(){ - + RUN_BLANK_SCREEN_AT_SPECIFIC_TIME() + { local current_hour=$(date '+%-H') # Turn screen off - if (( ! $BLANK_SCREEN_ACTIVE )); then - - (( $BLANK_SCREEN_TIME_HOUR_START == $current_hour )) || return - + if (( ! $BLANK_SCREEN_ACTIVE && $BLANK_SCREEN_TIME_HOUR_START == $current_hour )) + then clear echo -e '\n\nScreen will be powered down in under 1 minute\n' setterm --blank 1 --powersave on # Blank after 1 minute as force requires a poke to bring it back up @@ -57,12 +55,10 @@ [[ $G_HW_MODEL == 11 && -f '/sys/class/backlight/fb_hktft32/bl_power' ]] && echo 0 > /sys/class/backlight/fb_hktft32/bl_power # Turn screen on - elif (( $BLANK_SCREEN_TIME_HOUR_END == $current_hour )); then - + elif (( $BLANK_SCREEN_ACTIVE && $BLANK_SCREEN_TIME_HOUR_END == $current_hour )) + then Disable_Screen_Blanking - fi - } Disable_Screen_Blanking(){ @@ -1504,8 +1500,7 @@ _EOF_ if [[ $G_WHIP_RETURNED_VALUE == 'Toggle' ]];then - ((BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED++)) - (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED > 1 )) && BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED=0 + BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED=$(( ! $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED )) elif [[ $G_WHIP_RETURNED_VALUE == 'Start time' ]];then From a3e0848eb239a62d6da32d31f3de94273d798aec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 14:53:23 +0200 Subject: [PATCH 103/109] v9.4 - RC up - DietPi-Patches | Avoid doubled apt update/upgrade when systems upgrade from before DietPi v9.3 --- .update/patches | 14 +++++++------- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.update/patches b/.update/patches index 85738f9809..2fa977e1d3 100755 --- a/.update/patches +++ b/.update/patches @@ -1546,6 +1546,7 @@ Patch_9_2() fi } +PATCH_9_3_RAN=0 Patch_9_3() { # Purge ancient vmtouch which prevents /boot from being unmounted e.g. for RPi firmware migration: https://github.com/MichaIng/DietPi/issues/6819, https://github.com/MichaIng/DietPi/issues/6976 @@ -1553,20 +1554,19 @@ Patch_9_3() # Add DietPi APT repo /boot/dietpi/func/dietpi-set_software apt-mirror dietpi - G_AGUP -v - # shellcheck disable=SC2154 - (( $G_AGUP_COUNT )) && G_AGUG + G_AGUP + G_AGUG + PATCH_9_3_RAN=1 } Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|78|79|80|82|83|85|88|89|90)$ ]] + if [[ $PATCH_9_3_RAN == 0 && $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|78|79|80|82|83|85|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi - G_AGUP -v - # shellcheck disable=SC2154 - (( $G_AGUP_COUNT )) && G_AGUG + G_AGUP + G_AGUG fi # Odroid XU4 diff --git a/.update/version b/.update/version index dfc5291528..9e903dac26 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=4 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_RC=2 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 0c51d713cc..d3bda29db1 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From d67ced4d9decd1810e3484df1f5d071e72b1a447 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 16:31:21 +0200 Subject: [PATCH 104/109] v9.4 - DietPi config partition | To assure that elsewhere stored and copied config files are treated newer than the ones on the root filesystem, set mtime of those to 1 second after epoch. Set mtime of those on the config partition to 0 seconds after epoch, so, in case they were never touched, they won't be copied. Any (last) edited config file takes hence precedence over the one on the rootfs. Add boot.ini and extlinux.conf to the handled config files. For those, as well as dietpiEnv.txt, if the file from the config partition was copied, hence the one on the effective boot partition overwritten, reboot the system, so the change is effective for 1st boot setup. Such bootloader config files never need to be copied from the RPi boot/firmware partition, since they are effective only there, which is also the reason config.txt and cmdline.txt are not copied. Also update and rephrase the README. --- .build/images/dietpi-imager | 31 ++++++++++++------- .../dietpi/services/fs_partition_resize.sh | 26 +++++++++++++--- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index e1d975a6e4..c830d408a5 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -529,9 +529,12 @@ G_EXEC mount "${FP_ROOT_DEV::-1}1" "$fat_mountpoint" G_EXEC mount "$FP_ROOT_DEV" "$root_mountpoint" G_DIETPI-NOTIFY 2 'Copying dietpi.txt and other config files to the DIETPISETUP partition' - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf' do - [[ -f $root_mountpoint/boot/$f ]] && G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" + [[ -f $root_mountpoint/boot/$f ]] || continue + G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" + TZ=UTC G_EXEC touch -t '197001010000' "$fat_mountpoint/$f" + TZ=UTC G_EXEC touch -t '197001010001' "$root_mountpoint/boot/$f" done G_EXEC umount "$root_mountpoint" "$fat_mountpoint" G_EXEC rmdir "$root_mountpoint" "$fat_mountpoint" @@ -558,22 +561,26 @@ G_EXEC mount "$new_dos_part" "$fat_mountpoint" G_EXEC mount "$FP_ROOT_DEV" "$root_mountpoint" G_DIETPI-NOTIFY 2 'Copying dietpi.txt and other config files to the DIETPISETUP partition' - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'boot.ini' 'extlinux/extlinux.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf' do - [[ -f $root_mountpoint/boot/$f ]] && G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" + [[ -f $root_mountpoint/boot/$f ]] || continue + G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" + TZ=UTC G_EXEC touch -t '197001010000' "$fat_mountpoint/${f#extlinux/}" + TZ=UTC G_EXEC touch -t '197001010001' "$root_mountpoint/boot/$f" done - cat << '_EOF_' > "$fat_mountpoint/Readme-DietPi-Config.txt" -DietPi pre-boot configuration + cat << '_EOF_' > "$fat_mountpoint/README.txt" +DietPi config partition -You can edit the files in this folder to setup some configuration options -or even a completely automated install. Please check the documentation and -dietpi.txt for details: https://dietpi.com/docs/install/ +This FAT partition is a place for relevant configuration files to pre-configure and automate your DietPi setup. +Those files will be copied into the root filesystem on first boot, if modified, to become effective, and the partition will be removed. -This folder also supports the following additional files. Please ensure that -they have UNIX style LF line endings: -- unattended_pivpn.conf +Apart of editing the existing files, you can also create the following for further automation: - Automation_Custom_PreScript.sh - Automation_Custom_Script.sh +- unattended_pivpn.conf + +For details, please check our documentation and dietpi.txt itself: +https://dietpi.com/docs/usage/#how-to-do-an-automatic-base-installation-at-first-boot-dietpi-automation _EOF_ G_EXEC umount "$root_mountpoint" "$fat_mountpoint" G_EXEC rmdir "$root_mountpoint" "$fat_mountpoint" diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index 5640c5142e..abc554bfca 100755 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -2,6 +2,7 @@ { # Error out on command failures set -e + EXIT_CODE=0 Reboot_to_load_Partition_table() { @@ -41,6 +42,7 @@ echo "[ INFO ] Detected root drive $ROOT_DRIVE with root partition $ROOT_PART" # Check if the last partition contains a FAT filesystem with DIETPISETUP label + REBOOT=0 LAST_PART=$(lsblk -nrbo FSTYPE,LABEL "$ROOT_DRIVE" | tail -1) if [[ $LAST_PART == 'vfat DIETPISETUP' ]] then @@ -49,9 +51,20 @@ # Mount it and copy files if present and newer TMP_MOUNT=$(mktemp -d) mount -v "$SETUP_PART" "$TMP_MOUNT" - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'boot.ini' 'extlinux.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf' do - [[ -f $TMP_MOUNT/$f ]] && cp -uv "$TMP_MOUNT/$f" /boot/ + [[ -f $TMP_MOUNT/$f ]] || continue + if [[ $f == 'extlinux.conf' ]] + then + mkdir -pv /boot/extlinux + [[ -f '/boot/extlinux/extlinux.conf' ]] && mtime=$(date -r '/boot/extlinux/extlinux.conf' '+%s') || mtime=0 + cp -uv "$TMP_MOUNT/$f" /boot/extlinux/ + (( $(date -r '/boot/extlinux/extlinux.conf' '+%s') > $mtime )) && REBOOT=1 + else + [[ ( $f == 'dietpiEnv.txt' || $f == 'boot.ini' ) && -f /boot/$f ]] && mtime=$(date -r "/boot/$f" '+%s') || mtime=0 + cp -uv "$TMP_MOUNT/$f" /boot/ + [[ $f == 'dietpiEnv.txt' || $f == 'boot.ini' ]] && (( $(date -r "/boot/$f" '+%s') '+%s') > $mtime )) && REBOOT=1 + fi done umount -v "$SETUP_PART" rmdir -v "$TMP_MOUNT" @@ -65,7 +78,7 @@ # Mount it and copy files if present and newer TMP_MOUNT=$(mktemp -d) mount -v "$BOOT_PART" "$TMP_MOUNT" - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf' do [[ -f $TMP_MOUNT/$f ]] && cp -uv "$TMP_MOUNT/$f" /boot/ done @@ -113,9 +126,12 @@ 'btrfs') btrfs filesystem resize max /;; *) echo "[FAILED] Unsupported root filesystem type ($ROOT_FSTYPE). Aborting..." - exit 1 + EXIT_CODE=1 ;; esac - exit 0 + # Reboot if needed + (( $REBOOT )) && reboot + + exit "$EXIT_CODE" } From e5e8e60c9b32df85b32bb7a88e054d3f05348b5c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 16:44:24 +0200 Subject: [PATCH 105/109] v9.4 - DietPi-FS_partition_resize | Typo --- rootfs/var/lib/dietpi/services/fs_partition_resize.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index abc554bfca..f99f7d913f 100755 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -63,7 +63,7 @@ else [[ ( $f == 'dietpiEnv.txt' || $f == 'boot.ini' ) && -f /boot/$f ]] && mtime=$(date -r "/boot/$f" '+%s') || mtime=0 cp -uv "$TMP_MOUNT/$f" /boot/ - [[ $f == 'dietpiEnv.txt' || $f == 'boot.ini' ]] && (( $(date -r "/boot/$f" '+%s') '+%s') > $mtime )) && REBOOT=1 + [[ $f == 'dietpiEnv.txt' || $f == 'boot.ini' ]] && (( $(date -r "/boot/$f" '+%s') > $mtime )) && REBOOT=1 fi done umount -v "$SETUP_PART" From 61a24e354b09c1aaeb527432ade96a91a4faf476 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 21:46:59 +0200 Subject: [PATCH 106/109] v9.4 - Orange Pi 5 Plus | Resolved an issue where the Ethernet interface names eth0/eth1 could swap on (re)boot. We add a udev rule which assures they are named persistently based on the PCI bus identifier. In case you created own udev rules to mitigate the issue, please check whether they conflict and decide whether to use ours or your solution. The DietPi update will also inform you about this change with a prompt. Many thanks to @dirkhh and many others for reporting this issue: https://github.com/MichaIng/DietPi/issues/6592 --- .build/images/dietpi-installer | 9 +++++++++ .update/patches | 13 +++++++++++++ CHANGELOG.txt | 1 + 3 files changed, 23 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 4eb8b9588a..440f046afd 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -2171,6 +2171,15 @@ _EOF_ SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" +_EOF_ + # Orange Pi 5 Plus + elif (( $G_HW_MODEL == 82 )) + then + G_DIETPI-NOTIFY 2 'Assuring persistent classic Ethernet interface names: /etc/udev/rules.d/99-dietpi-orangepi5plus.rules' + cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-orangepi5plus.rules +SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true" +SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0003:31:00.0", NAME="to_eth0", RUN:="/bin/true" +SUBSYSTEM=="net", KERNEL=="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1" _EOF_ # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] diff --git a/.update/patches b/.update/patches index 2fa977e1d3..b3ddc055e3 100755 --- a/.update/patches +++ b/.update/patches @@ -1582,6 +1582,19 @@ Patch_9_4() [[ -f '/etc/modprobe.d/odroid-cloudshell.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-cloudshell.conf G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*(gpioplug-ir-recv|fbtft_device)[[:blank:]]*$/d' /etc/modules + # Orange Pi 5 Plus + elif (( $G_HW_MODEL == 82 )) + then + G_DIETPI-NOTIFY 2 'Assuring persistent classic Ethernet interface names: /etc/udev/rules.d/99-dietpi-orangepi5plus.rules' + G_WHIP_MSG '[ WARN ] Persistent eth0/eth1 interface names will be applied +\nSince classic interface names are randomly applied among the two onboard Ethernet adapters, we install a udev rule, which assures they remain the same on each (re)boot: +- /etc/udev/rules.d/99-dietpi-orangepi5plus.rules +\nIf you applied an own workaround via /etc/network/interfaces or similar, this will not be affected. But if you created own udev rules to mitigate the issue, please check whether those conflict with ours. Of course you can remove or rename above file to maintain status quo.' + cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-orangepi5plus.rules +SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true" +SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0003:31:00.0", NAME="to_eth0", RUN:="/bin/true" +SUBSYSTEM=="net", KERNEL=="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1" +_EOF_ # Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938 elif (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3d0024d5e9..7f28936e8c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,7 @@ Enhancements: Bug fixes: - NanoPi NEO3 | Resolved an issue where the Ethernet adapter was not available after reboots. Many thanks to @murraythegoz for reporting this issue: https://github.com/MichaIng/DietPi/issues/6987 - Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots. +- Orange Pi 5 Plus | Resolved an issue where the Ethernet interface names eth0/eth1 could swap on (re)boot. We add a udev rule which assures they are named persistently based on the PCI bus identifier. In case you created own udev rules to mitigate the issue, please check whether they conflict and decide whether to use ours or your solution. The DietPi update will also inform you about this change with a prompt. Many thanks to @dirkhh and many others for reporting this issue: https://github.com/MichaIng/DietPi/issues/6592 - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Config | Resolved a visual-only failure message on non-RPi systems, when enabling Bluetooth, and an actual failure doing so on Orange Pi Zero 3, Orange Pi 3B and Orange Pi Zero 2W, since the required kernel module "sprdbt_tty" was not loaded. Many thanks to @b9AcE for reporting this issue: https://dietpi.com/forum/t/19929/45 From ede03b1a04cc912b702ef8688fa4d955d715b074 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 21:51:23 +0200 Subject: [PATCH 107/109] v9.4 - CHANGELOG | Update release date --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7f28936e8c..e6e8a1cdfc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.4 -(2024-05-11) +(2024-05-12) New images: - ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 From 92fc5e17a340fcd850b654250720dad1751feb10 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 22:00:40 +0200 Subject: [PATCH 108/109] v9.4 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 47060c7dae..7a315c4a76 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9512,7 +9512,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.4.6.8723/Radarr.master.5.4.6.8723.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.5.3.8819/Radarr.master.5.5.3.8819.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9955,7 +9955,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.16.2.4435/Prowlarr.master.1.16.2.4435.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.17.2.4511/Prowlarr.master.1.17.2.4511.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi From 522409fe7ad6cfd596042abb0c5e82e766730dd0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 22:43:56 +0200 Subject: [PATCH 109/109] v9.4 - DietPi-Imager | Strangely, touch -t '197001010000' on the FAT filesystem leads to a 1980 timestamp, while only 197001010001 on the ext4 197001010001 gave the intended 1970 timestamp, sadly just older, so all configs were copied, even when not edited. I wasn't able to replicate locally when running these commands on a FAT filesytem file, but let's try with a more recent year, and a positive second in both cases. --- .build/images/dietpi-imager | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index c830d408a5..f4a4aaff46 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -565,8 +565,8 @@ do [[ -f $root_mountpoint/boot/$f ]] || continue G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" - TZ=UTC G_EXEC touch -t '197001010000' "$fat_mountpoint/${f#extlinux/}" - TZ=UTC G_EXEC touch -t '197001010001' "$root_mountpoint/boot/$f" + TZ=UTC G_EXEC touch -t '202101010001' "$fat_mountpoint/${f#extlinux/}" + TZ=UTC G_EXEC touch -t '202101010002' "$root_mountpoint/boot/$f" done cat << '_EOF_' > "$fat_mountpoint/README.txt" DietPi config partition