From d2edff505d3d726ce2965d1a4c7e4d4ffbec6d2c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 20 Aug 2023 21:46:43 +0200 Subject: [PATCH 01/16] v8.21 - DietPi-Patches | Fix Pi-hole Lighttpd config patch to avoid creation of a real file where a symlink should be located --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 87e1d367ea..605c9b8ea4 100755 --- a/.update/patches +++ b/.update/patches @@ -1398,7 +1398,7 @@ Patch_8_20() if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[93\]=2' /boot/dietpi/.installed then [[ -f '/etc/nginx/sites-dietpi/dietpi-pihole.conf' ]] && G_EXEC sed -i 's/add_header X-XSS-Protection "1; mode=block";/add_header X-XSS-Protection "0";/' /etc/nginx/sites-dietpi/dietpi-pihole.conf - [[ -f '/etc/lighttpd/conf-enabled/99-dietpi-pihole.conf' ]] && G_EXEC sed -i 's/"X-XSS-Protection" => "1; mode=block"/"X-XSS-Protection" => "0"/' /etc/lighttpd/conf-enabled/99-dietpi-pihole.conf + [[ -f '/etc/lighttpd/conf-available/99-dietpi-pihole.conf' ]] && G_EXEC sed -i 's/"X-XSS-Protection" => "1; mode=block"/"X-XSS-Protection" => "0"/' /etc/lighttpd/conf-available/99-dietpi-pihole.conf fi # DietPi-Dashboard: https://github.com/ravenclaw900/DietPi-Dashboard/releases/tag/v0.6.2 From 95d3e4000575862527c906d781316214e9b7eb6d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 20 Aug 2023 22:09:54 +0200 Subject: [PATCH 02/16] v8.21 - DietPi-Software | Gitea: 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 69bbf3efe8..3def1b6c26 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10694,7 +10694,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.20.2/gitea-1.20.2-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.20.3/gitea-1.20.3-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User From 78cc5fa6129cfb54eb24439258d1bcba84e883e9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 21 Aug 2023 23:53:33 +0200 Subject: [PATCH 03/16] v8.21 - DietPi-Software | rTorrent: Update ruTorrent fallback version --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3def1b6c26..3bdc2788d2 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8659,7 +8659,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.2.2'; 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.2.3'; 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 From c9911133e87678c0cbfa7fc1a199187aade2763d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 21 Aug 2023 23:58:02 +0200 Subject: [PATCH 04/16] v8.21 - CHANGELOG | Add entry about Orange Pi 5 U-Boot update --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 67e4e8218c..0674dd3977 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ New images: Enhancements: - Orange Pi 5/ROCK 5B | An update of the kernel to Linux 5.10.160 will be applied automatically as part of the DietPi update. +- Orange Pi 5 | An update of the U-Boot package will be applied. When flashing it to SPI via dietpi-config > Advanced Options > Update SPI bootloader, it enables booting DietPi via NVMe and USB. - DietPi-Config | When applying WiFi hotspot settings, manually changed IP addresses in /etc/network/interfaces will now be preserved. - DietPi-Config | WiFi Hotspot: Toggles for enabling 802.11n/WiFi 4, 802.11ac/WiFi 5 and 5 GHz WiFi respectively have been added to the menu. - DietPi-Software | WiFi Hotspot: We added new dietpi.txt settings "SOFTWARE_WIFI_HOTSPOT_WIFI4", "SOFTWARE_WIFI_HOTSPOT_WIFI5" and "SOFTWARE_WIFI_HOTSPOT_5G" to have 802.11n/WiFi 4, 802.11ac/WiFi 5 and 5 GHz support respectively enabled on install. From f958adb32accccacf33320aca08623f79f2f6144 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 22 Aug 2023 21:20:46 +0200 Subject: [PATCH 05/16] v8.21 - DietPi-Software | ruTorrent: 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 3bdc2788d2..162e2cbda6 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8659,7 +8659,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.2.3'; 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.2.4'; 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 From 531b13abd1eac75429d2349bb3ffad132adb7ca4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 24 Aug 2023 20:40:10 +0200 Subject: [PATCH 06/16] v8.21 (#6574) - DietPi-Config | WiFi Hotspot: Do not allow to enter a <8 character key, add an error message to the input box in this case --- dietpi/dietpi-config | 14 +++++++++++--- dietpi/dietpi-software | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index d5267d5be5..efeaaeff32 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2134,7 +2134,8 @@ _EOF_ until [[ $G_WHIP_RETURNED_VALUE == [[:upper:]][[:upper:]] ]] do G_WHIP_INPUTBOX "${error}Please enter a 2 capital letter country code: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2" || return 0 - error="[FAILED] Invalid country code ($G_WHIP_RETURNED_VALUE)" + error="[FAILED] Invalid country code ($G_WHIP_RETURNED_VALUE)\n\n" + G_WHIP_DEFAULT_ITEM=$G_WHIP_RETURNED_VALUE done fi WIFI_COUNTRYCODE=$G_WHIP_RETURNED_VALUE @@ -2704,8 +2705,15 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns 'Key') + local error G_WHIP_DEFAULT_ITEM=$HOTSPOT_KEY - G_WHIP_INPUTBOX 'Please enter a key/password with a minimum of 8 characters for your WiFi hotspot:' && HOTSPOT_KEY=$G_WHIP_RETURNED_VALUE + until (( ${#G_WHIP_RETURNED_VALUE} > 7 )) + do + G_WHIP_INPUTBOX "${error}Please enter a key/password with a minimum of 8 characters for your WiFi hotspot:" || return 0 + error='[FAILED] The entered key is too short.\n\n' + G_WHIP_DEFAULT_ITEM=$G_WHIP_RETURNED_VALUE + done + HOTSPOT_KEY=$G_WHIP_RETURNED_VALUE ;; 'SSID') @@ -2762,7 +2770,7 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns 'Disable') - G_WHIP_YESNO 'Would you like to disable the WiFi adapter?\n - (NOTICE) All WiFi connections will be dropped.' || return + G_WHIP_YESNO 'Would you like to disable the WiFi adapter?\n - (NOTICE) All WiFi connections will be dropped.' || return 0 WIFI_DISABLED=1 G_EXEC systemctl disable --now dietpi-wifi-monitor Network_ApplyChanges diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 162e2cbda6..1ed2df11a3 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7949,6 +7949,7 @@ _EOF_ [[ $wifi4 == [01] ]] || wifi4=0 [[ $wifi5 == [01] ]] || wifi5=0 [[ $freq5 == [01] ]] || freq5=0 + (( ${#key} > 8 )) || { G_DIETPI-NOTIFY 1 'WiFi key from dietpi.txt is too short (less than 8 characters), falling back to default: "dietpihotspot"'; key='dietpihotspot'; } # - WiFi 5 implies 5 GHz and 5 GHz requires at least WiFi 4 (( $wifi5 )) && freq5=1 (( $freq5 && ! $wifi5 )) && wifi4=1 @@ -7982,7 +7983,7 @@ macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 -wpa_passphrase=${key:-dietpihotspot} +wpa_passphrase=$key wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP From 75db96d8b36b5e326deeba4ac7d32275b1b67c1f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 26 Aug 2023 14:43:17 +0200 Subject: [PATCH 07/16] v8.21 (#6575) - WiFi Hotspot | Add 802.11ax/WiFi 6 support (Bookworm only) --- CHANGELOG.txt | 4 ++-- dietpi.txt | 4 +++- dietpi/dietpi-config | 25 +++++++++++++++++++------ dietpi/dietpi-software | 8 ++++++-- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0674dd3977..099ff5af94 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,8 +8,8 @@ Enhancements: - Orange Pi 5/ROCK 5B | An update of the kernel to Linux 5.10.160 will be applied automatically as part of the DietPi update. - Orange Pi 5 | An update of the U-Boot package will be applied. When flashing it to SPI via dietpi-config > Advanced Options > Update SPI bootloader, it enables booting DietPi via NVMe and USB. - DietPi-Config | When applying WiFi hotspot settings, manually changed IP addresses in /etc/network/interfaces will now be preserved. -- DietPi-Config | WiFi Hotspot: Toggles for enabling 802.11n/WiFi 4, 802.11ac/WiFi 5 and 5 GHz WiFi respectively have been added to the menu. -- DietPi-Software | WiFi Hotspot: We added new dietpi.txt settings "SOFTWARE_WIFI_HOTSPOT_WIFI4", "SOFTWARE_WIFI_HOTSPOT_WIFI5" and "SOFTWARE_WIFI_HOTSPOT_5G" to have 802.11n/WiFi 4, 802.11ac/WiFi 5 and 5 GHz support respectively enabled on install. +- DietPi-Config | WiFi Hotspot: Toggles for enabling 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz WiFi respectively have been added to the menu. +- DietPi-Software | WiFi Hotspot: We added new dietpi.txt settings "SOFTWARE_WIFI_HOTSPOT_WIFI4", "SOFTWARE_WIFI_HOTSPOT_WIFI5", "SOFTWARE_WIFI_HOTSPOT_WIFI6" and "SOFTWARE_WIFI_HOTSPOT_5G" to have 802.11n/WiFi 4, 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz support respectively enabled on install. Bug fixes: - DietPi-Globals | G_GET_NET: Resolved an issue where the default route was not detected correctly if learned via OPSF or other routing protocols which change the output field numbers of the "ip route" command. Many thanks to @owendelong for reporting this issue: https://github.com/MichaIng/DietPi/issues/6561 diff --git a/dietpi.txt b/dietpi.txt index 2e573dfa17..6d312053d1 100644 --- a/dietpi.txt +++ b/dietpi.txt @@ -258,11 +258,13 @@ SOFTWARE_WIFI_HOTSPOT_SSID=DietPi-HotSpot SOFTWARE_WIFI_HOTSPOT_KEY=dietpihotspot # - 2.4 GHz WiFi channel, not effective if 5 GHz frequency is enabled SOFTWARE_WIFI_HOTSPOT_CHANNEL=3 -# - 802.11n/WiFi 4, 802.11ac/WiFi 5 and 5 GHz support: Note that your WiFi adapter must support it! +# - 802.11n/WiFi 4, 802.11ac/WiFi 5, 802.11ax/WiFi 6 and 5 GHz support: Note that your WiFi adapter must support it! # - WiFi 5 support implicitly switches to 5 GHz frequency. # - 5 GHz frequency implicitly enables WiFi 4 support if neither WiFi 4 nor 5 is enabled. SOFTWARE_WIFI_HOTSPOT_WIFI4=0 SOFTWARE_WIFI_HOTSPOT_WIFI5=0 +# - WiFi 6 is only supported from Debian Bookworm on! +SOFTWARE_WIFI_HOTSPOT_WIFI6=0 SOFTWARE_WIFI_HOTSPOT_5G=0 # - A full list of supported 5 GHz WiFi channels per region can be found e.g. on Wikipedia: https://en.wikipedia.org/wiki/List_of_WLAN_channels#5_GHz_(802.11a/h/n/ac/ax) SOFTWARE_WIFI_HOTSPOT_5G_CHANNEL=36 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index efeaaeff32..00cac6d816 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2575,6 +2575,7 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns HOTSPOT_CHANNEL= HOTSPOT_WIFI4=0 HOTSPOT_WIFI5=0 + HOTSPOT_WIFI6=0 HOTSPOT_5G=0 HOTSPOT_5G_CHANNEL= @@ -2601,6 +2602,7 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns HOTSPOT_KEY=$(sed -n '/^[[:blank:]]*wpa_passphrase=/{s/^[^=]*=//p;q}' /etc/hostapd/hostapd.conf) HOTSPOT_WIFI4=$(grep -cm1 '^[[:blank:]]*ieee80211n=1$' /etc/hostapd/hostapd.conf) HOTSPOT_WIFI5=$(grep -cm1 '^[[:blank:]]*ieee80211ac=1$' /etc/hostapd/hostapd.conf) + (( $G_DISTRO > 6 )) && HOTSPOT_WIFI6=$(grep -cm1 '^[[:blank:]]*ieee80211ax=1$' /etc/hostapd/hostapd.conf) HOTSPOT_5G=$(grep -cm1 '^[[:blank:]]*hw_mode=a$' /etc/hostapd/hostapd.conf) if (( $HOTSPOT_5G )) then @@ -2611,9 +2613,10 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns fi # WiFi 4 and WiFi 5 support status text - local hotspot_n_text='Off' hotspot_ac_text='Off' hotspot_freq_text='2.4' hotspot_channel_text + local hotspot_n_text='Off' hotspot_ac_text='Off' hotspot_ax_text='Off' hotspot_freq_text='2.4' hotspot_channel_text (( $HOTSPOT_WIFI4 )) && hotspot_n_text='On' (( $HOTSPOT_WIFI5 )) && hotspot_ac_text='On' + (( $HOTSPOT_WIFI6 )) && hotspot_ax_text='On' if (( $HOTSPOT_5G )) then hotspot_freq_text='5' @@ -2629,11 +2632,12 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns G_WHIP_MENU_ARRAY+=( 'SSID' ": [$HOTSPOT_SSID]" 'Key' ": [$HOTSPOT_KEY]" + 'Frequency' ": [$hotspot_freq_text GHz]" 'Channel' ": [$hotspot_channel_text]" '802.11n' ": [$hotspot_n_text] WiFi 4 support" '802.11ac' ": [$hotspot_ac_text] WiFi 5 support" - 'Frequency' ": [$hotspot_freq_text GHz]" ) + (( $G_DISTRO > 6 )) && G_WHIP_MENU_ARRAY+=('802.11ax' ": [$hotspot_ax_text] WiFi 6 support") # WiFi menu else @@ -2747,7 +2751,7 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns HOTSPOT_WIFI4=$(( ! $HOTSPOT_WIFI4 )) # 5 GHz requires at least WiFi 4 - (( $HOTSPOT_WIFI4 || $HOTSPOT_WIFI5 )) || HOTSPOT_5G=0 + (( $HOTSPOT_WIFI4 || $HOTSPOT_WIFI5 || $HOTSPOT_WIFI6 )) || HOTSPOT_5G=0 ;; '802.11ac') @@ -2756,14 +2760,21 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns # WiFi 5 implies 5 GHz (( $HOTSPOT_WIFI5 )) && HOTSPOT_5G=1 # 5 GHz requires at least WiFi 4 - (( $HOTSPOT_WIFI4 || $HOTSPOT_WIFI5 )) || HOTSPOT_5G=0 + (( $HOTSPOT_WIFI4 || $HOTSPOT_WIFI5 || $HOTSPOT_WIFI6 )) || HOTSPOT_5G=0 + ;; + + '802.11ax') + + HOTSPOT_WIFI6=$(( ! $HOTSPOT_WIFI6 )) + # 5 GHz requires at least WiFi 4 + (( $HOTSPOT_WIFI4 || $HOTSPOT_WIFI5 || $HOTSPOT_WIFI6 )) || HOTSPOT_5G=0 ;; 'Frequency') HOTSPOT_5G=$(( ! $HOTSPOT_5G )) # 5 GHz requires at least WiFi 4 - (( $HOTSPOT_5G && ! $HOTSPOT_WIFI5 )) && HOTSPOT_WIFI4=1 + (( $HOTSPOT_5G && ! $HOTSPOT_WIFI5 && ! $HOTSPOT_WIFI6 )) && HOTSPOT_WIFI4=1 ;; 'Country') Change_WifiCountryCode;; @@ -2795,6 +2806,7 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns G_CONFIG_INJECT 'SOFTWARE_WIFI_HOTSPOT_CHANNEL=' "SOFTWARE_WIFI_HOTSPOT_CHANNEL=$HOTSPOT_CHANNEL" /boot/dietpi.txt G_CONFIG_INJECT 'SOFTWARE_WIFI_HOTSPOT_WIFI4=' "SOFTWARE_WIFI_HOTSPOT_WIFI4=$HOTSPOT_WIFI4" /boot/dietpi.txt G_CONFIG_INJECT 'SOFTWARE_WIFI_HOTSPOT_WIFI5=' "SOFTWARE_WIFI_HOTSPOT_WIFI5=$HOTSPOT_WIFI5" /boot/dietpi.txt + (( $G_DISTRO > 6 )) && G_CONFIG_INJECT 'SOFTWARE_WIFI_HOTSPOT_WIFI6=' "SOFTWARE_WIFI_HOTSPOT_WIFI6=$HOTSPOT_WIFI6" /boot/dietpi.txt G_CONFIG_INJECT 'SOFTWARE_WIFI_HOTSPOT_5G=' "SOFTWARE_WIFI_HOTSPOT_5G=$HOTSPOT_5G" /boot/dietpi.txt G_CONFIG_INJECT 'SOFTWARE_WIFI_HOTSPOT_5G_CHANNEL=' "SOFTWARE_WIFI_HOTSPOT_5G_CHANNEL=$HOTSPOT_5G_CHANNEL" /boot/dietpi.txt @@ -2803,7 +2815,8 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns G_CONFIG_INJECT 'wpa_passphrase=' "wpa_passphrase=$HOTSPOT_KEY" /etc/hostapd/hostapd.conf G_CONFIG_INJECT 'ieee80211n=' "ieee80211n=$HOTSPOT_WIFI4" /etc/hostapd/hostapd.conf G_CONFIG_INJECT 'ieee80211ac=' "ieee80211ac=$HOTSPOT_WIFI5" /etc/hostapd/hostapd.conf - if (( $HOTSPOT_WIFI4 || $HOTSPOT_WIFI5 )) + (( $G_DISTRO > 6 )) && G_CONFIG_INJECT 'ieee80211ax=' "ieee80211ax=$HOTSPOT_WIFI6" /etc/hostapd/hostapd.conf '^ieee80211ac' + if (( $HOTSPOT_WIFI4 || $HOTSPOT_WIFI5 || $HOTSPOT_WIFI6 )) then G_CONFIG_INJECT 'wmm_enabled=' 'wmm_enabled=1' /etc/hostapd/hostapd.conf else diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 1ed2df11a3..e2b28211ab 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7944,18 +7944,21 @@ _EOF_ local key=$(sed -n '/^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_KEY=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) local wifi4=$(sed -n '/^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_WIFI4=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) local wifi5=$(sed -n '/^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_WIFI5=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) + local wifi6=0 + (( $G_DISTRO > 6 )) && wifi6=$(sed -n '/^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_WIFI6=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) local freq5=$(sed -n '/^[[:blank:]]*SOFTWARE_WIFI_HOTSPOT_5G=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) # - Sanity checks [[ $wifi4 == [01] ]] || wifi4=0 [[ $wifi5 == [01] ]] || wifi5=0 + [[ $wifi6 == [01] ]] || wifi6=0 [[ $freq5 == [01] ]] || freq5=0 (( ${#key} > 8 )) || { G_DIETPI-NOTIFY 1 'WiFi key from dietpi.txt is too short (less than 8 characters), falling back to default: "dietpihotspot"'; key='dietpihotspot'; } # - WiFi 5 implies 5 GHz and 5 GHz requires at least WiFi 4 (( $wifi5 )) && freq5=1 - (( $freq5 && ! $wifi5 )) && wifi4=1 + (( $freq5 && ! $wifi5 && ! $wifi6 )) && wifi4=1 # - Enable WMM with QoS if WiFi 4 or 5 is enabled local wmm_enabled=0 - (( $wifi4 || $wifi5 )) && wmm_enabled=1 + (( $wifi4 || $wifi5 || $wifi6 )) && wmm_enabled=1 # - Apply mode channel based on frequency local mode='g' if (( $freq5 )) @@ -7988,6 +7991,7 @@ wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP _EOF_ + (( $G_DISTRO > 6 )) && G_CONFIG_INJECT 'ieee80211ax=' "ieee80211ax=$wifi6" /etc/hostapd/hostapd.conf '^ieee80211ac' G_EXEC chmod 0600 /etc/hostapd/hostapd.conf # Set WiFi country code From 24565c982596fb761cc91a734044e68b6b9dd6be Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 26 Aug 2023 14:55:42 +0200 Subject: [PATCH 08/16] v8.21 - dietpi.txt | WiFi 4 is not implicitly enabled with 5 GHz, if WiFi 6 is enabled already. --- dietpi.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi.txt b/dietpi.txt index 6d312053d1..aa39d0cdaa 100644 --- a/dietpi.txt +++ b/dietpi.txt @@ -260,7 +260,7 @@ SOFTWARE_WIFI_HOTSPOT_KEY=dietpihotspot SOFTWARE_WIFI_HOTSPOT_CHANNEL=3 # - 802.11n/WiFi 4, 802.11ac/WiFi 5, 802.11ax/WiFi 6 and 5 GHz support: Note that your WiFi adapter must support it! # - WiFi 5 support implicitly switches to 5 GHz frequency. -# - 5 GHz frequency implicitly enables WiFi 4 support if neither WiFi 4 nor 5 is enabled. +# - 5 GHz frequency implicitly enables WiFi 4 support if neither WiFi 4, 5 nor 6 is enabled. SOFTWARE_WIFI_HOTSPOT_WIFI4=0 SOFTWARE_WIFI_HOTSPOT_WIFI5=0 # - WiFi 6 is only supported from Debian Bookworm on! From 5138fced75e66c376e387615d363fa68e1b714ec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 26 Aug 2023 15:12:15 +0200 Subject: [PATCH 09/16] v8.21 - RC up and set release PR URL --- .update/version | 2 +- CHANGELOG.txt | 2 +- dietpi/func/dietpi-globals | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index 25bd0ba512..3450adc4ff 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=8 G_REMOTE_VERSION_SUB=21 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 G_MIN_VERSION_SUB=14 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 099ff5af94..55225cc5f7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -20,7 +20,7 @@ Bug fixes: - DietPi-Config | Resolved an issue where the DHCP server failed to start after applying WiFi hotspot settings. - DietPi-Software | TasmoAdmin: Resolved an issue on Bookworm systems with Nginx and Lighttpd webserver where login and logout did not work anymore as the rewrite directives pointed to a file which does not exist anymore since TasmoAdmin v3. Many thanks to @TBirth for reporting this issue: https://dietpi.com/forum/t/tasmoadmin-not-found-after-visiting-login-page/17632 -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/XXXX +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/6580 ----------------------------------------------------------------------------------------------------------- diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 2c82abc6a6..511e5c5f99 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -59,7 +59,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=8 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=21 - [[ $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 b07b592252c76a6ed4575dfae0735baf4521ca9d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 26 Aug 2023 16:46:59 +0200 Subject: [PATCH 10/16] v8.21 - CHANGELOG | Typo --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 55225cc5f7..91fdedec08 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,7 +12,7 @@ Enhancements: - DietPi-Software | WiFi Hotspot: We added new dietpi.txt settings "SOFTWARE_WIFI_HOTSPOT_WIFI4", "SOFTWARE_WIFI_HOTSPOT_WIFI5", "SOFTWARE_WIFI_HOTSPOT_WIFI6" and "SOFTWARE_WIFI_HOTSPOT_5G" to have 802.11n/WiFi 4, 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz support respectively enabled on install. Bug fixes: -- DietPi-Globals | G_GET_NET: Resolved an issue where the default route was not detected correctly if learned via OPSF or other routing protocols which change the output field numbers of the "ip route" command. Many thanks to @owendelong for reporting this issue: https://github.com/MichaIng/DietPi/issues/6561 +- DietPi-Globals | G_GET_NET: Resolved an issue where the default route was not detected correctly if learned via OSPF or other routing protocols which change the output field numbers of the "ip route" command. Many thanks to @owendelong for reporting this issue: https://github.com/MichaIng/DietPi/issues/6561 - DietPi-Installer | Resolved an issue where building images for ARMv7 hardware was not possible on a ARMv8 host. Offered/accepted ARM hardware IDs are now based on the userland/OS architecture of the image instead of the CPU/kernel architecture returned via "uname -m". Many thanks to @dirkhh for reporting this issue: https://github.com/MichaIng/DietPi/discussions/6541 - DietPi-Set_swapfile | Resolved an issue on Bookworm systems where zram swap space was not enabled automatically on boot due to missing syscall permissions, and the swappiness was not changed as intended. Many thanks to @magicfoxt-magicfox for reporting this issue: https://github.com/MichaIng/DietPi/issues/6511 - DietPi-LetsEncrypt | Resolved a v8.20 regression where Lighttpd did not start after applying or renewing the certificate due to a syntax error. Many thanks to @JappeHallunken for fixing this issue: https://github.com/MichaIng/DietPi/pull/6517 From 46f170f6824b01df9fcf24e646885148d4937bf0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 26 Aug 2023 21:55:10 +0200 Subject: [PATCH 11/16] v8.21 - DietPi-Pre-patches | Update Grafana APT key if installed, as it has been rotated on 2023-08-24. --- .update/pre-patches | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.update/pre-patches b/.update/pre-patches index 3cf5aa1e68..a66bead827 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -194,13 +194,6 @@ then G_EXEC gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-mympd.gpg --yes Release.key G_EXEC rm Release.key fi - if [[ -f '/etc/apt/trusted.gpg.d/dietpi-grafana.gpg' ]] && (( $(date -u '+%Y%m%d' -r '/etc/apt/trusted.gpg.d/dietpi-grafana.gpg') < 20230113 )) - then - G_DIETPI-NOTIFY 2 'Updating Grafana APT repo key' - G_EXEC curl -sSfLO 'https://apt.grafana.com/gpg.key' - G_EXEC gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-grafana.gpg --yes gpg.key - G_EXEC rm gpg.key - fi fi # v8.14 @@ -258,5 +251,18 @@ _EOF_ fi fi +# v8.21 +if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 21 ) )) +then + # Update Grafana APT key: https://grafana.com/blog/2023/08/24/grafana-security-update-gpg-signing-key-rotation/ + if [[ -f '/etc/apt/trusted.gpg.d/dietpi-grafana.gpg' ]] && (( $(date -u '+%Y%m%d' -r '/etc/apt/trusted.gpg.d/dietpi-grafana.gpg') < 20230825 )) + then + G_DIETPI-NOTIFY 2 'Updating Grafana APT repo key' + G_EXEC curl -sSfLO 'https://apt.grafana.com/gpg.key' + G_EXEC gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-grafana.gpg --yes gpg.key + G_EXEC rm gpg.key + fi +fi + exit 0 } From a40e1f740764d8206e978803191ab3e02ea30035 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 27 Aug 2023 00:13:08 +0200 Subject: [PATCH 12/16] v8.21 - DietPi-Patches | Move Quartz64 and VisionFive 2 kernel/firmware updates forward - 64-bit Rockchip SBCs | All SBCs with Armbian's 64-bit Rockchip kernel package "linux-image-current-rockchip64" will receive a major kernel upgrade to Linux 6.1.46, including lots of fixes and enhancements that have been applied upstream and by Armbian in the meantime. Since Armbian's APT repository has not seen any update since February 2023, we started compiling and hosting own builds. An own APT repository is being worked on to better distribute our own package builds. Until the, headers for this kernel package can be downloaded at: https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb --- .update/patches | 96 +++++++++++++++++++++++++++++-------------------- CHANGELOG.txt | 1 + 2 files changed, 59 insertions(+), 38 deletions(-) diff --git a/.update/patches b/.update/patches index 605c9b8ea4..6dc2774066 100755 --- a/.update/patches +++ b/.update/patches @@ -1341,39 +1341,6 @@ Patch_8_20() fi G_EXEC losetup -d "$loopdev" G_EXEC rm "nanopi$series.img" - - # Quartz64 - elif (( $G_HW_MODEL == 49 )) - then - if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64a 2> /dev/null)" lt-nl 6.4.7-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating Quartz64 Model A kernel and bootloader ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-quartz64a.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - - elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64b 2> /dev/null)" lt-nl 6.4.7-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating Quartz64 Model B kernel and bootloader ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-quartz64b.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - - elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-soquartz 2> /dev/null)" lt-nl 6.4.7-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating SOQuartz kernel and bootloader ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-soquartz.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - fi - - # VisionFive 2 - elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 5.15.123-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' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb fi # Software updates and migrations @@ -1428,11 +1395,31 @@ Patch_8_21() # Remove obsolete sysctl config [[ -f '/etc/sysctl.d/dietpi.conf' ]] && G_EXEC rm /etc/sysctl.d/dietpi.conf + # Armbian firmware + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' armbian-firmware 2> /dev/null)" lt-nl 23.08.0 + then + G_DIETPI-NOTIFY 2 'Updating Armbian firmware package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb + fi + + # Rockchip64 kernel + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-current-rockchip64 2> /dev/null)" lt-nl 23.08.0 + then + G_DIETPI-NOTIFY 2 'Updating Rockchip64 kernel ...' + dpkg-query -s linux-headers-current-rockchip64 &> /dev/null && G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-image-current-rockchip64.deb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-current-rockchip64.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package[123].deb + G_EXEC rm package[123].deb + fi + # Orange Pi 5: Update U-Boot to enable NVMe boot if (( $G_HW_MODEL == 80 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-u-boot-orangepi5-legacy 2> /dev/null)" lt-nl 23.08.0 then G_DIETPI-NOTIFY 2 'Updating Orange Pi 5 U-Boot package ...' - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-u-boot-orangepi5-legacy.deb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-u-boot-orangepi5-legacy.deb' G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb G_EXEC rm package.deb fi @@ -1441,13 +1428,46 @@ Patch_8_21() if [[ $G_HW_MODEL =~ ^(78|80)$ ]] && { dpkg-query -s 'linux-image-legacy-rockchip-rk3588' &> /dev/null || dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-legacy-rk35xx 2> /dev/null)" lt-nl 23.08.0; } then G_DIETPI-NOTIFY 2 'Updating RK3588 kernel package ...' - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-image-legacy-rk35xx.deb' - G_EXEC curl -sSfo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-legacy-rk35xx.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb package2.deb - G_EXEC rm package.deb package2.deb + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-image-legacy-rk35xx.deb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-legacy-rk35xx.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package1.deb package2.deb + G_EXEC rm package1.deb package2.deb (( $G_HW_MODEL == 80 )) && G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=' /boot/dietpiEnv.txt dpkg-query -s 'linux-image-legacy-rockchip-rk3588' &> /dev/null && G_EXEC apt-mark auto linux-image-legacy-rockchip-rk3588 dpkg-query -s 'linux-dtb-legacy-rockchip-rk3588' &> /dev/null && G_EXEC apt-mark auto linux-dtb-legacy-rockchip-rk3588 + + # Quartz64 + elif (( $G_HW_MODEL == 49 )) + then + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64a 2> /dev/null)" lt-nl 6.4.11-dietpi1 + then + G_DIETPI-NOTIFY 2 'Updating Quartz64 Model A kernel and bootloader ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-quartz64a.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb + + elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64b 2> /dev/null)" lt-nl 6.4.11-dietpi1 + then + G_DIETPI-NOTIFY 2 'Updating Quartz64 Model B kernel and bootloader ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-quartz64b.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb + + elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-soquartz 2> /dev/null)" lt-nl 6.4.11-dietpi1 + then + G_DIETPI-NOTIFY 2 'Updating SOQuartz kernel and bootloader ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-soquartz.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb + fi + + # VisionFive 2 + elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 5.15.127-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' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb fi } diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 91fdedec08..e2ef82380c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ New images: Enhancements: - Orange Pi 5/ROCK 5B | An update of the kernel to Linux 5.10.160 will be applied automatically as part of the DietPi update. - Orange Pi 5 | An update of the U-Boot package will be applied. When flashing it to SPI via dietpi-config > Advanced Options > Update SPI bootloader, it enables booting DietPi via NVMe and USB. +- 64-bit Rockchip SBCs | All SBCs with Armbian's 64-bit Rockchip kernel package "linux-image-current-rockchip64" will receive a major kernel upgrade to Linux 6.1.46, including lots of fixes and enhancements that have been applied upstream and by Armbian in the meantime. Since Armbian's APT repository has not seen any update since February 2023, we started compiling and hosting own builds. An own APT repository is being worked on to better distribute our own package builds. Until the, headers for this kernel package can be downloaded at: https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb - DietPi-Config | When applying WiFi hotspot settings, manually changed IP addresses in /etc/network/interfaces will now be preserved. - DietPi-Config | WiFi Hotspot: Toggles for enabling 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz WiFi respectively have been added to the menu. - DietPi-Software | WiFi Hotspot: We added new dietpi.txt settings "SOFTWARE_WIFI_HOTSPOT_WIFI4", "SOFTWARE_WIFI_HOTSPOT_WIFI5", "SOFTWARE_WIFI_HOTSPOT_WIFI6" and "SOFTWARE_WIFI_HOTSPOT_5G" to have 802.11n/WiFi 4, 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz support respectively enabled on install. From 8006f4ec663bec83e9dc5f3a9fc84cd4aac30e78 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 27 Aug 2023 00:27:08 +0200 Subject: [PATCH 13/16] v8.21 - DietPi-Installer | Install our more recent armbian-firmware and rockchip64 kernel packages --- .build/images/dietpi-installer | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index c30f6e5e2f..509df364ac 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1034,7 +1034,7 @@ _EOF_ *) :;; esac # Download and pre-install U-Boot hosted on dietpi.com where it has not been ported (and probably never will) to the Armbian Bookworm repo or where it provides a too old version - if (( $dietpi_com && $G_DISTRO > 6 || $G_HW_MODEL == 62 || $G_HW_MODEL == 80 || $G_HW_MODEL == 82 )) + if (( $dietpi_com && $G_DISTRO > 6 || $G_HW_MODEL == 62 || $G_HW_MODEL == 72 || $G_HW_MODEL == 80 || $G_HW_MODEL == 82 )) then G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb" G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb @@ -1055,15 +1055,19 @@ _EOF_ fi # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression [[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' ]] && zstd=('zstd') + # - Download and pre-install a more recent armbian-firmware package from our server + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb + G_EXEC rm package.deb G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version - if [[ $G_HW_MODEL =~ ^(78|80|82)$ ]] + if [[ $G_HW_MODEL =~ ^(78|80|82)$ || ( $kernel == 'rockchip64' && $branch == 'current' ) ]] then - G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" - G_EXEC curl -sSfo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb package2.deb - G_EXEC rm package.deb package2.deb + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" + G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package1.deb package2.deb + G_EXEC rm package1.deb package2.deb fi G_AGI linux-{image,dtb}-"$branch-$kernel" "linux-u-boot-$model-$branch" # Cleanup From f2c457face7cbf8c9c0c8a94158e527dc6735087 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 27 Aug 2023 00:39:41 +0200 Subject: [PATCH 14/16] v8.21 - DietPi-Patches | Bump Quartz64 and VisionFive 2 kernel and order rockchip64 package upgrade into other kernel upgrade else-if block --- .update/patches | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.update/patches b/.update/patches index 6dc2774066..cefd175279 100755 --- a/.update/patches +++ b/.update/patches @@ -1404,17 +1404,6 @@ Patch_8_21() G_EXEC rm package.deb fi - # Rockchip64 kernel - if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-current-rockchip64 2> /dev/null)" lt-nl 23.08.0 - then - G_DIETPI-NOTIFY 2 'Updating Rockchip64 kernel ...' - dpkg-query -s linux-headers-current-rockchip64 &> /dev/null && G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-image-current-rockchip64.deb' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-current-rockchip64.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package[123].deb - G_EXEC rm package[123].deb - fi - # Orange Pi 5: Update U-Boot to enable NVMe boot if (( $G_HW_MODEL == 80 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-u-boot-orangepi5-legacy 2> /dev/null)" lt-nl 23.08.0 then @@ -1439,21 +1428,21 @@ Patch_8_21() # Quartz64 elif (( $G_HW_MODEL == 49 )) then - if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64a 2> /dev/null)" lt-nl 6.4.11-dietpi1 + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64a 2> /dev/null)" lt-nl 6.4.12-dietpi1 then G_DIETPI-NOTIFY 2 'Updating Quartz64 Model A kernel and bootloader ...' G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-quartz64a.deb' G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb G_EXEC rm package.deb - elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64b 2> /dev/null)" lt-nl 6.4.11-dietpi1 + elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64b 2> /dev/null)" lt-nl 6.4.12-dietpi1 then G_DIETPI-NOTIFY 2 'Updating Quartz64 Model B kernel and bootloader ...' G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-quartz64b.deb' G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb G_EXEC rm package.deb - elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-soquartz 2> /dev/null)" lt-nl 6.4.11-dietpi1 + elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-soquartz 2> /dev/null)" lt-nl 6.4.12-dietpi1 then G_DIETPI-NOTIFY 2 'Updating SOQuartz kernel and bootloader ...' G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-soquartz.deb' @@ -1462,12 +1451,22 @@ Patch_8_21() fi # VisionFive 2 - elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 5.15.127-dietpi1 + elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 5.15.128-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' G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb G_EXEC rm package.deb + + # Rockchip64 kernel + elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-current-rockchip64 2> /dev/null)" lt-nl 23.08.0 + then + G_DIETPI-NOTIFY 2 'Updating Rockchip64 kernel ...' + dpkg-query -s linux-headers-current-rockchip64 &> /dev/null && G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-image-current-rockchip64.deb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-current-rockchip64.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[123].deb + G_EXEC rm package[123].deb fi } From e08bbb9086e289adf6c9cd0f7cf917f5386b7c50 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 27 Aug 2023 00:54:32 +0200 Subject: [PATCH 15/16] v8.21 - DietPi-Build | Raise image sizes for all 64-bit Rockchip SBCs, as the Linux 6.1 package, especially generating an initramfs, requires it --- .build/images/dietpi-build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 044c657b8f..dd40cbc50f 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -156,9 +156,9 @@ case $DISTRO in [[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Debian Sid/unstable only # Raise root size where required case $HW_MODEL in - 1[256]|49.[123]|54|61|7[4569]|8[02]) ((root_size+=128));; + 1[256]|54|61|7[4569]) ((root_size+=128));; 21) ((root_size+=448));; - *) :;; + *) [[ $partition_start == 16 ]] && ((root_size+=128));; # 64-bit Rockchip SoCs esac ;; *) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;; From b91e2a9e272c6f8ee38b89b18e84da4b5a17dc28 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 27 Aug 2023 01:09:01 +0200 Subject: [PATCH 16/16] v8.21 - DietPi-Config | WiFi Hotspot: It is now assured that changing interface names, e.g. due to an additionally attached WiFi adapter, are now aligned across /etc/network/interfaces, hostapd and DHCP server configs. --- CHANGELOG.txt | 2 +- dietpi/dietpi-config | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e2ef82380c..fa470b7c44 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,7 +8,7 @@ Enhancements: - Orange Pi 5/ROCK 5B | An update of the kernel to Linux 5.10.160 will be applied automatically as part of the DietPi update. - Orange Pi 5 | An update of the U-Boot package will be applied. When flashing it to SPI via dietpi-config > Advanced Options > Update SPI bootloader, it enables booting DietPi via NVMe and USB. - 64-bit Rockchip SBCs | All SBCs with Armbian's 64-bit Rockchip kernel package "linux-image-current-rockchip64" will receive a major kernel upgrade to Linux 6.1.46, including lots of fixes and enhancements that have been applied upstream and by Armbian in the meantime. Since Armbian's APT repository has not seen any update since February 2023, we started compiling and hosting own builds. An own APT repository is being worked on to better distribute our own package builds. Until the, headers for this kernel package can be downloaded at: https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb -- DietPi-Config | When applying WiFi hotspot settings, manually changed IP addresses in /etc/network/interfaces will now be preserved. +- DietPi-Config | WiFi Hotspot: When applying settings, manually changed IP addresses in /etc/network/interfaces will now be preserved. Additionally, it is now assured that changing interface names, e.g. due to an additionally attached WiFi adapter, are now aligned across /etc/network/interfaces, hostapd and DHCP server configs. - DietPi-Config | WiFi Hotspot: Toggles for enabling 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz WiFi respectively have been added to the menu. - DietPi-Software | WiFi Hotspot: We added new dietpi.txt settings "SOFTWARE_WIFI_HOTSPOT_WIFI4", "SOFTWARE_WIFI_HOTSPOT_WIFI5", "SOFTWARE_WIFI_HOTSPOT_WIFI6" and "SOFTWARE_WIFI_HOTSPOT_5G" to have 802.11n/WiFi 4, 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz support respectively enabled on install. diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 00cac6d816..e1098d07e5 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1994,6 +1994,10 @@ post-down iw dev "$WIFI_DEV_IFACE set power_save on up iptables-restore < /etc/iptables.ipv4.nat up ip6tables-restore < /etc/iptables.ipv6.nat _EOF_ + # - Alter hostapd and DHCP server configs + G_CONFIG_INJECT 'interface=' "interface=$WIFI_DEV_IFACE" /etc/hostapd/hostapd.conf + [[ -f '/etc/default/isc-dhcp-server' ]] && G_CONFIG_INJECT 'INTERFACESv4=' "INTERFACESv4=\"$WIFI_DEV_IFACE\"" /etc/default/isc-dhcp-server + # WiFi client else gateway="gateway $WIFI_GATEWAY_STATIC"