diff --git a/.meta/dietpi-rpi-firmware-migration b/.meta/dietpi-rpi-firmware-migration index e9b20c7e3a..18ee47996d 100644 --- a/.meta/dietpi-rpi-firmware-migration +++ b/.meta/dietpi-rpi-firmware-migration @@ -12,14 +12,7 @@ G_CHECK_FREESPACE / 200 G_INIT # Import DietPi-Globals --------------------------------------------------------------- -G_DIETPI-NOTIFY 2 'Updating DietPi to latest required dev branch version' -G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' /boot/dietpi.txt -if (( $G_DIETPI_VERSION_CORE < 9 )) -then - /boot/dietpi/dietpi-update 1 -else - /boot/dietpi/dietpi-update -1 -fi +/boot/dietpi/dietpi-update 1 # Temporary rootfs mount G_EXEC mkdir -p rootfs diff --git a/.update/patches b/.update/patches index be2284e30e..3c3968ce67 100755 --- a/.update/patches +++ b/.update/patches @@ -1477,21 +1477,6 @@ Patch_8_25() # Software updates and migrations if [[ -f '/boot/dietpi/.installed' ]] then - # vaultwarden - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.1-dietpi2 - then - # Pre-v8.7 cleanup - if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] - then - G_EXEC rm -R /opt/vaultwarden - [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service - fi - G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" - G_AGI ./package.deb - G_EXEC rm package.deb - fi - # NZBGet: Disable file logging if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[149\]=2' /boot/dietpi/.installed && [[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]] then @@ -1512,7 +1497,7 @@ Patch_9_0() then for i in quartz64{a,b} soquartz do - dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.6.10-dietpi1 || continue + dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.6.12-dietpi1 || continue G_DIETPI-NOTIFY 2 "Updating $i kernel and bootloader ..." G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/firmware-$i.deb" G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb @@ -1521,7 +1506,7 @@ Patch_9_0() done # VisionFive 2 - elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.72-dietpi1 + elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.73-dietpi1 then G_DIETPI-NOTIFY 2 'Updating RISC-V StarFive VisionFive 2 kernel ...' G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' @@ -1529,7 +1514,7 @@ Patch_9_0() G_EXEC rm package.deb # Star64 - elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.72-dietpi1 + elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.73-dietpi1 then G_DIETPI-NOTIFY 2 'Updating RISC-V PINE64 Star64 kernel ...' G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb' @@ -1572,6 +1557,21 @@ Patch_9_0() # Kodi [[ -f '/usr/share/applications/kodi.desktop' ]] && G_CONFIG_INJECT 'Exec=' 'Exec=kodi --standalone' /usr/share/applications/kodi.desktop + + # vaultwarden + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.1-dietpi3 + then + # Pre-v8.7 cleanup + if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] + then + G_EXEC rm -R /opt/vaultwarden + [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service + fi + G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" + G_AGI ./package.deb + G_EXEC rm package.deb + fi fi } diff --git a/.update/version b/.update/version index 2e229069d2..ecd150c4be 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=0 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_RC=2 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index dc81813125..735f25c9fe 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,7 +6,7 @@ Breaking: - The minimum DietPi version to support direct updates to DietPi v9 from has been raised to v7.0. Older systems will go through a two-stage process, being upgraded to DietPi v8.25 with a separate branch, and afterwards further to DietPi v9 via master branch if the Debian version requirement is met as well. New images: -- Orange Pi Zero 3 | New images for the 1.5 GB RAM variant are now available for testing, before they are added to our download page soon: https://dietpi.com/downloads/binaries/testing/ +- Orange Pi Zero 3 | New images for the 1.5 GB RAM variant are now available for testing, before they are added to our download page soon: https://dietpi.com/downloads/images/testing/ Enhancements: - Raspberry Pi | Further work has been done to better support the Raspberry Pi 5. Our firmware migration script to test it has been reworked to allow selecting/deselecting optional kernel packages, instead of always installing all of them: https://github.com/MichaIng/DietPi/issues/6676 @@ -16,6 +16,7 @@ Enhancements: - DietPi-Software | Logitech Media Server: Re-enabled it for Bookworm and Trixie, now using the latest "stable nightly" builds instead of the "latest releases". Many thanks to @SteveInWA for informing us about the update: https://github.com/MichaIng/DietPi/discussions/6847 Bug fixes: +- Orange Pi 3B | Resolved an issue where onboard WiFi and Bluetooth did not work because the related kernel module was not loaded. Many thanks to @jake5253 for reporting this: https://github.com/MichaIng/DietPi/issues/6659#issuecomment-1887072641 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/6860 @@ -25,8 +26,8 @@ v8.25 (2023-12-16) New images: -- Star64 | Support for the RISC-V StarFive VisionFive 2 clone from PINE64 has been added to DietPi. The images are highly experimental, like software support for the architecture in general. Find our images here, before they are added to our download page soon: https://dietpi.com/downloads/binaries/testing/ -- Orange Pi 3B | Support for this RK3566 SBC has been added to DietPi. Find our images here, before they are added to our download page soon: https://dietpi.com/downloads/binaries/testing/ +- Star64 | Support for the RISC-V StarFive VisionFive 2 clone from PINE64 has been added to DietPi. The images are highly experimental, like software support for the architecture in general. Find our images here, before they are added to our download page soon: https://dietpi.com/downloads/images/testing/ +- Orange Pi 3B | Support for this RK3566 SBC has been added to DietPi. Find our images here, before they are added to our download page soon: https://dietpi.com/downloads/images/testing/ Enhancements: - Raspberry Pi | We applied preparations for supporting the new official Raspberry Pi firmware and kernel packages, which implies support for Raspberry Pi 5. A script allows to the migration to the new package set, including the switch for the boot mountpoint from /boot to /boot/firmware. Please see the following topic about how to apply the script. Note that it is in beta stage for now, since the change might cause issues among our scripts which we did not detect yet: https://github.com/MichaIng/DietPi/issues/6676 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a47f63041c..1caa05f941 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6287,7 +6287,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.7.12/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.7.13/kavita-linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC chmod +x Kavita/Kavita @@ -9995,7 +9995,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.11.4.4173/Prowlarr.master.1.11.4.4173.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.12.2.4211/Prowlarr.master.1.12.2.4211.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 @@ -10570,7 +10570,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.3/gitea-1.21.3-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.4/gitea-1.21.4-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 4f6ba35801..2f0fe36df9 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=0 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 07a02c6215..39b83cc8f7 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1146,7 +1146,7 @@ _EOF_ 'btbcm' # RPi3 Broadcom onboard 'rfcomm' # BPi Pro/M2+ and others 'hidp' # BPi Pro/M2+ and others - 'sprdbt_tty' # Orange Pi Zero 3 + 'sprdbt_tty' # Orange Pi 3B/Zero 3 'hci_uart' ) @@ -1244,10 +1244,10 @@ Do you want to continue and disable the serial login console?' || return 1 then (( $G_HW_ONBOARD_WIFI )) && G_EXEC systemctl enable hciuart - # Orange Pi Zero 3 - elif (( $G_HW_MODEL == 83 )) + # Orange Pi 3B/Zero 3: Module does not load automatically + elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] then - G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' + modprobe -n sprdbt_tty 2> /dev/null && G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' fi else @@ -1340,8 +1340,8 @@ Do you want to continue and disable the serial login console?' || return 1 then aWIFI_MODULES+=('bcmdhd') - # + Orange Pi Zero 3 - elif (( $G_HW_MODEL == 83 )) + # + Orange Pi 3B/Zero 3 + elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] then aWIFI_MODULES+=('sprdwl_ng') fi @@ -1387,10 +1387,10 @@ Do you want to continue and disable the serial login console?' || return 1 then G_EXEC eval 'echo -e '\''options wlan_8192eu rtw_power_mgnt=0\noptions wlan_8812au rtw_power_mgnt=0'\'' > /etc/modprobe.d/dietpi-disable_wifi_powersaving.conf' - # - Orange Pi Zero 3: Module does not load automatically - elif (( $G_HW_MODEL == 83 )) + # - Orange Pi 3B/Zero 3: Module does not load automatically + elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] then - G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' + modprobe -n sprdwl_ng 2> /dev/null && G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' fi # Remove blacklists diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 50d54470bb..e981b7d370 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -613,11 +613,10 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt - https://github.com/MichaIng/DietPi/issues/6676'; return 1; } # Obtain required kernel packages - local image_arch=$(dpkg --print-architecture) local kernel_version=$(uname -r) local kernel_variant=${kernel_version##*-} [[ $kernel_variant == "$kernel_version" ]] && kernel_variant='v6' # Old ARMv6 kernel has no dash-separated suffix - local kernel_package= + local kernel_package case $kernel_variant in 'v6') kernel_package='linux-image-rpi-v6';; 'v7'|'v7+') kernel_package='linux-image-rpi-v7';; @@ -633,44 +632,67 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt esac G_WHIP_CHECKLIST_ARRAY=() - local status= + local image_arch=$(dpkg --print-architecture) to_install=() to_remove=() if [[ $image_arch == 'armhf' ]] then - dpkg-query -s 'linux-image-rpi-v6' &> /dev/null && status='on' || status='off' - [[ $kernel_package == 'linux-image-rpi-v6' ]] || G_WHIP_CHECKLIST_ARRAY+=('linux-image-rpi-v6' 'Raspberry Pi 1/Zero (1)' "$status") - dpkg-query -s 'linux-image-rpi-v7' &> /dev/null && status='on' || status='off' - [[ $kernel_package == 'linux-image-rpi-v7' ]] || G_WHIP_CHECKLIST_ARRAY+=('linux-image-rpi-v7' 'Raspberry Pi 2/3/Zero 2 32-bit' "$status") - dpkg-query -s 'linux-image-rpi-v7l' &> /dev/null && status='on' || status='off' - [[ $kernel_package == 'linux-image-rpi-v7l' ]] || G_WHIP_CHECKLIST_ARRAY+=('linux-image-rpi-v7l' 'Raspberry Pi 4/5 32-bit' "$status") - fi - dpkg-query -s 'linux-image-rpi-v8' &> /dev/null && status='on' || status='off' - [[ $kernel_package == 'linux-image-rpi-v8' ]] || G_WHIP_CHECKLIST_ARRAY+=('linux-image-rpi-v8' 'Raspberry Pi 2-5 64-bit' "$status") - dpkg-query -s 'linux-image-rpi-2712' &> /dev/null && status='on' || status='off' - [[ $kernel_package == 'linux-image-rpi-2712' || $image_arch == 'armhf' ]] || G_WHIP_CHECKLIST_ARRAY+=('linux-image-rpi-2712' 'Raspberry Pi 5 64-bit' "$status") - - G_WHIP_CHECKLIST "Based on your currently used kernel variant, the $kernel_package package will be kept/installed. -\nOptionally, you can select/deselect additional kernel packages below, in case you want to boot this image from another Raspberry Pi model as well. -\nNote the following: -- The Raspberry Pi 4 and 5 models use the 64-bit kernel by default, even when using a 32-bit image, unless you explicitly define arm_64bit=0 in /boot/config.txt. -- All other Raspberry Pi models use the 32-bit kernel on 32-bit images, and the 64-bit kernel on 64-bit images, or when you explicitly define arm_64bit=1 in /boot/config.txt." || exit 1 - - local i j to_install=() to_remove=() - for i in 'linux-image-rpi-v6' 'linux-image-rpi-v7' 'linux-image-rpi-v7l' 'linux-image-rpi-v8' 'linux-image-rpi-2712' - do - [[ $i == "$kernel_package" ]] && continue - for j in $G_WHIP_RETURNED_VALUE + declare -A models=( + ['linux-image-rpi-v6']='Raspberry Pi 1/Zero (1)' + ['linux-image-rpi-v7']='Raspberry Pi 2/3/Zero 2' + ['linux-image-rpi-v8']='Raspberry Pi 4/5' + ) + if grep -q '^arm_64bit=1' /boot/config.txt + then + models['linux-image-rpi-v7']='Raspberry Pi 2 PCB v1.1' + models['linux-image-rpi-v8']='Raspberry Pi 2 PCB v1.2 and Raspberry Pi 3-5' + + elif grep -q '^arm_64bit=0' /boot/config.txt + then + unset -v 'models[linux-image-rpi-v8]' + models['linux-image-rpi-v7l']='Raspberry Pi 4/5' + fi + + local i status + for i in "${!models[@]}" do - [[ $j == "$i" ]] || continue - # Add foreign arm64 arch for 64-bit kernel until it has been added to the armhf repo: https://github.com/RPi-Distro/repo/issues/356 - [[ $j == 'linux-image-rpi-v8' && $image_arch == 'armhf' ]] && G_EXEC dpkg --add-architecture arm64 - to_install+=("$i") - continue 2 + [[ $i == "$kernel_package" ]] && continue + dpkg-query -s "$i" &> /dev/null && status='on' || status='off' + G_WHIP_CHECKLIST_ARRAY+=("$i" "${models[$i]}" "$status") done - to_remove+=("$i") - done - # Add foreign arm64 arch for 64-bit kernel until it has been added to the armhf repo: https://github.com/RPi-Distro/repo/issues/356 - [[ $kernel_package == 'linux-image-rpi-v8' && $image_arch == 'armhf' ]] && G_EXEC dpkg --add-architecture arm64 + G_WHIP_CHECKLIST "Based on your currently used kernel variant, the following package will be kept/installed: +\n- $kernel_package for ${models[$kernel_package]} +\nOptionally, you can select/deselect additional kernel packages below, in case you want to boot this image from other Raspberry Pi models:" || exit 1 + + local j + for i in "${!models[@]}" + do + [[ $i == "$kernel_package" ]] && continue + for j in $G_WHIP_RETURNED_VALUE + do + [[ $j == "$i" ]] || continue + # Add foreign arm64 arch for 64-bit kernel until it has been added to the armhf repo: https://github.com/RPi-Distro/repo/issues/356 + [[ $j == 'linux-image-rpi-v8' ]] && G_EXEC dpkg --add-architecture arm64 + to_install+=("$i") + continue 2 + done + to_remove+=("$i") + done + + # Add foreign arm64 arch for 64-bit kernel until it has been added to the armhf repo: https://github.com/RPi-Distro/repo/issues/356 + [[ $kernel_package == 'linux-image-rpi-v8' ]] && G_EXEC dpkg --add-architecture arm64 + else + declare -A models=( + ['linux-image-rpi-v8']='Raspberry Pi 2-5' + ['linux-image-rpi-2712']='Raspberry Pi 5 only' + ) + local optional='linux-image-rpi-v8' + [[ $kernel_package == 'linux-image-rpi-v8' ]] && local optional='linux-image-rpi-2712' + + G_WHIP_BUTTON_OK_TEXT='Yes' G_WHIP_BUTTON_CANCEL_TEXT='No' G_WHIP_YESNO "Based on your currently used kernel variant, the following package will be kept/installed: +\n- $kernel_package for ${models[$kernel_package]} +\nDo you want to keep/install the following additional kernel package, to boot this image from other Raspberry Pi models? +\n- $optional for ${models[$optional]}" && to_install=("$optional") || to_remove=("$optional") + fi G_AGI "$kernel_package" "${to_install[@]}" raspi-firmware raspi-utils G_AGP "${to_remove[@]}" raspberrypi-kernel raspberrypi-headers-kernel raspberrypi-bootloader libraspberrypi-bin libraspberrypi0