Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta v9.4.2 #7068

Merged
merged 13 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions .build/images/dietpi-imager
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,12 @@
G_EXEC mount "${FP_ROOT_DEV::-1}1" "$fat_mountpoint"
G_EXEC mount "$FP_ROOT_DEV" "$root_mountpoint"
G_DIETPI-NOTIFY 2 'Copying dietpi.txt and other config files to the DIETPISETUP partition'
for f in 'dietpi.txt' 'dietpi-wifi.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh'
for f in 'dietpi.txt' 'dietpi-wifi.txt' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf'
do
[[ -f $root_mountpoint/boot/$f ]] && G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/"
[[ -f $root_mountpoint/boot/$f ]] || continue
G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/"
TZ=UTC G_EXEC touch -t '197001010000' "$fat_mountpoint/$f"
TZ=UTC G_EXEC touch -t '197001010001' "$root_mountpoint/boot/$f"
done
G_EXEC umount "$root_mountpoint" "$fat_mountpoint"
G_EXEC rmdir "$root_mountpoint" "$fat_mountpoint"
Expand All @@ -558,22 +561,26 @@
G_EXEC mount "$new_dos_part" "$fat_mountpoint"
G_EXEC mount "$FP_ROOT_DEV" "$root_mountpoint"
G_DIETPI-NOTIFY 2 'Copying dietpi.txt and other config files to the DIETPISETUP partition'
for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh'
for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'boot.ini' 'extlinux/extlinux.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf'
do
[[ -f $root_mountpoint/boot/$f ]] && G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/"
[[ -f $root_mountpoint/boot/$f ]] || continue
G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/"
TZ=UTC G_EXEC touch -t '202101010001' "$fat_mountpoint/${f#extlinux/}"
TZ=UTC G_EXEC touch -t '202101010002' "$root_mountpoint/boot/$f"
done
cat << '_EOF_' > "$fat_mountpoint/Readme-DietPi-Config.txt"
DietPi pre-boot configuration
cat << '_EOF_' > "$fat_mountpoint/README.txt"
DietPi config partition

You can edit the files in this folder to setup some configuration options
or even a completely automated install. Please check the documentation and
dietpi.txt for details: https://dietpi.com/docs/install/
This FAT partition is a place for relevant configuration files to pre-configure and automate your DietPi setup.
Those files will be copied into the root filesystem on first boot, if modified, to become effective, and the partition will be removed.

This folder also supports the following additional files. Please ensure that
they have UNIX style LF line endings:
- unattended_pivpn.conf
Apart of editing the existing files, you can also create the following for further automation:
- Automation_Custom_PreScript.sh
- Automation_Custom_Script.sh
- unattended_pivpn.conf

For details, please check our documentation and dietpi.txt itself:
https://dietpi.com/docs/usage/#how-to-do-an-automatic-base-installation-at-first-boot-dietpi-automation
_EOF_
G_EXEC umount "$root_mountpoint" "$fat_mountpoint"
G_EXEC rmdir "$root_mountpoint" "$fat_mountpoint"
Expand Down
9 changes: 9 additions & 0 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -2171,6 +2171,15 @@ _EOF_
SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0"
SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1"
SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0"
_EOF_
# Orange Pi 5 Plus
elif (( $G_HW_MODEL == 82 ))
then
G_DIETPI-NOTIFY 2 'Assuring persistent classic Ethernet interface names: /etc/udev/rules.d/99-dietpi-orangepi5plus.rules'
cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-orangepi5plus.rules
SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0003:31:00.0", NAME="to_eth0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1"
_EOF_
# Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi
elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]]
Expand Down
36 changes: 26 additions & 10 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1546,27 +1546,27 @@ Patch_9_2()
fi
}

PATCH_9_3_RAN=0
Patch_9_3()
{
# Purge ancient vmtouch which prevents /boot from being unmounted e.g. for RPi firmware migration: https://github.com/MichaIng/DietPi/issues/6819, https://github.com/MichaIng/DietPi/issues/6976
[[ -f '/etc/default/vmtouch' ]] && grep -q '/boot/dietpi' /etc/default/vmtouch && G_AGP vmtouch

# Add DietPi APT repo
/boot/dietpi/func/dietpi-set_software apt-mirror dietpi
G_AGUP -v
# shellcheck disable=SC2154
(( $G_AGUP_COUNT )) && G_AGUG
G_AGUP
G_AGUG
PATCH_9_3_RAN=1
}

Patch_9_4()
{
# Update DietPi APT list for several SBCs we added components to our repo for
if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]]
if [[ $PATCH_9_3_RAN == 0 && $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|78|79|80|82|83|85|88|89|90)$ ]]
then
/boot/dietpi/func/dietpi-set_software apt-mirror dietpi
G_AGUP -v
# shellcheck disable=SC2154
(( $G_AGUP_COUNT )) && G_AGUG
G_AGUP
G_AGUG
fi

# Odroid XU4
Expand All @@ -1575,10 +1575,26 @@ Patch_9_4()
G_DIETPI-NOTIFY 2 'Migrating boot.ini to support new Linux 6.6 device tree overlay locations'
/boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc
# shellcheck disable=SC2016
G_EXEC sed -i '\|/boot/dtb/overlays/${overlay}.dtbo|c load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo' /boot/boot.ini
G_EXEC sed --follow-symlinks -i '\|/boot/dtb/overlays/${overlay}.dtbo|c\ load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo' /boot/boot.ini
G_DIETPI-NOTIFY 2 'Fixing CEC toggle in boot.ini'
G_EXEC sed -i 's|rm /cec@101B0000;|rm /soc/cec@101b0000;|' /boot/boot.ini

G_EXEC sed --follow-symlinks -i 's|rm /cec@101B0000;|rm /soc/cec@101b0000;|' /boot/boot.ini
G_DIETPI-NOTIFY 2 'Cleaning up obsolete configs'
[[ -f '/etc/modprobe.d/odroid-cloudshell.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-cloudshell.conf
G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*(gpioplug-ir-recv|fbtft_device)[[:blank:]]*$/d' /etc/modules

# Orange Pi 5 Plus
elif (( $G_HW_MODEL == 82 ))
then
G_DIETPI-NOTIFY 2 'Assuring persistent classic Ethernet interface names: /etc/udev/rules.d/99-dietpi-orangepi5plus.rules'
G_WHIP_MSG '[ WARN ] Persistent eth0/eth1 interface names will be applied
\nSince classic interface names are randomly applied among the two onboard Ethernet adapters, we install a udev rule, which assures they remain the same on each (re)boot:
- /etc/udev/rules.d/99-dietpi-orangepi5plus.rules
\nIf you applied an own workaround via /etc/network/interfaces or similar, this will not be affected. But if you created own udev rules to mitigate the issue, please check whether those conflict with ours. Of course you can remove or rename above file to maintain status quo.'
cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-orangepi5plus.rules
SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0003:31:00.0", NAME="to_eth0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1"
_EOF_
# Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938
elif (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null
then
Expand Down
2 changes: 1 addition & 1 deletion .update/version
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Available DietPi version
G_REMOTE_VERSION_CORE=9
G_REMOTE_VERSION_SUB=4
G_REMOTE_VERSION_RC=1
G_REMOTE_VERSION_RC=2
# Minimum DietPi version to allow update
G_MIN_VERSION_CORE=7
G_MIN_VERSION_SUB=0
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v9.4
(2024-05-11)
(2024-05-12)

New images:
- ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935
Expand All @@ -12,13 +12,17 @@ Enhancements:
- NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules.
- Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader.
- Odroid XU4 | The kernel will be upgraded to Linux 6.6.
- DietPi-CloudShell | On Odroid XU4, when using the CloudShell 2 LCD, during configured auto screen off times, the backlight power of the LCD will be disabled as well, to safe energy and avoid still visible black display content. Many thanks to @smac for suggesting this enhancement: https://dietpi.com/forum/t/15331/55
- DietPi-Config | Added an option to the LCD display menu to toggle the Odroid XU4 CloudShell 2 LCD.
- DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository.

Bug fixes:
- NanoPi NEO3 | Resolved an issue where the Ethernet adapter was not available after reboots. Many thanks to @murraythegoz for reporting this issue: https://github.com/MichaIng/DietPi/issues/6987
- Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots.
- Orange Pi 5 Plus | Resolved an issue where the Ethernet interface names eth0/eth1 could swap on (re)boot. We add a udev rule which assures they are named persistently based on the PCI bus identifier. In case you created own udev rules to mitigate the issue, please check whether they conflict and decide whether to use ours or your solution. The DietPi update will also inform you about this change with a prompt. Many thanks to @dirkhh and many others for reporting this issue: https://github.com/MichaIng/DietPi/issues/6592
- DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043
- DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035
- DietPi-Config | Resolved a visual-only failure message on non-RPi systems, when enabling Bluetooth, and an actual failure doing so on Orange Pi Zero 3, Orange Pi 3B and Orange Pi Zero 2W, since the required kernel module "sprdbt_tty" was not loaded. Many thanks to @b9AcE for reporting this issue: https://dietpi.com/forum/t/19929/45
- DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package.
- DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies.
- DietPi-Software | X.Org X Server: Resolved an issue where an important config file might have been missing on RPi 5 and potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963
Expand Down
24 changes: 12 additions & 12 deletions dietpi/dietpi-cloudshell
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,26 @@
BLANK_SCREEN_TIME_HOUR_END=0

# This will only work if dietpi-cloudshell was started via dietpi-autostart/dietpi-login, as the setterm power options can only be applied when the command originates from the same terminal without redirects.
RUN_BLANK_SCREEN_AT_SPECIFIC_TIME(){

RUN_BLANK_SCREEN_AT_SPECIFIC_TIME()
{
local current_hour=$(date '+%-H')

# Turn screen off
if (( ! $BLANK_SCREEN_ACTIVE )); then

(( $BLANK_SCREEN_TIME_HOUR_START == $current_hour )) || return

if (( ! $BLANK_SCREEN_ACTIVE && $BLANK_SCREEN_TIME_HOUR_START == $current_hour ))
then
clear
echo -e '\n\nScreen will be powered down in under 1 minute\n'
setterm --blank 1 --powersave on # Blank after 1 minute as force requires a poke to bring it back up
BLANK_SCREEN_ACTIVE=1

# Turn screen on
elif (( $BLANK_SCREEN_TIME_HOUR_END == $current_hour )); then
# Odroid XU4 CloudShell 2 backlight
[[ $G_HW_MODEL == 11 && -f '/sys/class/backlight/fb_hktft32/bl_power' ]] && echo 0 > /sys/class/backlight/fb_hktft32/bl_power

# Turn screen on
elif (( $BLANK_SCREEN_ACTIVE && $BLANK_SCREEN_TIME_HOUR_END == $current_hour ))
then
Disable_Screen_Blanking

fi

}

Disable_Screen_Blanking(){
Expand All @@ -68,6 +67,8 @@
setterm --blank 0 --powersave off
BLANK_SCREEN_ACTIVE=0

# Odroid XU4 CloudShell 2 backlight
[[ $G_HW_MODEL == 11 && -f '/sys/class/backlight/fb_hktft32/bl_power' ]] && echo 1 > /sys/class/backlight/fb_hktft32/bl_power
}

# Converts a byte int to string, in human readable byte format.
Expand Down Expand Up @@ -1499,8 +1500,7 @@ _EOF_

if [[ $G_WHIP_RETURNED_VALUE == 'Toggle' ]];then

((BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED++))
(( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED > 1 )) && BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED=0
BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED=$(( ! $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED ))

elif [[ $G_WHIP_RETURNED_VALUE == 'Start time' ]];then

Expand Down
9 changes: 4 additions & 5 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,10 @@
# Remote
local odroid_remote_text='Off'
local odroid_remote_enabled=0
if [[ -f '/etc/systemd/system/odroid-remote.service' ]]; then

if grep -Eq '^[[:blank:]]*(gpio-ir-recv|meson_ir)[[:blank:]]*$' /etc/modules || systemctl -q is-enabled lircd 2> /dev/null
then
odroid_remote_text='On'
odroid_remote_enabled=1

fi
G_WHIP_MENU_ARRAY+=('10' ": Odroid remote : [$odroid_remote_text]")

Expand Down Expand Up @@ -260,7 +259,7 @@
else

G_WHIP_MENU_ARRAY+=('odroid-lcd35' ': 480x320 panel with touch input')
(( $G_HW_MODEL == 11 )) && G_WHIP_MENU_ARRAY+=('odroid-cloudshell' ': 320x240 panel')
(( $G_HW_MODEL == 11 )) && G_WHIP_MENU_ARRAY+=('odroid-cloudshell' ': 320x240 panel' 'odroid-cloudshell2' ': Odroid XU4 CloudShell 2 LCD')

fi

Expand Down Expand Up @@ -330,7 +329,7 @@ A long (or insufficiently manufactured) cable may required a higher boost settin

/boot/dietpi/func/dietpi-set_hardware remoteir none && REBOOT_REQUIRED=1

elif G_WHIP_YESNO 'This will enable the IR modules, setup Lirc and the Odroid Remote for Odroid C1, C2 and XU4 Cloudshell.
elif G_WHIP_YESNO 'This will enable the IR modules, setup Lirc and the Odroid Remote for Odroid C1, C2 and XU4 CloudShell.
\nNB: Other remotes can be configured by running "irrecord" and applying the codes to "/etc/lirc/lircd.conf"\n\nDo you wish to continue?'; then

/boot/dietpi/func/dietpi-set_hardware remoteir odroid_remote && REBOOT_REQUIRED=1
Expand Down
4 changes: 2 additions & 2 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -9512,7 +9512,7 @@ _EOF_
esac

url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")
local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.4.6.8723/Radarr.master.5.4.6.8723.linux-core-$arch.tar.gz"
local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.5.3.8819/Radarr.master.5.5.3.8819.linux-core-$arch.tar.gz"
fi

Download_Install "$url"
Expand Down Expand Up @@ -9955,7 +9955,7 @@ _EOF_
*) local arch='x64';;
esac

local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.16.2.4435/Prowlarr.master.1.16.2.4435.linux-core-$arch.tar.gz"
local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.17.2.4511/Prowlarr.master.1.17.2.4511.linux-core-$arch.tar.gz"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")"
G_EXEC mv Prowlarr /opt/prowlarr
fi
Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# - Assign defaults/code version as fallback
[[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9
[[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2
[[ $G_GITBRANCH ]] || G_GITBRANCH='master'
[[ $G_GITOWNER ]] || G_GITOWNER='MichaIng'
# - Save current version and Git branch
Expand Down
Loading
Loading