From d8041c2d87052fcc639f434c9969e9f513fb963a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 8 Jul 2024 22:03:41 +0200 Subject: [PATCH 01/55] v9.6 - CHANGELOG | Typo --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f0f604f972..fa07aaf847 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,7 @@ New software: - soju | This IRC bouncer has been added to our software catalogue. Many thanks to @subnut for implementing it: https://github.com/MichaIng/DietPi/pull/7124 Enhancements: -- General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed form all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. +- General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed from all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 - Quartz64/Star64/VisionFive 2 | eBPF functionality for firewall and network monitoring software like Cilium has been added to our kernel builds for these SBCs. Many thanks to @kbrighton for reporting these missing features: https://github.com/MichaIng/DietPi/issues/6834 - Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: https://github.com/MichaIng/DietPi/issues/6663 From 4e657c2f5a86a89fc1511bc4824bfe0962cb4650 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 9 Jul 2024 00:15:36 +0200 Subject: [PATCH 02/55] Init v9.7 --- .meta/dietpi-survey_report | 8 +++++++- .update/patches | 5 +++++ .update/version | 4 ++-- CHANGELOG.txt | 11 +++++++++++ dietpi/func/dietpi-globals | 4 ++-- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index c13944aa27..0c4e7c5a02 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -728,8 +728,14 @@ shopt -s extglob done aSOFTWARE_NAME9_6[213]='soju' + aSOFTWARE_NAME9_7=() + for i in "${!aSOFTWARE_NAME9_6[@]}" + do + aSOFTWARE_NAME9_7[i]=${aSOFTWARE_NAME9_6[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_6[@]}" + for i in "${aSOFTWARE_NAME9_7[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/patches b/.update/patches index 58d384991b..1d35dccfc2 100755 --- a/.update/patches +++ b/.update/patches @@ -1739,6 +1739,11 @@ _EOF_ fi } +Patch_9_7() +{ + : +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/.update/version b/.update/version index 5f21a93cd2..d49b5664fd 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=6 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_SUB=7 +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 fa07aaf847..f5a67988bd 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,14 @@ +v9.7 +(2024-08-03) + +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.6 (2024-07-07) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index e23b016e8c..ff61b9d38d 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=6 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=7 + [[ $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 276aaac0016f2098575faa977d66569117cde480 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 9 Jul 2024 00:16:28 +0200 Subject: [PATCH 03/55] v9.7 - DietPi-Software | HAProxy: Bump to v3.0.2 --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 102d2b42ed..1632a4503d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6914,7 +6914,7 @@ _EOF_ if To_Install 98 haproxy # HAProxy then - local version='2.9.7' # https://www.haproxy.org/download/ + local version='3.0.2' # https://www.haproxy.org/download/ aDEPS=('make' 'gcc' 'libpcre3-dev' 'libssl-dev' 'zlib1g-dev' 'libsystemd-dev') Download_Install "https://www.haproxy.org/download/${version%.*}/src/haproxy-$version.tar.gz" From 0b6f85e7594e48024d449091e69bb0d0cb042b2c Mon Sep 17 00:00:00 2001 From: Lukasz Sobala <61153692+lukaszsobala@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:41:49 +0100 Subject: [PATCH 04/55] v9.7 (#7149) - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 Co-authored-by: MichaIng --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f5a67988bd..7f72ca74b4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v9.7 Enhancements: Bug fixes: +- DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 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 1632a4503d..c732e6bf02 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11085,7 +11085,7 @@ _EOF_ # Cleanup G_EXEC cd "$G_WORKING_DIR" - G_EXEC rm "box86-${version#v}" + G_EXEC rm -R "box86-${version#v}" # Reload binfmt if kernel module is available to have i386 binaries executed via box86 automatically from now on modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt @@ -11142,7 +11142,7 @@ _EOF_ # Cleanup G_EXEC cd "$G_WORKING_DIR" - G_EXEC rm "box64-${version#v}" + G_EXEC rm -R "box64-${version#v}" # Reload binfmt if kernel module is available to have x86_64 binaries executed via box64 automatically from now on modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt From 4b4742dc64492c1f8e840ae7a90b1cddb4deba77 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 10 Jul 2024 20:25:55 +0200 Subject: [PATCH 05/55] v8.7 - DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thansk to `@clarky000` and `@blablazzz` for reporting this issue, and `@gregordinary` for pointing us to the solution: https://dietpi.com/forum/t/19610 - DietPi-Software | Bazarr: Install unzip explicitly, since dietpi-software should depend less on which packages DietPi comes pre-installed with --- .update/patches | 10 +++++++++- CHANGELOG.txt | 1 + dietpi/dietpi-software | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index 1d35dccfc2..de38652bcb 100755 --- a/.update/patches +++ b/.update/patches @@ -1741,7 +1741,15 @@ _EOF_ Patch_9_7() { - : + # Software updates, migrations and patches + if [[ -f '/boot/dietpi/.installed' ]] + then + # Bazarr + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[180\]=2' /boot/dietpi/.installed && [[ -f '/etc/systemd/system/bazarr.service' ]] + then + G_CONFIG_INJECT 'KillSignal=' 'KillSignal=SIGINT' /etc/systemd/system/bazarr.service '\[Service\]' + fi + fi } # v6.35 => v7 migration diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7f72ca74b4..30f2b2c157 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Enhancements: Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 +- DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thansk to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 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 c732e6bf02..d6473713d1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9700,9 +9700,10 @@ _EOF_ if To_Install 180 bazarr # Bazarr: https://wiki.bazarr.media/Getting-Started/Installation/Linux/linux/ then # APT deps + aDEPS=('unzip') if (( $G_HW_ARCH < 3 )) then - aDEPS=('libopenblas0-pthread') # libopenblas0-pthread runtime library for piwheels wheel: https://piwheels.org/project/numpy/ + 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 @@ -9742,6 +9743,7 @@ User=bazarr UMask=002 LogsDirectory=bazarr ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py -c /mnt/dietpi_userdata/bazarr +KillSignal=SIGINT # Hardening ProtectSystem=strict From 6be1140bf2b6921a0e57918ec0a50e2a79257155 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 10 Jul 2024 21:23:54 +0200 Subject: [PATCH 06/55] v9.7 - CI | DietPi-Software test: Allow 30 seconds for Koel to bind to port in emulated container --- .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 28882c83ad..7953fe9cc1 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -179,7 +179,7 @@ Process_Software() 139) aSERVICES[i]='sabnzbd' aTCP[i]='8080'; (( $arch == 10 )) || aDELAY[i]=30;; # ToDo: Solve conflict with Airsonic 140) aSERVICES[i]='domoticz' aTCP[i]='8124 8424';; #142) aSERVICES[i]='snapd';; "system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/syscheck-mountpoint-2075108377: mount failed: Operation not permitted." - 143) aSERVICES[i]='koel' aTCP[i]='8003';; + 143) aSERVICES[i]='koel' aTCP[i]='8003'; (( $arch == 10 )) || aDELAY[i]=30;; 144) aSERVICES[i]='sonarr' aTCP[i]='8989'; (( $arch < 10 )) && aDELAY[i]=90;; 145) aSERVICES[i]='radarr' aTCP[i]='7878'; (( $arch < 10 )) && aDELAY[i]=90;; 146) aSERVICES[i]='tautulli' aTCP[i]='8181'; (( $arch == 10 )) || aDELAY[i]=60;; From cede450f50a7e673573902a8f0a8e68f9de40e91 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 11 Jul 2024 19:50:29 +0200 Subject: [PATCH 07/55] v9.7 (#7153) - DietPi-Software | Node.js: Install libatomic1 only where required - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index d6473713d1..1d205825ec 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3009,8 +3009,8 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" if To_Install 9 # Node.js then - # Deps: https://github.com/MichaIng/DietPi/issues/3614 - aDEPS=('libatomic1') + # ARMv6/7/RISC-V deps (verified 2024-07-11): https://github.com/MichaIng/DietPi/issues/3614 + (( $G_HW_ARCH < 3 || $G_HW_ARCH == 11 )) && aDEPS=('libatomic1') # Download installer Download_Install 'https://raw.githubusercontent.com/MichaIng/nodejs-linux-installer/master/node-install.sh' @@ -6522,7 +6522,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.1/frp_0.58.1_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.59.0/frp_0.59.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_* @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v6.12.1/koel-v6.12.1.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.2/koel-v7.0.2.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -11100,7 +11100,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.2.8'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.3.0'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box64/archive/$version.tar.gz" # Build for targets: https://github.com/ptitSeb/box64/blob/main/CMakeLists.txt From 7be8a855c8c755c25d9c020915dcdaaab62278f7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Jul 2024 16:13:51 +0200 Subject: [PATCH 08/55] v9.6 - DietPi-Installer | Do not add Armbian repository for stable builds anymore, after DietPi v9.6 has been released --- .build/images/dietpi-installer | 30 ------------------------------ dietpi/dietpi-software | 4 ++-- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index ff082f29a8..84504110be 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1045,36 +1045,6 @@ setenv rootuuid "true"' /boot/boot.cmd # Remove obsolete lists find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + - if [[ $G_GITBRANCH == 'master' ]] - then - # Prevent any unintended packages from being installed from Armbian's APT repository, like base-files: https://github.com/MichaIng/DietPi/issues/6227#issuecomment-1713688577 - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian -Package: * -Pin: origin apt.armbian.com -Pin-Priority: -1 - -Package: armbian-firmware* linux-* -Pin: origin apt.armbian.com -Pin-Priority: 500 -_EOF_ - if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 - then - G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s' - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp -Package: base-files -Pin: release o=Debian -Pin-Priority: 1000 -_EOF_ - G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' - fi - - # Bootstrap Armbian repository - G_EXEC_RETRIES=2 G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' - - # 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" - fi - # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 1d205825ec..65c7e2879d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7953,7 +7953,7 @@ _EOF_ cat << _EOF_ > /etc/hostapd/hostapd.conf interface=$wifi_iface driver=nl80211 -ssid=${ssid:-DietPi-HotSpot} +ssid=${ssid:-DietPi-Hotspot} country_code=00 hw_mode=$mode channel=$channel @@ -9355,7 +9355,7 @@ _EOF_ if To_Install 143 koel # Koel then - # APT dependencies: https://docs.koel.dev/#server > https://laravel.com/docs/9.x/deployment#server-requirements / https://laravel.com/docs/8.x/deployment#server-requirements + # APT dependencies: https://docs.koel.dev/guide/getting-started > https://laravel.com/docs/10.x/deployment#server-requirements / https://laravel.com/docs/8.x/deployment#server-requirements # - Skip JSON module from PHP 8.0 on, where it is embedded into core # - pdo_sqlite module required for "artisan koel:init" < "artisan db:seed", despite MySQL database engine used aDEPS=("php$PHP_VERSION-bcmath" "php$PHP_VERSION-mbstring" "php$PHP_VERSION-sqlite3" "php$PHP_VERSION-xml") From 72e1eeb459bd9e653b1e943c1080eefa1aca285e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Jul 2024 17:41:03 +0200 Subject: [PATCH 09/55] v9.7 - DietPi-Installer | Transparently remove obsolete APT sources, and do expect all of them to be files or symlinks, no directories, else throw an error. --- .build/images/dietpi-installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 84504110be..8d83eafd48 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1043,7 +1043,7 @@ setenv rootuuid "true"' /boot/boot.cmd [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete lists - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() @@ -1392,7 +1392,7 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete components from Armbian list and connect via HTTPS - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + 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 From ec8e74a496c16bf9c77b0335710720b4272ad7e9 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Thu, 18 Jul 2024 19:10:58 +0200 Subject: [PATCH 10/55] v9.7 (#7166) - DietPi-Software | WiFi Hotspot: Resolved an issue where the hotspot failed because of an unintended character in the interface configuration. Many thanks to `@wimduk` for reporting this issue: https://dietpi.com/forum/t/20744 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 30f2b2c157..abb9aec2be 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Enhancements: Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 - DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thansk to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 +- DietPi-Software | WiFi Hotspot: Resolved an issue where the hotspot failed because of an unintended character in the interface configuration. Many thanks to @wimduk for reporting this issue: https://dietpi.com/forum/t/20744 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 65c7e2879d..f503c794aa 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7906,7 +7906,7 @@ netmask 255.255.255.0 #gateway 192.168.0.1 #dns-nameservers 9.9.9.9 149.112.112.112 pre-up iw dev $wifi_iface set power_save off -post-down iw dev "$wifi_iface set power_save on +post-down iw dev $wifi_iface set power_save on # iptables NAT rules up iptables-restore < /etc/iptables.ipv4.nat From 56ca577c0827bbf702a89662c3d6f8e6e7c808ba Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Jul 2024 20:14:13 +0200 Subject: [PATCH 11/55] v9.7 - DietPi-Installer | Remove all systemd-networkd configs: https://github.com/MichaIng/DietPi/issues/5871 --- .build/images/dietpi-installer | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 8d83eafd48..335010fd1b 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1762,7 +1762,10 @@ _EOF_' G_AGP rfkill [[ -d '/var/lib/systemd/rfkill' ]] && G_EXEC rm -R /var/lib/systemd/rfkill - G_DIETPI-NOTIFY 2 'Configuring wlan/eth naming to be preferred for networked devices:' + G_DIETPI-NOTIFY 2 'Removing all systemd-networkd configs, since DietPi uses ifupdown by default' # https://github.com/MichaIng/DietPi/issues/5871 + G_EXEC rm -Rf /etc/systemd/network/{,.??,.[^.]}* + + G_DIETPI-NOTIFY 2 'Avoid "predictable" network interface names' G_EXEC ln -sf /dev/null /etc/systemd/network/99-default.link G_EXEC ln -sf /dev/null /etc/udev/rules.d/80-net-setup-link.rules From e6c0b8b540a3b45eb76dbc698f4e1d158c644068 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Jul 2024 21:18:07 +0200 Subject: [PATCH 12/55] v9.7 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f503c794aa..3f62c2888f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3345,7 +3345,7 @@ _EOF_ esac # Download binary - local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-$arch.tar.gz" + local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.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/ @@ -8561,7 +8561,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.5'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.6'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v7.0.2/koel-v7.0.2.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.8/koel-v7.0.8.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9642,7 +9642,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.3.3.4204/Lidarr.master.2.3.3.4204.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.4.3.4248/Lidarr.master.2.4.3.4248.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -10062,7 +10062,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.30.2576/Readarr.develop.0.3.30.2576.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.31.2578/Readarr.develop.0.3.31.2578.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 @@ -11214,7 +11214,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.1.1/tasmoadmin_v4.1.1.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.2/tasmoadmin_v4.1.2.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' From 76b80a724fcaa0b5536e442702f8c3100b73fcfb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Jul 2024 21:11:38 +0200 Subject: [PATCH 13/55] v9.7 - 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 3f62c2888f..6df8ae5a8d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9546,7 +9546,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.7.0.8882/Radarr.master.5.7.0.8882.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.8.3.8933/Radarr.master.5.8.3.8933.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -10062,7 +10062,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.31.2578/Readarr.develop.0.3.31.2578.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.32.2587/Readarr.develop.0.3.32.2587.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 24000a3e2cc4fd1895527dcc8832cfa1c16d6ad1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 22:04:30 +0200 Subject: [PATCH 14/55] v9.7 - Odroid N2 | Add an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. --- CHANGELOG.txt | 1 + dietpi/dietpi-config | 58 +++++++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index abb9aec2be..457cbdf95b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.7 (2024-08-03) Enhancements: +- Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 97b81a64c4..881723848b 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -932,15 +932,15 @@ 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, 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)$ ]] + # Odroid N2, 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 =~ ^(15|72|78|80|82|87)$ ]] then - # ROCK 4: Device tree overlay required + # Odroid N2/ROCK 4: Device tree overlay required local spidev='/dev/mtdblock0' - (( $G_HW_MODEL == 72 )) || { + (( $G_HW_MODEL == 15 || $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; } + { [[ -b '/dev/mtdblock0' ]] && grep -q '/dev/mtdblock0' /usr/lib/u-boot/platform_install.sh; } } } && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ": Flash current U-Boot to $spidev") @@ -1084,25 +1084,47 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr elif [[ $G_WHIP_RETURNED_VALUE == 'Update SPI bootloader' ]]; then - if [[ $G_HW_MODEL == 72 && ! -b '/dev/mtdblock0' ]] + if [[ $G_HW_MODEL == 15 && ! -b '/dev/mtdblock0' ]] + then + local overlays=() i= + read -ra overlays < <(mawk -F= '$1=="overlays"{$1="";print}' /boot/dietpiEnv.txt) + for i in "${overlays[@]}"; do [[ $i == 'g12b-odroid-n2-spi' ]] && break; done + if [[ $i == 'g12b-odroid-n2-spi' ]] + then + G_WHIP_MSG '[FAILED] No SPI device found +\nThe expected SPI device /dev/mtdblock0 was not found on your Odroid N2 system, despite the fact that the related device tree overlay has been applied already. You may need to reboot for the change to take effect. +\nIn case, reboot the system before selecting this menu option again. If you did so, please report this issue on our forum or GitHub page.' + return 1 + else + G_WHIP_YESNO '[ INFO ] Device tree overlay required +\nA kernel device tree overlay is required to access the SPI device on the Odroid N2. +\nShall we add the overlay for you? A reboot will be required for the change to take effect, after which you can reselect this menu option.' || return 0 + overlays+=('g12b-odroid-n2-spi') + G_CONFIG_INJECT 'overlays=' "overlays=${overlays[*]}" /boot/dietpiEnv.txt + REBOOT_REQUIRED=1 + return 0 + fi + + elif [[ $G_HW_MODEL == 72 && ! -b '/dev/mtdblock0' ]] then local overlays=() i= read -ra overlays < <(mawk -F= '$1=="overlays"{$1="";print}' /boot/dietpiEnv.txt) for i in "${overlays[@]}"; do [[ $i == 'spi-jedec-nor' ]] && break; done if [[ $i == 'spi-jedec-nor' ]] then - G_WHIP_MSG '[FAILED] No MTD device found -\nThe expected MTD device /dev/mtdblock0 was not found on your ROCK 4 system, despite the fact that the related device tree overlay has been applied already. You may either have a model which has no onboard SPI storage, or you did not reboot yet for the change to take effect. -\nIn case reboot the system before selecting this menu option again, otherwise check back whether your ROCK 4 variant is really supposed to have an SPI storge.' + G_WHIP_MSG '[FAILED] No SPI device found +\nThe expected SPI device /dev/mtdblock0 was not found on your ROCK 4 system, despite the fact that the related device tree overlay has been applied already. You may either have a model which has no onboard SPI storage, or you did not reboot yet for the change to take effect. +\nIn case, reboot the system before selecting this menu option again, otherwise check back whether your ROCK 4 variant is really supposed to have an SPI storge.' return 1 else - G_WHIP_YESNO '[ INFO ] No MTD device found -\nThe expected MTD device /dev/mtdblock0 was not found on your ROCK 4 system. You may either have a model which has no onboard SPI storage, or a device tree overlay may be required to make the MTD device available. + G_WHIP_YESNO '[ INFO ] No SPI device found +\nThe expected SPI device /dev/mtdblock0 was not found on your ROCK 4 system. You may either have a model which has no onboard SPI storage, or a device tree overlay may be required to make the SPI device available. \nShall we add the overlay for you? A reboot will be required for the change to take effect, after which you can reselect this menu option.' || return 0 overlays+=('spi-jedec-nor') 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 elif [[ $spidev == '/dev/mtd0' ]] @@ -1111,21 +1133,17 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr \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 - # 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 fi + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh + eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress/')" + write_uboot_platform_mtd "$DIR" + elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then G_WHIP_YESNO '[ INFO ] SPI bootloader update From 0d55e5aa557498b64fca489f81a18857ad206e0a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 22:17:56 +0200 Subject: [PATCH 15/55] v9.7 - DietPi-Config | Fix sed --- dietpi/dietpi-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 881723848b..58a2389d3c 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1141,7 +1141,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh - eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress/')" + eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress /')" write_uboot_platform_mtd "$DIR" elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then From 933f86160bc5d399a16e3db9ac6d8815edd85e62 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 22:42:46 +0200 Subject: [PATCH 16/55] v9.7 - DietPi-Config | Satisfy shellcheck --- dietpi/dietpi-config | 1 + 1 file changed, 1 insertion(+) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 58a2389d3c..4cd93f9d2e 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1142,6 +1142,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress /')" + # shellcheck disable=SC2154 write_uboot_platform_mtd "$DIR" elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then From ad523f86093cabda132fc74445001ec24c8b0d87 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 23:35:48 +0200 Subject: [PATCH 17/55] v9.7 - CI | Armbian: Fix U-Boot package name for obtaining version --- .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 e654a48838..6e61a3e3e2 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -72,7 +72,7 @@ jobs: 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.branch }}';; + uboot) package='linux-u-boot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';; kernel) family=$(. 'config/boards/${{ github.event.inputs.board }}.'* &> /dev/null; echo "$BOARDFAMILY") echo "Board family is: $family" From 8eaefb4923f73647e21cc8b53aade8d489ef20a1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 23 Jul 2024 00:06:02 +0200 Subject: [PATCH 18/55] v9.7 - CI | Armbian: Download much smaller dtb package to obtain kernel version suffix --- .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 6e61a3e3e2..e4fef8ee6d 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -78,7 +78,7 @@ jobs: 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" + package="linux-dtb-${{ github.event.inputs.branch }}-$family" ;; *) echo 'ERROR: Invalid asset "${{ github.event.inputs.asset }}"'; exit 1;; esac From d294a99da73b2351944a7c499c3654ec4acbdb2d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Jul 2024 20:31:55 +0200 Subject: [PATCH 19/55] v9.7 - DietPi-Software | Komga: 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 6df8ae5a8d..145f999391 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7472,7 +7472,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.1/komga-1.11.1.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.11.2/komga-1.11.2.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 From b3afdf176442f36b13655e362bf09ff5cfcc8e6f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Jul 2024 23:08:58 +0200 Subject: [PATCH 20/55] v9.7 - DietPi-Software | Ampache: 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 145f999391..c3128758ce 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7568,7 +7568,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.5.0/ampache-6.5.0_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.0/ampache-6.6.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 From 8b4b74916b6c1cb92479f4d66ab06d36f89f0893 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 29 Jul 2024 22:40:07 +0200 Subject: [PATCH 21/55] v9.7 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c3128758ce..db765c2f8a 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v7.0.8/koel-v7.0.8.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.9/koel-v7.0.9.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9988,7 +9988,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.20.1.4603/Prowlarr.master.1.20.1.4603.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.21.2.4649/Prowlarr.master.1.21.2.4649.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 @@ -11690,7 +11690,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/restic/restic/releases/download/v0.16.5/restic_0.16.5_linux_$arch.bz2" + local fallback_url="https://github.com/restic/restic/releases/download/v0.17.0/restic_0.17.0_linux_$arch.bz2" Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic G_EXEC chmod +x /usr/local/bin/restic fi From e8dead0b62709d1d97a4dba32272557d6c68a592 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 1 Aug 2024 20:16:41 +0200 Subject: [PATCH 22/55] v9.7 - DietPi-Installer | Assure that the base-files package from Armbian base images is downgraded/replaced with the Debian package --- .build/images/dietpi-installer | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 335010fd1b..3d495c7a44 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1045,6 +1045,9 @@ setenv rootuuid "true"' /boot/boot.cmd # Remove obsolete lists find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + + # Armbian base images: Downgrade base-files package to the version provided by Debian + dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 && G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' + # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in From eb5fb6a131de2195a4919951481e2db8b484a0b8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 1 Aug 2024 20:50:01 +0200 Subject: [PATCH 23/55] v9.7 - DietPi-Installer | Hard code device tree for NanoPi R6S as well. Somehow, first boot does not work without it, while reboots work without it, weird ... --- .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 3d495c7a44..d4f560fb51 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -688,7 +688,13 @@ setenv rootuuid "true"' /boot/boot.cmd 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;; - 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + 79) + case $HW_VARIANT in + 1) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6s.dtb' /boot/dietpiEnv.txt;; + 2) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + *) :;; + esac + ;; 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;; *) :;; From 89848c1a71167e237d32c489f25eb333767f5ff4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 1 Aug 2024 22:59:55 +0200 Subject: [PATCH 24/55] v9.7 - DietPi-Installer | Switch to "vendor" kernel (Linux 6.1) with all RK3588 boards --- .build/images/dietpi-installer | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index d4f560fb51..01ef989236 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1111,17 +1111,17 @@ setenv rootuuid "true"' /boot/boot.cmd *) model='nanopi-r5s';; esac;; 77) model='rock-3a' kernel='rockchip64';; - 78) model='rock-5b' kernel='rk35xx' branch='legacy';; - 79) kernel='rk35xx' branch='legacy' + 78) model='rock-5b' kernel='rk35xx' branch='vendor';; + 79) kernel='rk35xx' branch='vendor' case $HW_VARIANT in 2) model='nanopi-r6c';; 3) model='nanopct6';; *) model='nanopi-r6s';; esac;; - 80) model='orangepi5' kernel='rk35xx' branch='legacy';; - 82) model='orangepi5-plus' kernel='rk35xx' branch='legacy';; + 80) model='orangepi5' kernel='rk35xx' branch='vendor';; + 82) model='orangepi5-plus' kernel='rk35xx' branch='vendor';; 83) model='orangepizero3' kernel='sunxi64';; - 85) model='rock-5a' kernel='rk35xx' branch='legacy';; + 85) model='rock-5a' kernel='rk35xx' branch='vendor';; 86) model='tinkerboard-2' kernel='rockchip64';; 87) model='orangepi3b' kernel='rockchip64' branch='edge';; 88) model='orangepizero2w' kernel='sunxi64';; From a97c9494b3d4161155caed5b210150dd5b97906d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 8 Aug 2024 23:13:59 +0200 Subject: [PATCH 25/55] v9.7 - DietPi-Patches | Offer migration from Linux 5.10 legacy kernel to Linux 6.1 vendor kernel on RK3588 SBCs --- .update/patches | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.update/patches b/.update/patches index de38652bcb..2a7d4d47b6 100755 --- a/.update/patches +++ b/.update/patches @@ -1741,6 +1741,45 @@ _EOF_ Patch_9_7() { + # RK3588 migration to vendor kernel + if (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null + then + if G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available +\nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. +\nDo you want to migrate to the new Linux 6.1 kernel now?' + then + G_AGI linux-{image,dtb}-vendor-rk35xx + dpkg-query -s 'linux-headers-legacy-rk35xx' &> /dev/null && G_AGI linux-headers-vendor-rk35xx + dpkg-query -s 'linux-libc-dev-legacy-rk35xx' &> /dev/null && G_AGI linux-libc-dev-vendor-rk35xx + G_AGP linux-{image,dtb,headers,libc-dev}-legacy-rk35xx + # The /boot/dtb symlink has been found to be missing after kernel removed, despite a newer kernel being installed already. Assure it is present and correct. + [[ $(realpath '/boot/dtb') == '/boot/dtb-6.1.'* ]] || G_EXEC ln -sf /boot/dtb-6.1.* /boot/dtb + # Migrate U-Boot as well + case $G_HW_MODEL in + 78) G_AGI linux-u-boot-rock-5b-vendor;; + 79) + if dpkg-query -s 'linux-u-boot-nanopi-r6s-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopi-r6s-vendor + + elif dpkg-query -s 'linux-u-boot-nanopi-r6c-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopi-r6c-vendor + + elif dpkg-query -s 'linux-u-boot-nanopct6-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopct6-vendor + fi + ;; + 80) G_AGI linux-u-boot-orangepi5-vendor;; + 82) G_AGI linux-u-boot-orangepi5-plus-vendor;; + 85) G_AGI linux-u-boot-rock-5a-vendor;; + *) :;; + esac + fi + fi + # Software updates, migrations and patches if [[ -f '/boot/dietpi/.installed' ]] then From 364a207c15d61e3ee1e3f533cc2f887da28fd049 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 8 Aug 2024 23:21:34 +0200 Subject: [PATCH 26/55] v9.7 - CHANGELOG | Add entry about RK3588 kernel upgrade --- .update/patches | 2 +- CHANGELOG.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 2a7d4d47b6..ab3a4fda2a 100755 --- a/.update/patches +++ b/.update/patches @@ -1746,7 +1746,7 @@ Patch_9_7() then if G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available \nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. -\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. +\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.1 kernel now?' then G_AGI linux-{image,dtb}-vendor-rk35xx diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 457cbdf95b..c6a2ba23d0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v9.7 Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. +- RK3588 SoCs | This DietPi update offers a migration from the legacy Linux 5.10 kernel to "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 From 5e6e6527a00d04ef961ec43dcee1a27c10ca456f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 8 Aug 2024 23:51:05 +0200 Subject: [PATCH 27/55] v9.7 - VisionFive 2 | Add workflow for mainline kernel build --- .../images/VisionFive2/visionfive2_defconfig | 410 ++++++++++++++++++ .github/workflows/visionfive2.yml | 84 ++++ 2 files changed, 494 insertions(+) create mode 100644 .build/images/VisionFive2/visionfive2_defconfig create mode 100644 .github/workflows/visionfive2.yml diff --git a/.build/images/VisionFive2/visionfive2_defconfig b/.build/images/VisionFive2/visionfive2_defconfig new file mode 100644 index 0000000000..04f2814efc --- /dev/null +++ b/.build/images/VisionFive2/visionfive2_defconfig @@ -0,0 +1,410 @@ +CONFIG_AIC8800_WLAN_SUPPORT=m +CONFIG_AIC_LOADFW_SUPPORT=m +CONFIG_AIC_WLAN_SUPPORT=y +CONFIG_AMBA_PL08X=y +CONFIG_ATA=y +CONFIG_AUTOFS_FS=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BINFMT_MISC=y +CONFIG_BLK_DEV_DM=m +CONFIG_BLK_DEV_INITRD=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NVME=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_BPF_JIT=y +CONFIG_BPF_SYSCALL=y +CONFIG_BT=m +CONFIG_BTRFS_FS=y +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_CAN=y +CONFIG_CFG80211=m +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_SCHED=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_CIFS=m +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_FSCACHE=y +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CLK_STARFIVE_JH7110_AON=y +CONFIG_CLK_STARFIVE_JH7110_ISP=y +CONFIG_CLK_STARFIVE_JH7110_STG=y +CONFIG_CLK_STARFIVE_JH7110_VOUT=y +CONFIG_CMA=y +CONFIG_COMPILE_TEST=y +CONFIG_CPUFREQ_DT=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_THERMAL=y +CONFIG_CRYPTO_DEV_JH7110=y +CONFIG_CRYPTO_DEV_VIRTIO=n +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_USER_API_AEAD=y +CONFIG_CRYPTO_USER_API_HASH=y +CONFIG_CRYPTO_USER_API_RNG=y +CONFIG_CRYPTO_USER_API_SKCIPHER=y +CONFIG_CUSE=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_PLIST=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_RWSEMS=y +CONFIG_DEBUG_SG=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_TIMEKEEPING=y +CONFIG_DEFAULT_HOSTNAME="DietPi" +CONFIG_DEVFREQ_THERMAL=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_DMADEVICES=y +CONFIG_DMATEST=y +CONFIG_DMA_CMA=y +CONFIG_DM_CRYPT=m +CONFIG_DRM_IMG_ROGUE=y +CONFIG_DRM_LEGACY=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_STARFIVE_JADARD=y +CONFIG_DRM_TOSHIBA_TC358762=y +CONFIG_DRM_VERISILICON=y +CONFIG_DWMAC_DWC_QOS_ETH=y +CONFIG_DWMAC_STARFIVE=y +CONFIG_DW_AXI_DMAC=y +CONFIG_EEPROM_AT24=y +CONFIG_ENERGY_MODEL=y +CONFIG_EXFAT_FS=m +CONFIG_EXPERT=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_F2FS_FS=y +CONFIG_FAT_DEFAULT_UTF8=y +CONFIG_FB=y +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_FUSE_FS=y +CONFIG_GOLDFISH=y +CONFIG_GPIO_SYSFS=y +CONFIG_HIBERNATION=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_HOSTAP=y +CONFIG_HUGETLBFS=y +CONFIG_HVC_RISCV_SBI=n +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_JH7110=y +CONFIG_HZ_100=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_IIO=y +CONFIG_IIO_ST_ACCEL_3AXIS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_INIT_STACK_NONE=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_IPMS_CAN=y +CONFIG_IPV6=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IWLDVM=y +CONFIG_IWLMVM=y +CONFIG_IWLWIFI=y +CONFIG_JFFS2_FS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEGACY_PTYS=n +CONFIG_MAC80211=m +CONFIG_MAILBOX=y +CONFIG_MARVELL_PHY=y +CONFIG_MD=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_MEMTEST=y +CONFIG_MFD_AXP20X_I2C=y +CONFIG_MICREL_PHY=y +CONFIG_MICROCHIP_PHY=y +CONFIG_MMC=y +CONFIG_MMC_DEBUG=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_STARFIVE=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_OF_DWCMSHC=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHI=y +CONFIG_MMC_SPI=y +CONFIG_MODULES=y +CONFIG_MODULE_COMPRESS_XZ=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MOTORCOMM_PHY=y +CONFIG_MSDOS_FS=y +CONFIG_MTD=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_SPI_NOR=y +CONFIG_NAMESPACES=y +CONFIG_NET=y +CONFIG_NETDEVICES=y +CONFIG_NETFILTER=y +CONFIG_NETFILTER_NETLINK_ACCT=y +CONFIG_NETFILTER_NETLINK_QUEUE=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_IPCOMP=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NETLINK_DIAG=y +CONFIG_NET_9P=m +CONFIG_NET_9P_VIRTIO=n +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BPF=m +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_INGRESS=m +CONFIG_NEW_LEDS=y +CONFIG_NFSD=m +CONFIG_NFSD_V4=y +CONFIG_NFS_FS=m +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_NFT_COMPAT=y +CONFIG_NFT_CT=y +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_NF_CONNTRACK=y +CONFIG_NF_TABLES=y +CONFIG_NF_TABLES_IPV4=y +CONFIG_NF_TABLES_IPV6=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NONPORTABLE=y +CONFIG_NO_HZ_IDLE=y +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_OF_CONFIGFS=y +CONFIG_OVERLAY_FS=m +CONFIG_OVERLAY_FS_INDEX=y +CONFIG_OVERLAY_FS_METACOPY=y +CONFIG_OVERLAY_FS_XINO_AUTO=y +CONFIG_PACKET=y +CONFIG_PAGE_REPORTING=y +CONFIG_PCI=y +CONFIG_PCIE_STARFIVE_HOST=y +CONFIG_PERF_EVENTS=y +CONFIG_PHY_M31_DPHY_RX0=y +CONFIG_PHY_STARFIVE_JH7110_PCIE=y +CONFIG_PHY_STARFIVE_JH7110_USB=y +CONFIG_PM_ADVANCED_DEBUG=y +CONFIG_PM_DEBUG=y +CONFIG_PM_DEVFREQ=y +CONFIG_PM_STD_PARTITION="PARTLABEL=hibernation" +CONFIG_PM_TEST_SUSPEND=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_PRINTK_TIME=y +CONFIG_PWM=y +CONFIG_PWM_OCORES=y +CONFIG_R8169=y +CONFIG_RAS=y +CONFIG_RCU_EQS_DEBUG=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_AXP20X=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y +CONFIG_RISCV_SBI_CPUIDLE=y +CONFIG_ROOT_NFS=y +CONFIG_RPMSG_CHAR=y +CONFIG_RPMSG_VIRTIO=n +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GOLDFISH=y +CONFIG_RTC_DRV_STARFIVE=y +CONFIG_SATA_AHCI=y +CONFIG_SCHEDSTATS=y +CONFIG_SCSI_VIRTIO=y +CONFIG_SENSORS_SFCTEMP=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_NR_UARTS=6 +CONFIG_SERIAL_8250_RUNTIME_UARTS=6 +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIO_LIBPS2=y +CONFIG_SIFIVE_CCACHE=y +CONFIG_SMB_SERVER=m +CONFIG_SMP=y +CONFIG_SND=y +CONFIG_SND_DESIGNWARE_I2S=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_AC108=y +CONFIG_SND_SOC_JH7110_PWMDAC=y +CONFIG_SND_SOC_JH7110_TDM=y +CONFIG_SND_SOC_RZ=m +CONFIG_SND_SOC_STARFIVE=y +CONFIG_SND_SOC_WM8960=y +CONFIG_SND_USB_AUDIO=y +CONFIG_SOC_STARFIVE=y +CONFIG_SOFTLOCKUP_DETECTOR=y +CONFIG_SOUND=y +CONFIG_SPI=y +CONFIG_SPI_CADENCE_QUADSPI=y +CONFIG_SPI_PL022=y +CONFIG_SPI_SIFIVE=y +CONFIG_SPI_SPIDEV=y +CONFIG_STARFIVE_DSI=y +CONFIG_STARFIVE_INNO_HDMI=y +CONFIG_STARFIVE_MBOX=m +CONFIG_STARFIVE_MBOX_TEST=n +CONFIG_STMMAC_ETH=y +CONFIG_STMMAC_SELFTESTS=y +CONFIG_SYSVIPC=y +CONFIG_THERMAL=y +CONFIG_THERMAL_EMULATION=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_TINKER_FT5406=m +CONFIG_TTY_PRINTK=y +CONFIG_TUN=m +CONFIG_UHID=m +CONFIG_UNIX=y +CONFIG_USB=y +CONFIG_USB_CDNS3=y +CONFIG_USB_CDNS3_GADGET=y +CONFIG_USB_CDNS3_HOST=y +CONFIG_USB_CDNS3_STARFIVE=y +CONFIG_USB_CDNS_SUPPORT=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_GADGET=y +CONFIG_USB_OTG=y +CONFIG_USB_RENESAS_USBHS=y +CONFIG_USB_RENESAS_USBHS_UDC=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DEBUG=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_STORAGE=y +CONFIG_USB_UAS=y +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_WIFI_ECR6600U=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USELIB=y +CONFIG_USER_NS=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VFAT_FS=y +CONFIG_VIDEO_CADENCE_CSI2RX=y +CONFIG_VIDEO_IMX219=y +CONFIG_VIDEO_IMX708=m +CONFIG_VIDEO_STF_VIN=y +CONFIG_VIDEO_WAVE_VPU=m +CONFIG_VIN_SENSOR_IMX219=m +CONFIG_VIN_SENSOR_OV4689=m +CONFIG_VIRTIO_BLK=n +CONFIG_VIRTIO_CONSOLE=n +CONFIG_VIRTIO_FS=n +CONFIG_VIRTIO_NET=n +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_SYSFS=y +CONFIG_WERROR=n +CONFIG_WIREGUARD=m +CONFIG_WQ_WATCHDOG=y +CONFIG_ZRAM=m +CONFIG_ZRAM_DEF_COMP_ZSTD=y +CONFIG_ZSMALLOC=y +CONFIG_ZSWAP=y +CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD=y \ No newline at end of file diff --git a/.github/workflows/visionfive2.yml b/.github/workflows/visionfive2.yml new file mode 100644 index 0000000000..d8cc16ae64 --- /dev/null +++ b/.github/workflows/visionfive2.yml @@ -0,0 +1,84 @@ +name: visionfive2 +on: workflow_dispatch +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +permissions: {} +jobs: + build: + # https://github.com/actions/runner-images + runs-on: ubuntu-24.04 + env: + CROSS_COMPILE: 'aarch64-linux-gnu-' + ARCH: 'arm64' + steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true + - name: Build init + run: | + { sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-riscv64-linux-gnu bc libssl-dev; } & + { curl -fO 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-6.11-rc2.tar.gz'; tar xf linux-6.11-rc2.tar.gz; rm llinux-6.11-rc2.tar.gz; } & + wait + curl -sSfo linux-6.11-rc2/arch/riscv64/configs/visionfive2_defconfig "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/VisionFive2/visionfive2_defconfig" & + rm -Rf linux-image-visionfive2 + mkdir -p linux-image-visionfive2/DEBIAN linux-image-visionfive2/boot/extlinux + wait + - name: Build Linux + run: | + cd linux-6.11-rc2 + make visionfive2_defconfig + make -j$(nproc) + cp arch/riscv64/boot/Image.gz ../linux-image-visionfive2/boot/vmlinuz + mv arch/riscv64/boot/dts/rockchip/rk3566-quartz64-a.dtb ../linux-image-visionfive2/boot/ + make modules_install INSTALL_MOD_PATH='../linux-image-visionfive2' + cd .. + rm linux-image-visionfive2/lib/modules/*/build + - name: Build package + run: | + version=$(mawk '/^VERSION =/{a=$3};/^PATCHLEVEL =/{b=$3};/^SUBLEVEL/{c=$3};END{print a"."b"."c}' linux-6.11-rc2/Makefile) + rm -R linux-6.11-rc2 + curl -sSfO 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' & + curl -sSfo linux-image-visionfive2/lib/firmware/brcm/brcmfmac43455-sdio.txt 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/brcm/brcmfmac43455-sdio.AW-CM256SM.txt' & + wait + cur_version=$(dpkg-deb -f linux-image-visionfive2.deb Version) + rm linux-image-visionfive2.deb + cur_suffix=${cur_version#*-dietpi} + echo "Current package version is: $cur_version" + echo "New kernel 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" + cat << '_EOF_' > linux-image-visionfive2/boot/extlinux/extlinux.conf + label DietPi + linux /boot/vmlinuz + fdt /boot/rk3566-quartz64-a.dtb + append root=/dev/mmcblk0p1 rootfstype=ext4 rootwait earlycon=uart8250,mmio32,0xfe660000 console=ttyS2,1500000n8 console=tty1 consoleblank=0 net.ifnames=0 + _EOF_ + echo '/boot/extlinux/extlinux.conf' > linux-image-visionfive2/DEBIAN/conffiles + find linux-image-visionfive2 ! \( -path linux-image-visionfive2/DEBIAN -prune \) -type f -exec md5sum {} + | sed 's|linux-image-visionfive2/||' > linux-image-visionfive2/DEBIAN/md5sums + cat << _EOF_ > linux-image-visionfive2/DEBIAN/control + Package: linux-image-visionfive2 + Version: $version + Architecture: arm64 + Maintainer: MichaIng + Date: $(date -u '+%a, %d %b %Y %T %z') + Standards-Version: 4.6.2.0 + Installed-Size: $(du -sk 'linux-image-visionfive2' | mawk '{print $1}') + Section: kernel + Priority: optional + Description: Linux kernel and U-Boot bootloader for Quartz64 Model A + _EOF_ + sed --follow-symlinks -i "/^Installed-Size:/c\Installed-Size: $(du -sk 'linux-image-visionfive2' | mawk '{print $1}')" linux-image-visionfive2/DEBIAN/control + sudo chown -R root:root linux-image-visionfive2 + dpkg-deb -b -Zxz -z9 -Sextreme linux-image-visionfive2 + sudo rm -R linux-image-visionfive2 + - name: Upload + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T "flinux-image-visionfive2.deb" --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}all/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/testing/","https://dietpi.com/downloads/binaries/testing/linux-image-visionfive2.deb"]}' From d062a0dd73d8ede7fd8261b2061015bb64bfaff5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 11 Aug 2024 23:31:03 +0200 Subject: [PATCH 28/55] v9.7 - 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 db765c2f8a..92bfba1cda 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8952,7 +8952,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.9/syncthing-linux-$arch-v1.27.9.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.10/syncthing-linux-$arch-v1.27.10.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 6ea7f54d9c13e3234dee76c00fb381b607a25409 Mon Sep 17 00:00:00 2001 From: Roberto Kok Date: Tue, 13 Aug 2024 00:43:19 +0800 Subject: [PATCH 29/55] v9.7 (#7186) - DietPi-Banner | Add CPU load average option --- CHANGELOG.txt | 1 + dietpi/func/dietpi-banner | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c6a2ba23d0..b18fd2beee 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v9.7 Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. - RK3588 SoCs | This DietPi update offers a migration from the legacy Linux 5.10 kernel to "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. +- DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index c6b04d3b98..2fda70472d 100755 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -61,14 +61,15 @@ 'Print credits' 'Let'\''s Encrypt cert status' 'RAM usage' + 'Load average' ) # Set defaults: Disable CPU temp by default in VMs if (( $G_HW_MODEL == 20 )) then - aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0) + aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0) else - aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0) + aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0) fi COLOUR_RESET='\e[0m' @@ -257,6 +258,8 @@ $GREEN_LINE" (( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)" # RAM usage (( ${aENABLED[17]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[17]} $GREEN_SEPARATOR $(free -b | mawk 'NR==2 {CONVFMT="%.0f"; print $3/1024^2" of "$2/1024^2" MiB ("$3/$2*100"%)"}')" + # Load average + (( ${aENABLED[18]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[18]} $GREEN_SEPARATOR $(mawk '{print $1 ", " $2 ", " $3}' /proc/loadavg) ($(nproc) cores)" # Hostname (( ${aENABLED[3]} == 1 && ${aENABLED[14]} != 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $( Date: Mon, 12 Aug 2024 21:16:04 +0200 Subject: [PATCH 30/55] v9.7 - CI | Add better workaround for QEMU ARMv6 containers detecting themselves as ARMv7. --- .build/images/dietpi-build | 8 +++++--- .build/software/Amiberry/container_build.bash | 2 +- .build/software/dietpi-software-build.bash | 2 +- .github/workflows/dietpi-software.bash | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 1490dc7f6a..0115ade9f0 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -4,6 +4,7 @@ ########################################## # Load DietPi-Globals ########################################## +Error_Exit(){ G_DIETPI-NOTIFY 1 "$1, aborting ..."; exit 1; } if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals @@ -612,7 +613,7 @@ _EOF_ G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt # Force ARMv6 arch on Raspbian - (( $HW_ARCH == 1 )) && echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh + (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service @@ -672,8 +673,6 @@ G_EXEC rm /etc/bashrc.d/00-dietpi-build.sh /boot/Automation_Custom_Script.sh poweroff } _EOF_ - (( $HW_ARCH == 1 )) && G_EXEC sed --follow-symlinks -i 's/Custom_Script/Custom_{Pre,}Script/' rootfs/boot/Automation_Custom_Script.sh - # Start container # - Bind mounts required to allow container reading its own drive info, /dev/disk for GRUB and probably other tools to detect UUIDs # - Skip for container images @@ -688,6 +687,9 @@ _EOF_ # Reset IPv4 network connectivity check setting G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=9.9.9.9' rootfs/boot/dietpi.txt + # Revert ARMv6 Workaround + (( $HW_ARCH == 1 )) && G_EXEC rm /usr/local/bin/uname + # Revert workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962 (( $DISTRO == 8 )) && G_EXEC rm rootfs/etc/systemd/system/{multi-user.target.wants/,}dietpi-automation.service diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index c2c8cd7d8e..e34aa33f9d 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -114,7 +114,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh || Error_Exit 'Failed to generate Automation_Custom_PreScript.sh' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 554c274e1f..146003a949 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -118,7 +118,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh || Error_Exit 'Failed to generate Automation_Custom_PreScript.sh' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 7953fe9cc1..db0d2adfa5 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -4,6 +4,7 @@ ########################################## # Load DietPi-Globals ########################################## +Error_Exit(){ G_DIETPI-NOTIFY 1 "$1, aborting ..."; exit 1; } if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals @@ -318,7 +319,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian -(( $arch == 1 )) && G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/iG_EXEC sed -i -e '\''/^G_HW_ARCH=/cG_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/cG_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' rootfs/boot/dietpi/dietpi-login +(( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to download DietPi-Globals' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From 90be1abc0b0e5390056ab51d2f915011d8f1810e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 12 Aug 2024 21:26:27 +0200 Subject: [PATCH 31/55] v9.7 - CI | DietPi-Software test: Fix variable name --- .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 db0d2adfa5..3754ab75f5 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -319,7 +319,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian -(( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to download DietPi-Globals' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to download DietPi-Globals' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From ffe4fdab12e64f27fdad1297ead96174378b6de4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 12 Aug 2024 23:42:29 +0200 Subject: [PATCH 32/55] v9.7 - CI | Fix ARMv6 uname workaround --- .build/images/dietpi-build | 4 ++-- .build/software/Amiberry/container_build.bash | 2 +- .build/software/dietpi-software-build.bash | 2 +- .github/workflows/dietpi-software.bash | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 0115ade9f0..831c7bedba 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -9,7 +9,7 @@ if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals else - curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || Error_Exit 'Failed to download DietPi-Globals' # shellcheck disable=SC1091 . /tmp/dietpi-globals G_EXEC rm /tmp/dietpi-globals @@ -613,7 +613,7 @@ _EOF_ G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt # Force ARMv6 arch on Raspbian - (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' + (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index e34aa33f9d..5410a6178f 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -114,7 +114,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 146003a949..3586b35747 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -118,7 +118,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 3754ab75f5..0bf6d7e8f2 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -9,7 +9,7 @@ if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals else - curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || Error_Exit 'Failed to download DietPi-Globals' # shellcheck disable=SC1091 . /tmp/dietpi-globals G_EXEC rm /tmp/dietpi-globals @@ -319,7 +319,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to download DietPi-Globals' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From 581e22100a8c8629790c161b4e64809756bea80e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 15 Aug 2024 20:12:22 +0200 Subject: [PATCH 33/55] v9.7 - CI | Satisfy shellcheck - DietPi-Patches | Migrate to vendor kernel with RK3588 in case of automated first run setup --- .build/images/dietpi-build | 1 + .build/software/Amiberry/container_build.bash | 1 + .build/software/dietpi-software-build.bash | 1 + .github/workflows/dietpi-software.bash | 1 + .update/patches | 4 ++-- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 831c7bedba..e5ab892bd1 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -613,6 +613,7 @@ _EOF_ G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt # Force ARMv6 arch on Raspbian + # shellcheck disable=SC2015 (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 5410a6178f..2a79a55f45 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -114,6 +114,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian +# shellcheck disable=SC2015 (( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 3586b35747..f51d261999 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -118,6 +118,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian +# shellcheck disable=SC2015 (( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 0bf6d7e8f2..f07b1034fa 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -319,6 +319,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian +# shellcheck disable=SC2015 (( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Force RPi on ARM systems if requested diff --git a/.update/patches b/.update/patches index ab3a4fda2a..9203d7762c 100755 --- a/.update/patches +++ b/.update/patches @@ -1690,7 +1690,7 @@ Patch_9_6() then HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP - G_AGI linux-u-boot-nanopi-r6c-legacy + G_AGI linux-u-boot-nanopi-r6c-vendor # Odroid XU4/Meson: Install zstd for better compressed initramfs images elif dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-edge-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null || dpkg-query -s 'linux-image-edge-meson' &> /dev/null @@ -1744,7 +1744,7 @@ Patch_9_7() # RK3588 migration to vendor kernel if (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null then - if G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available + if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available \nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.1 kernel now?' From 0690eaf4a1cc5dafa2dc02fe112d84aa46359fea Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 15 Aug 2024 20:52:42 +0200 Subject: [PATCH 34/55] v9.7 - DietPi-Imager | Better detect last partition of root device: lsblk prints all partitions when given a drive as input, sorted. This avoids /dev/mmcblk0boot0 and alike to be mistakenly picked --- .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 e4369281e0..b560be17d8 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -387,7 +387,7 @@ Run_fsck # Shrink last filesystem to minimum - local last_part_dev=$(lsblk -rnpo NAME "$FP_SOURCE"?* | tail -1) + local last_part_dev=$(lsblk -rnpo NAME "$FP_SOURCE" | tail -1) local last_fs_type=$(lsblk -no FSTYPE "$last_part_dev") if [[ $last_fs_type == 'ext4' ]] then From c63d5cfe1bf061892d7d993e4089ec29d193dd38 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 15 Aug 2024 22:24:28 +0200 Subject: [PATCH 35/55] v9.7 - DietPi-Patches | WIP: Migration for legacy R5S/R5C/6 series --- .update/patches | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.update/patches b/.update/patches index 9203d7762c..55486da02b 100755 --- a/.update/patches +++ b/.update/patches @@ -1778,6 +1778,44 @@ Patch_9_7() *) :;; esac fi + + # NanoPi R5S/R6S migration from legacy image with 8 partitions to Armbian-based kernel and bootloader + elif [[ $G_HW_MODEL == 76 && $(dpkg-query -s 'firmware-nanopi5' &> /dev/null) ]] + then + case $( /dev/null) ]] + then + case $( Date: Thu, 15 Aug 2024 22:31:13 +0200 Subject: [PATCH 36/55] v9.7 - DietPi-Patches | Fix logic --- .update/patches | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index 55486da02b..e25c825515 100755 --- a/.update/patches +++ b/.update/patches @@ -1780,7 +1780,7 @@ Patch_9_7() fi # NanoPi R5S/R6S migration from legacy image with 8 partitions to Armbian-based kernel and bootloader - elif [[ $G_HW_MODEL == 76 && $(dpkg-query -s 'firmware-nanopi5' &> /dev/null) ]] + elif [[ $G_HW_MODEL == 76 ]] && dpkg-query -s 'firmware-nanopi5' &> /dev/null then case $( /dev/null) ]] + elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null then case $( Date: Thu, 15 Aug 2024 22:36:21 +0200 Subject: [PATCH 37/55] v9.7 - DietPi-Patches | Fix HW_MODEL --- .update/patches | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/patches b/.update/patches index e25c825515..b25d0b88d7 100755 --- a/.update/patches +++ b/.update/patches @@ -1784,7 +1784,7 @@ Patch_9_7() then case $( Date: Thu, 15 Aug 2024 23:38:38 +0200 Subject: [PATCH 38/55] v9.7 - DietPi-Installer | Suppport Git branch names with forwards flashes - DietPi-Patches | Install kernel and bootloader scripts and configs for legacy image migrations --- .build/images/dietpi-installer | 43 +++++++++++++++--------------- .update/patches | 48 ++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 23 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 01ef989236..e955c2c4a6 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -588,10 +588,11 @@ _EOF_ #------------------------------------------------------------------------------------------------ G_EXEC_DESC='Downloading source code' G_EXEC curl -sSfLO "https://github.com/$G_GITOWNER/DietPi/archive/$G_GITBRANCH.tar.gz" - [[ -d DietPi-$G_GITBRANCH ]] && G_EXEC_DESC='Removing old source code' G_EXEC rm -R "DietPi-$G_GITBRANCH" - G_EXEC_DESC='Unpacking source code' G_EXEC tar xf "$G_GITBRANCH.tar.gz" - G_EXEC_DESC='Removing unused files' G_EXEC rm -f "$G_GITBRANCH.tar.gz" "DietPi-$G_GITBRANCH/dietpi/"{pre-patch_file,patch_file,server_version-6} - G_EXEC_DESC='Hardening source code mode' G_EXEC chmod -R g-w "DietPi-$G_GITBRANCH" + local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + [[ -d $dir ]] && G_EXEC_DESC='Removing old source code' G_EXEC rm -R "$dir" + G_EXEC_DESC='Unpacking source code' G_EXEC tar xf "${G_GITBRANCH##*/}.tar.gz" # Support for Git branch names with forward slashes + G_EXEC_DESC='Removing unused files' G_EXEC rm -f "${G_GITBRANCH##*/}.tar.gz" "$dir/"{pre-patch_file,patch_file,server_version-6} + G_EXEC_DESC='Hardening update archive mode' G_EXEC chmod -R g-w "$dir" [[ -d '/boot' ]] || G_EXEC mkdir /boot @@ -605,9 +606,9 @@ _EOF_ then G_EXEC ln -sf firmware/cmdline.txt /boot/cmdline.txt G_EXEC ln -sf firmware/config.txt /boot/config.txt - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/RPi/config.txt" /boot/firmware/ + G_EXEC mv "$dir/.build/images/RPi/config.txt" /boot/firmware/ else - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/RPi/config.txt" /boot/ + G_EXEC mv "$dir/.build/images/RPi/config.txt" /boot/ fi echo "root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /) rootfstype=$(findmnt -Ufnro FSTYPE -M /) rootwait net.ifnames=0 logo.nologo console=serial0,115200 console=tty1" > /boot/cmdline.txt # Boot in 64-bit mode if this is a 64-bit image @@ -618,26 +619,26 @@ _EOF_ armbian_packages=1 local model='OdroidC1' (( $G_HW_MODEL == 11 )) && model='OdroidXU4' - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/$model/boot.ini" /boot/boot.ini + G_EXEC mv "$dir/.build/images/$model/boot.ini" /boot/boot.ini G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=UUID=$(findmnt -Ufnro UUID -M /)/" /boot/boot.ini G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/boot.ini G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC mv "$dir/.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|88|89|90)$ ]] then armbian_packages=1 - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot # Odroid C2: Fix USB device detection: https://github.com/MichaIng/DietPi/issues/5963 if (( $G_HW_MODEL == 12 )) then @@ -787,7 +788,7 @@ setenv rootuuid "true"' /boot/boot.cmd # NanoPi M3/T3/Fire3 (64-bit) elif (( $G_HW_MODEL == 62 )) then - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd G_EXEC sed --follow-symlinks -i '/overlay/d' /boot/dietpiEnv.txt G_EXEC sed --follow-symlinks -i 's/ttyAML0/ttySAC0/' /boot/dietpiEnv.txt fi @@ -796,20 +797,20 @@ setenv rootuuid "true"' /boot/boot.cmd # shellcheck disable=SC2016 [[ -f '/etc/initramfs/post-update.d/99-dietpi-uboot' && $(findmnt -t vfat -M /boot) ]] && G_EXEC sed --follow-symlinks -i '/^ln -s/c\mv -v "/boot/uInitrd-$1" /boot/uInitrd' /etc/initramfs/post-update.d/99-dietpi-uboot # FAT does not support symlinks - G_EXEC mv "DietPi-$G_GITBRANCH/dietpi.txt" /boot/ - G_EXEC mv "DietPi-$G_GITBRANCH/README.md" /boot/dietpi-README.md - G_EXEC mv "DietPi-$G_GITBRANCH/LICENSE" /boot/dietpi-LICENSE.txt + G_EXEC mv "$dir/dietpi.txt" /boot/ + G_EXEC mv "$dir/README.md" /boot/dietpi-README.md + G_EXEC mv "$dir/LICENSE" /boot/dietpi-LICENSE.txt # Reading version string for later use # shellcheck source=.update/version source=/boot/dietpi/.version - . "DietPi-$G_GITBRANCH/.update/version" + . "$dir/.update/version" G_DIETPI_VERSION_CORE=$G_REMOTE_VERSION_CORE G_DIETPI_VERSION_SUB=$G_REMOTE_VERSION_SUB G_DIETPI_VERSION_RC=$G_REMOTE_VERSION_RC - G_EXEC_DESC='Copy DietPi scripts to /boot/dietpi' G_EXEC cp -a "DietPi-$G_GITBRANCH/dietpi" /boot/ - G_EXEC_DESC='Copy DietPi system files in place' G_EXEC cp -a "DietPi-$G_GITBRANCH/rootfs/." / - G_EXEC_DESC='Clean download location' G_EXEC rm -R "DietPi-$G_GITBRANCH" + G_EXEC_DESC='Copy DietPi scripts to /boot/dietpi' G_EXEC cp -a "$dir/dietpi" /boot/ + G_EXEC_DESC='Copy DietPi system files in place' G_EXEC cp -a "$dir/rootfs/." / + G_EXEC_DESC='Clean download location' G_EXEC rm -R "$dir" G_DIETPI-NOTIFY 2 'Storing DietPi version info:' G_CONFIG_INJECT 'DEV_GITBRANCH=' "DEV_GITBRANCH=$G_GITBRANCH" /boot/dietpi.txt diff --git a/.update/patches b/.update/patches index b25d0b88d7..c851196c3c 100755 --- a/.update/patches +++ b/.update/patches @@ -1795,7 +1795,26 @@ Patch_9_7() \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.1 kernel now?' then - : + # Packages + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" + # Install boot scripts and configs + local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt + G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + 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 + G_CONFIG_INJECT 'overlay_path=' 'overlay_path=rockchip' /boot/dietpiEnv.txt + # Overlay prefix + G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt + # Console args + G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt fi elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null @@ -1814,7 +1833,32 @@ Patch_9_7() \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.6 kernel now?' then - : + # Packages + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" + # Install boot scripts and configs + local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt + G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + 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 + G_CONFIG_INJECT 'overlay_path=' 'overlay_path=rockchip' /boot/dietpiEnv.txt + # Device tree + case $model in + 'nanopi-r6s') G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6s.dtb' /boot/dietpiEnv.txt;; + 'nanopi-r6c') G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + *) :;; + esac + # Overlay prefix + G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt + # Console args + G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt fi fi From 026db6f1772f8a87ac910f3067b271b4e5061f67 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 15 Aug 2024 23:41:27 +0200 Subject: [PATCH 39/55] v9.7 - DietPi-Patches | Fix directories --- .update/patches | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index c851196c3c..959dc36079 100755 --- a/.update/patches +++ b/.update/patches @@ -1799,7 +1799,7 @@ Patch_9_7() G_AGI armbian-firmware initramfs-tools u-boot-tools zstd G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" # Install boot scripts and configs - local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt @@ -1837,7 +1837,7 @@ Patch_9_7() G_AGI armbian-firmware initramfs-tools u-boot-tools zstd G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" # Install boot scripts and configs - local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt From 17b35a998c8e984245fe9a7dacf556996e726fea Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 16 Aug 2024 00:31:44 +0200 Subject: [PATCH 40/55] v9.7 - DietPi-Patches | Install packages after postinst scripts have been installed, avoid needless kernel and initramfs image symlinks in filesystem root, build boot script and flash bootloader --- .update/patches | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.update/patches b/.update/patches index 959dc36079..7c2d7d6851 100755 --- a/.update/patches +++ b/.update/patches @@ -1795,9 +1795,6 @@ Patch_9_7() \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.1 kernel now?' then - # Packages - G_AGI armbian-firmware initramfs-tools u-boot-tools zstd - G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" # Install boot scripts and configs local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -1815,6 +1812,14 @@ Patch_9_7() G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt # Console args G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt + # Packages + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" + # Build boot script + G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr + # Flash bootloader + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc fi elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null @@ -1833,9 +1838,6 @@ Patch_9_7() \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.6 kernel now?' then - # Packages - G_AGI armbian-firmware initramfs-tools u-boot-tools zstd - G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" # Install boot scripts and configs local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -1859,6 +1861,14 @@ Patch_9_7() G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt # Console args G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt + # Packages + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" + # Build boot script + G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr + # Flash bootloader + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc fi fi From 81b0a524c333a43256387fbdb3324468b0ec06c0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 22 Aug 2024 02:12:57 +0200 Subject: [PATCH 41/55] v9.7 - DietPi-Patches | Fix kernel version info on NanoPi 5/6 migration, do some safety checks and do the sadly needed re-partitioning, to have the root partition at number 1. --- .update/patches | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/.update/patches b/.update/patches index 7c2d7d6851..8f211100ce 100755 --- a/.update/patches +++ b/.update/patches @@ -1789,12 +1789,23 @@ Patch_9_7() esac G_AGUP if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel and bootloader upgrade available -\nFor the NanoPi R5S/R5C, we offer a major kernel upgrade to Linux 6.1, based on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nFor the NanoPi R5S/R5C, we offer a major kernel upgrade to Linux 6.6, based on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. \nAdditionally, compared to the previously hidden kernel image and boot config on the first 7 partitions, the new image and configs will stored and available within the /boot partition, so that kernel command-line parameters can be adjusted. Also kernel headers are available to compile new kernel modules. \nThis implies flashing a new bootloader image, which reads boot scripts from the root partition. \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. -\nDo you want to migrate to the new Linux 6.1 kernel now?' +\nDo you want to migrate to the new Linux 6.6 kernel now?' then + # Safety checks + if [[ $G_ROOTFS_DEV != *'8' ]] + then + G_DIETPI-NOTIFY 1 "Root filesystem is not located on partition 8 as intended, but \"$G_ROOTFS_DEV\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + + elif [[ $(lsblk -no START "$G_ROOTFS_DEV") != 286720 ]] + then + G_DIETPI-NOTIFY 1 "Root partition does not start at sector 286720 as intended, but \"$(lsblk -no START "$G_ROOTFS_DEV")\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + fi # Install boot scripts and configs local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -1820,6 +1831,12 @@ Patch_9_7() G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr # Flash bootloader /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + G_EXEC apt-mark auto firmware-nanopi5 + # Redo partitioning + G_DIETPI-NOTIFY 1 'Rewriting partition table to have root filesystem in partition 1' + local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") + G_EXEC parted "$rootdrive" rm 1 rm 2 rm 3 rm 4 rm 5 rm 6 rm 7 rm 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk "$rootdrive" <<< '286720,+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null @@ -1832,12 +1849,23 @@ Patch_9_7() esac G_AGUP if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel and bootloader upgrade available -\nFor the NanoPi 6 series, we offer a major kernel upgrade to Linux 6.6, based on mainline kernel sources which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nFor the NanoPi 6 series, we offer a major kernel upgrade to Linux 6.1, based on mainline kernel sources which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. \nAdditionally, compared to the previously hidden kernel image and boot config on the first 7 partitions, the new image and configs will stored and available within the /boot partition, so that kernel command-line parameters can be adjusted. Also kernel headers are available to compile new kernel modules. \nThis implies flashing a new bootloader image, which reads boot scripts from the root partition. \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. -\nDo you want to migrate to the new Linux 6.6 kernel now?' +\nDo you want to migrate to the new Linux 6.1 kernel now?' then + # Safety checks + if [[ $G_ROOTFS_DEV != *'8' ]] + then + G_DIETPI-NOTIFY 1 "Root filesystem is not located on partition 8 as intended, but \"$G_ROOTFS_DEV\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + + elif [[ $(lsblk -no START "$G_ROOTFS_DEV") != 286720 ]] + then + G_DIETPI-NOTIFY 1 "Root partition does not start at sector 286720 as intended, but \"$(lsblk -no START "$G_ROOTFS_DEV")\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + fi # Install boot scripts and configs local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -1869,6 +1897,13 @@ Patch_9_7() G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr # Flash bootloader /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + G_EXEC apt-mark auto firmware-nanopi6 + # Redo partitioning + G_DIETPI-NOTIFY 1 'Rewriting partition table to have root filesystem in partition 1' + local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") + G_EXEC parted "$rootdrive" rm 1 rm 2 rm 3 rm 4 rm 5 rm 6 rm 7 rm 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk -N1 "$rootdrive" <<< '286720' + G_EXEC_OUTPUT=1 G_EXEC sfdisk -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi fi From c47fef4cb007abfce12421d5ad21d44b869db296 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 22 Aug 2024 03:24:55 +0200 Subject: [PATCH 42/55] v9.7 - DietPi-Patches | Switch to sfdisk for removing root partition, as it is nearly impossible to do this with parted non-interactively. Avoid sfdisk error, since the kernel cannot re-read the root partition table. --- .update/patches | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.update/patches b/.update/patches index 8f211100ce..3506f35a8b 100755 --- a/.update/patches +++ b/.update/patches @@ -1833,10 +1833,11 @@ Patch_9_7() /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc G_EXEC apt-mark auto firmware-nanopi5 # Redo partitioning - G_DIETPI-NOTIFY 1 'Rewriting partition table to have root filesystem in partition 1' + G_DIETPI-NOTIFY 2 'Rewriting partition table to have root filesystem in partition 1' local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") - G_EXEC parted "$rootdrive" rm 1 rm 2 rm 3 rm 4 rm 5 rm 6 rm 7 rm 8 - G_EXEC_OUTPUT=1 G_EXEC sfdisk "$rootdrive" <<< '286720,+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null @@ -1899,11 +1900,11 @@ Patch_9_7() /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc G_EXEC apt-mark auto firmware-nanopi6 # Redo partitioning - G_DIETPI-NOTIFY 1 'Rewriting partition table to have root filesystem in partition 1' + G_DIETPI-NOTIFY 2 'Rewriting partition table to have root filesystem in partition 1' local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") - G_EXEC parted "$rootdrive" rm 1 rm 2 rm 3 rm 4 rm 5 rm 6 rm 7 rm 8 - G_EXEC_OUTPUT=1 G_EXEC sfdisk -N1 "$rootdrive" <<< '286720' - G_EXEC_OUTPUT=1 G_EXEC sfdisk -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi fi From 7ba254eea488992786a5d33a707982906368e987 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 22 Aug 2024 23:19:21 +0200 Subject: [PATCH 43/55] v9.7 - Odroid C1 | MIgrate to edge kernel - NanoPi R5S/R5C | Migrate changed LAN port in network config after kernel migration --- .build/images/dietpi-imager | 2 +- .build/images/dietpi-installer | 2 +- .update/patches | 32 +++++++++++++++++++++++++++++--- .update/version | 2 +- CHANGELOG.txt | 5 +++-- dietpi/func/dietpi-globals | 2 +- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index b560be17d8..7c5f21817e 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -753,7 +753,7 @@ _EOF_ # Move GPT backup partition table to end of drive if [[ $CLONING_TOOL != 'Clonezilla' && $PART_TABLE_TYPE == 'gpt' ]] then - G_EXEC_DESC='Moving GPT backup partition table to end of drive' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Re-creating GPT backup partition table and header at end of image' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC sync fi diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index e955c2c4a6..a21b977c0d 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1058,7 +1058,7 @@ setenv rootuuid "true"' /boot/boot.cmd # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in - 10) model='odroidc1' kernel='meson' arch='arm';; + 10) model='odroidc1' kernel='meson' arch='arm' branch='edge';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; 12) model='odroidc2';; 16) model='odroidc4';; diff --git a/.update/patches b/.update/patches index 3506f35a8b..dc9de133b3 100755 --- a/.update/patches +++ b/.update/patches @@ -1741,8 +1741,19 @@ _EOF_ Patch_9_7() { + # Odroid C1: Migrate to edge kernel, which fixes USB: https://github.com/MichaIng/DietPi/issues/7089 + if (( $G_HW_MODEL == 10 )) && dpkg-query -s 'linux-image-current-meson' &> /dev/null && ! dpkg-query -s 'linux-image-edge-meson' &> /dev/null && ! dpkg-query -s 'linux-image-legacy-meson' &> /dev/null + then + G_DIETPI-NOTIFY 2 'Migrating to edge kernel to fix USB support' + G_AGI linux-{image,dtb}-edge-meson linux-u-boot-odroidc1-edge + dpkg-query -s 'linux-headers-edge-meson' &> /dev/null && G_AGI linux-headers-edge-meson + dpkg-query -s 'linux-libc-dev-edge-meson' &> /dev/null && G_AGI linux-libc-dev-edge-meson + G_AGP linux-{image,dtb,headers,libc-dev}-edge-meson + # The /boot/dtb symlink has been found to be missing after kernel removed, despite a newer kernel being installed already. Assure it is present and correct. + [[ $(realpath '/boot/dtb') == '/boot/dtb-6.'* ]] || G_EXEC ln -sf /boot/dtb-6.* /boot/dtb + # RK3588 migration to vendor kernel - if (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null + elif (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null then if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available \nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. @@ -1825,6 +1836,7 @@ Patch_9_7() G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt # Packages G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGP firmware-atheros firmware-iwlwifi # missing conflict in armbian-firmware package G_AGI armbian-firmware initramfs-tools u-boot-tools zstd G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" # Build boot script @@ -1837,7 +1849,20 @@ Patch_9_7() local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' - G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # Needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + # LAN interface migration + G_DIETPI-NOTIFY 2 'Migrating LAN interface configs' + case $( /dev/null @@ -1892,6 +1917,7 @@ Patch_9_7() G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt # Packages G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGP firmware-atheros firmware-iwlwifi # missing conflict in armbian-firmware package G_AGI armbian-firmware initramfs-tools u-boot-tools zstd G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" # Build boot script @@ -1904,7 +1930,7 @@ Patch_9_7() local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' - G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # Needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi fi diff --git a/.update/version b/.update/version index d49b5664fd..97cc67b238 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=7 -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 b18fd2beee..7a990af87b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,9 +1,10 @@ v9.7 -(2024-08-03) +(2024-08-23) Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. -- RK3588 SoCs | This DietPi update offers a migration from the legacy Linux 5.10 kernel to "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. +- Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems to +- RK3588 SoCs | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 systems up to a further supported and updated kernel source. - DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 Bug fixes: diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index ff61b9d38d..63d9afa93d 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=7 - [[ $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 9373e2d4b11b20e99b2cdad585a7b80970920a36 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 00:13:24 +0200 Subject: [PATCH 44/55] v9.7 - DietPi-Patches | Fix Ethernet port migration --- .update/patches | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.update/patches b/.update/patches index dc9de133b3..925b41c759 100755 --- a/.update/patches +++ b/.update/patches @@ -1812,7 +1812,7 @@ Patch_9_7() G_DIETPI-NOTIFY 1 "Root filesystem is not located on partition 8 as intended, but \"$G_ROOTFS_DEV\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" exit 1 - elif [[ $(lsblk -no START "$G_ROOTFS_DEV") != 286720 ]] + elif [[ $(partx -rgo START "$G_ROOTFS_DEV") != 286720 ]] then G_DIETPI-NOTIFY 1 "Root partition does not start at sector 286720 as intended, but \"$(lsblk -no START "$G_ROOTFS_DEV")\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" exit 1 @@ -1853,15 +1853,16 @@ Patch_9_7() # LAN interface migration G_DIETPI-NOTIFY 2 'Migrating LAN interface configs' case $( Date: Fri, 23 Aug 2024 00:19:33 +0200 Subject: [PATCH 45/55] v9.7 - DietPi-Patches | Avoid shell warning for command substitution reading /proc node --- .update/patches | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.update/patches b/.update/patches index 925b41c759..002e2d995f 100755 --- a/.update/patches +++ b/.update/patches @@ -1793,7 +1793,9 @@ Patch_9_7() # NanoPi R5S/R6S migration from legacy image with 8 partitions to Armbian-based kernel and bootloader elif [[ $G_HW_MODEL == 76 ]] && dpkg-query -s 'firmware-nanopi5' &> /dev/null then - case $( /dev/null then - case $( Date: Fri, 23 Aug 2024 00:32:23 +0200 Subject: [PATCH 46/55] v9.7 - DietPi-Patches | Always follow symlink when using sed --- .update/patches | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.update/patches b/.update/patches index 002e2d995f..5cc61dc3ab 100755 --- a/.update/patches +++ b/.update/patches @@ -1862,9 +1862,9 @@ Patch_9_7() for i in /etc/network/interfaces{,.d/*} do [[ -f $i ]] || continue - G_EXEC sed -i -e "s/eth0/$eth0/g" -e "s/eth1/$eth1/g" "$i" - [[ $eth2 ]] && G_EXEC sed -i "s/eth2/$eth2/g" "$i" - G_EXEC sed -i 's/ethto/eth/g' "$i" + G_EXEC sed --follow-symlinks -i -e "s/eth0/$eth0/g" -e "s/eth1/$eth1/g" "$i" + [[ $eth2 ]] && G_EXEC sed --follow-symlinks -i "s/eth2/$eth2/g" "$i" + G_EXEC sed --follow-symlinks -i 's/ethto/eth/g' "$i" done fi @@ -1945,8 +1945,8 @@ Patch_9_7() [[ $eth0 == 'skip' ]] || for i in /etc/network/interfaces{,.d/*} do [[ -f $i ]] || continue - G_EXEC sed -i -e "s/eth1/$eth1/g" -e "s/eth2/$eth2/g" "$i" - G_EXEC sed -i 's/ethto/eth/g' "$i" + G_EXEC sed --follow-symlinks -i -e "s/eth1/$eth1/g" -e "s/eth2/$eth2/g" "$i" + G_EXEC sed --follow-symlinks -i 's/ethto/eth/g' "$i" done fi fi From 53c9fab46b13f6e81a4d2b832dddcc684431d782 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 00:45:12 +0200 Subject: [PATCH 47/55] v9.7 - CHANGELOG | Complement Odroid C1 changelog entry --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7a990af87b..eb6185a694 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,7 +3,7 @@ v9.7 Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. -- Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems to +- Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems which run in "current" branch Linux 6.6 to edge branch kernel with Linux 6.9 or later. This solves non-functional USB ports: https://github.com/MichaIng/DietPi/issues/7089 - RK3588 SoCs | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 systems up to a further supported and updated kernel source. - DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 From 7dc19d2dd1679b23fa3b7b8554567e09ae8d8091 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 00:54:13 +0200 Subject: [PATCH 48/55] v9.7 - CHANGELOG | Complement changelog entry --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index eb6185a694..568e9bf944 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,7 +4,7 @@ v9.7 Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. - Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems which run in "current" branch Linux 6.6 to edge branch kernel with Linux 6.9 or later. This solves non-functional USB ports: https://github.com/MichaIng/DietPi/issues/7089 -- RK3588 SoCs | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 systems up to a further supported and updated kernel source. +- NanoPi R5S/R5C/R6S/R6C/T6, Orange Pi 5/5 Plus, ROCK 5 | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Old NanoPi R5S/R5C images with 8 partitions setup will be migrated to mainline Linux 6.6. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 and NanoPi R5S/R5C systems up to a further supported and updated kernel source. - DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 Bug fixes: From f540d545355992f9b55799c80d4a5a2efd5b04d9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 01:01:29 +0200 Subject: [PATCH 49/55] v9.7 - DietPi-Installer | Do complete Armbian base-files downgrade, if required --- .build/images/dietpi-installer | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index a21b977c0d..fe7a3e7469 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1052,8 +1052,16 @@ setenv rootuuid "true"' /boot/boot.cmd # Remove obsolete lists find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + - # Armbian base images: Downgrade base-files package to the version provided by Debian - dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 && G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 + then + G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s' + cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp +Package: base-files +Pin: release o=Debian +Pin-Priority: 1000 +_EOF_ + G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' + fi # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() From a9112c24f4ce59434f0c5df16359787d5ffbfaa0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 23:42:41 +0200 Subject: [PATCH 50/55] v9.7 - RC up - CHANGELOG | Fix typo and add release PR URL --- .update/version | 2 +- CHANGELOG.txt | 4 ++-- dietpi/func/dietpi-globals | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.update/version b/.update/version index 97cc67b238..a8977da8a1 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=7 -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/CHANGELOG.txt b/CHANGELOG.txt index 568e9bf944..18d6657709 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,10 +9,10 @@ Enhancements: Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 -- DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thansk to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 +- DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thanks to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 - DietPi-Software | WiFi Hotspot: Resolved an issue where the hotspot failed because of an unintended character in the interface configuration. Many thanks to @wimduk for reporting this issue: https://dietpi.com/forum/t/20744 -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/7193 ----------------------------------------------------------------------------------------------------------- diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 63d9afa93d..6e88809437 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=7 - [[ $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 393f77e22d8259d45f0150a12d6fabd090345d27 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 00:14:26 +0200 Subject: [PATCH 51/55] v9.7 - DietPi-Build | Fix uname path on container host --- .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 e5ab892bd1..3f15a16e7e 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -689,7 +689,7 @@ _EOF_ G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=9.9.9.9' rootfs/boot/dietpi.txt # Revert ARMv6 Workaround - (( $HW_ARCH == 1 )) && G_EXEC rm /usr/local/bin/uname + (( $HW_ARCH == 1 )) && G_EXEC rm rootfs/usr/local/bin/uname # Revert workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962 (( $DISTRO == 8 )) && G_EXEC rm rootfs/etc/systemd/system/{multi-user.target.wants/,}dietpi-automation.service From 387706aa53a585e5191c57f296d920e17baa9f97 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 00:19:02 +0200 Subject: [PATCH 52/55] v9.7 - DietPi-Installer | Do remove again directories from /etc/apt/sources.list.d. No directory has any reason to be within it. --- .build/images/dietpi-installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index fe7a3e7469..f60c82ddf2 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1050,7 +1050,7 @@ setenv rootuuid "true"' /boot/boot.cmd [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete lists - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rv {} + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 then @@ -1410,7 +1410,7 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete components from Armbian list and connect via HTTPS - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rv {} + 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 From d9690d6ea13d2592c828a3884511a739116ce6b2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 00:42:51 +0200 Subject: [PATCH 53/55] v9.7 - DietPi-Software | Update fallback URL and revert Snapcast back to direct DEB package downloads, which are available again with latest release --- dietpi/dietpi-software | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 92bfba1cda..2dfedd3ed7 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6522,7 +6522,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.59.0/frp_0.59.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.60.0/frp_0.60.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_* @@ -7057,7 +7057,7 @@ _EOF_ aDEPS=() else local version=$(curl -sSfL 'https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='1.24.1'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='1.24.2'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/FreshRSS/FreshRSS/archive/$version.tar.gz" G_EXEC mv "FreshRSS-$version" /opt/FreshRSS fi @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v7.0.9/koel-v7.0.9.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.10/koel-v7.0.10.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9546,7 +9546,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.8.3.8933/Radarr.master.5.8.3.8933.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.9.1.9070/Radarr.master.5.9.1.9070.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9988,7 +9988,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.21.2.4649/Prowlarr.master.1.21.2.4649.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.22.0.4670/Prowlarr.master.1.22.0.4670.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 @@ -11592,7 +11592,7 @@ _EOF_ G_AGI snapserver # Install and enable snapweb web UI, not included in Debian's snapserver package: https://github.com/MichaIng/DietPi/issues/7073 - local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.7.0/snapweb_0.7.0-1_all.deb' + local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.8.0/snapweb_0.8.0-1_all.deb' Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"/{print $4}')" G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapweb' /etc/snapserver.conf '\[http\]' @@ -11601,10 +11601,8 @@ _EOF_ getent passwd snapserver > /dev/null && G_EXEC userdel snapserver 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_*_"$arch.deb" - G_EXEC rm snap*.deb + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapserver_0.29.0-1_${arch}_$dist.deb" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_$dist.deb\"/{print \$4}")" # Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver" [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver @@ -11624,10 +11622,8 @@ _EOF_ 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_"$arch.deb" - G_EXEC rm snap*.deb + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapclient_0.29.0-1_${arch}_$dist.deb" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_$dist.deb\"/{print \$4}")" fi G_EXEC systemctl stop snapclient From 260905e2436dbdc71aaa62138115920f52b7b342 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 01:13:49 +0200 Subject: [PATCH 54/55] v9.7 - CI | Fix logic --- .build/images/dietpi-build | 2 +- .build/software/Amiberry/container_build.bash | 2 +- .build/software/dietpi-software-build.bash | 2 +- .github/workflows/dietpi-software.bash | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 3f15a16e7e..fb08611d90 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -614,7 +614,7 @@ _EOF_ # Force ARMv6 arch on Raspbian # shellcheck disable=SC2015 - (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' + (( $HW_ARCH > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 2a79a55f45..92d7f0e222 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -115,7 +115,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index f51d261999..906e79a3da 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -119,7 +119,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index f07b1034fa..96d5b46c79 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -320,7 +320,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From aa8e2d9753daddecf4b0ffa73e229267530c7354 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 01:29:49 +0200 Subject: [PATCH 55/55] v9.7 - DietPi-Software | Snapcast: Fix install on Trixie, which has conflicting dependencies with the Bookworm package. Install from Debian repo, just like for RISC-V (which is Trixie/Sid anyway) --- dietpi/dietpi-software | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2dfedd3ed7..099d46dd4b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11586,8 +11586,8 @@ _EOF_ if To_Install 191 snapserver # Snapcast Server then - # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases - if (( $G_HW_ARCH == 11 )) + # RISC-V/Trixie: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_DISTRO > 7 )) then G_AGI snapserver @@ -11600,9 +11600,9 @@ _EOF_ [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R '_snapserver:_snapserver' /var/lib/snapserver getent passwd snapserver > /dev/null && G_EXEC userdel snapserver else - local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapserver_0.29.0-1_${arch}_$dist.deb" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_$dist.deb\"/{print \$4}")" + local arch=$(dpkg --print-architecture) + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapserver_0.29.0-1_${arch}_$G_DISTRO_NAME.deb" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_$G_DISTRO_NAME.deb\"/{print \$4}")" # Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver" [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver @@ -11616,14 +11616,14 @@ _EOF_ if To_Install 192 snapclient # Snapcast Client then - # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases - if (( $G_HW_ARCH == 11 )) + # RISC-V/Trixie: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_DISTRO > 7 )) then 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.29.0/snapclient_0.29.0-1_${arch}_$dist.deb" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_$dist.deb\"/{print \$4}")" + local arch=$(dpkg --print-architecture) + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapclient_0.29.0-1_${arch}_$G_DISTRO_NAME.deb" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_$G_DISTRO_NAME.deb\"/{print \$4}")" fi G_EXEC systemctl stop snapclient