Skip to content

Commit

Permalink
v9.10
Browse files Browse the repository at this point in the history
- RISC-V | Packages for the riscv64 architecture are now available in Debian Trixie. Do not build Sid images anymore, and enable additional software titles.
  • Loading branch information
MichaIng committed Jan 6, 2025
1 parent 301dd5b commit 8543f91
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 58 deletions.
7 changes: 3 additions & 4 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ case $HW_ARCH in
2) iarch='ARMv7' parch='armhf';;
3) iarch='ARMv8' parch='arm64';;
10) iarch='x86_64' parch='amd64';;
11) iarch='RISC-V' parch='riscv64' DISTRO=8;; # RISC-V architecture is available on Sid only, but internally DietPi handles it as Trixie
11) iarch='RISC-V' parch='riscv64' DISTRO=8;; # RISC-V architecture is available on Trixie only.
*) G_DIETPI-NOTIFY 1 "Invalid architecture \"$HW_ARCH\" passed, aborting..."; exit 1;;
esac

Expand All @@ -194,7 +194,6 @@ case $DISTRO in
8) distro='trixie';;
*) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;;
esac
[[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Sid only

case $PTTYPE in
'msdos') :;;
Expand Down Expand Up @@ -610,7 +609,7 @@ then

# Install Allo GUI via automated first run setup right here
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
if (( $DISTRO == 8 && $G_HW_ARCH != $HW_ARCH && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $HW_ARCH ) ))
then
cat << '_EOF_' > rootfs/etc/systemd/system/dietpi-automation.service
Expand Down Expand Up @@ -712,7 +711,7 @@ _EOF_
# Revert ARMv6 Workaround
(( $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
# Revert workaround for skipped autologin in emulated Trixie 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

[[ -f 'rootfs/success' ]] || { G_DIETPI-NOTIFY 1 'The container setup did not finish successfully, aborting...'; exit 1; }
Expand Down
4 changes: 2 additions & 2 deletions .build/software/Amiberry/container_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ case $PLATFORM in
'rpi'[345]'-64-'*|'AMLSM1'|'n2'|'a64'|'rk3588') image="ARMv8-${DISTRO^}" arch=3;;
'rpi'[2-5]*|'c1'|'xu4'|'RK3288'|'sun8i'|'s812') image="ARMv7-${DISTRO^}" arch=2;;
'x86-64') image="x86_64-${DISTRO^}" arch=10;;
'riscv64') image='RISC-V-Sid' arch=11;;
'riscv64') image="RISC-V-${DISTRO^}" arch=11;;
*) Error_Exit "Invalid platform \"$PLATFORM\" passed";;
esac
image="DietPi_Container-$image.img"
Expand Down Expand Up @@ -119,7 +119,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
if [[ $DISTRO == 'trixie' ]] && (( $G_HW_ARCH != $arch && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $arch ) ))
then
cat << '_EOF_' > rootfs/etc/systemd/system/dietpi-automation.service
Expand Down
4 changes: 2 additions & 2 deletions .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ case $ARCH in
'armv7l') image="ARMv7-${DISTRO^}" arch=2;;
'aarch64') image="ARMv8-${DISTRO^}" arch=3;;
'x86_64') image="x86_64-${DISTRO^}" arch=10;;
'riscv64') image='RISC-V-Sid' arch=11; [[ $DISTRO == 'trixie' ]] || Error_Exit "Invalid distro \"$DISTRO\" for arch \"$ARCH\" passed, only \"trixie\" is supported";;
'riscv64') image="RISC-V-${DISTRO^}" arch=11; [[ $DISTRO == 'trixie' ]] || Error_Exit "Invalid distro \"$DISTRO\" for arch \"$ARCH\" passed, only \"trixie\" is supported";;
*) Error_Exit "Invalid architecture \"$ARCH\" passed";;
esac
image="DietPi_Container-$image.img"
Expand Down Expand Up @@ -123,7 +123,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
if [[ $DISTRO == 'trixie' ]] && (( $G_HW_ARCH != $arch && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $arch ) ))
then
cat << '_EOF_' > rootfs/etc/systemd/system/dietpi-automation.service
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ case $ARCH in
'armv7l') image="ARMv7-${DISTRO^}" arch=2;;
'aarch64') image="ARMv8-${DISTRO^}" arch=3;;
'x86_64') image="x86_64-${DISTRO^}" arch=10;;
'riscv64') image='RISC-V-Sid' arch=11;;
'riscv64') image="RISC-V-${DISTRO^}" arch=11;;
*) G_DIETPI-NOTIFY 1 "Invalid architecture \"$ARCH\" passed, aborting..."; exit 1;;
esac
image="DietPi_Container-$image.img"
Expand Down Expand Up @@ -355,7 +355,7 @@ G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ INFO ] Unsup

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Set HOME path, required e.g. go builds, which is otherwise missing when started from a systemd unit.
if [[ $DISTRO == 'trixie' ]] && (( $G_HW_ARCH != $arch && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $arch ) ))
then
Expand Down
8 changes: 8 additions & 0 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -2069,6 +2069,14 @@ Patch_9_9()

Patch_9_10()
{
# RISC-V
if (( $G_HW_ARCH == 11 ))
then
G_DIETPI-NOTIFY 2 'Migrating RISC-V systems from Debian Sid/unstable to Trixie/testing ...'
local apt_mirror=$(mawk '$1=="deb"{print $2;exit}' /etc/apt/sources.list)
/boot/dietpi/func/dietpi-set_software apt-mirror "${apt_mirror:-default}"
fi

# Software updates, migrations and patches
if [[ -f '/boot/dietpi/.installed' ]]
then
Expand Down
10 changes: 10 additions & 0 deletions .update/pre-patches
Original file line number Diff line number Diff line change
Expand Up @@ -453,5 +453,15 @@ then
fi
fi

# v9.10
if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 10 ) ))
then
if (( $G_HW_ARCH == 11 ))
then
G_DIETPI-NOTIFY 2 'Migrating RISC-V systems from Debian Sid/unstable to Trixie/testing ...'
G_EXEC sed -i 's/ sid / trixie /' /etc/apt/sources.list
fi
fi

exit 0
}
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ v9.10
New images:

Enhancements:
- RISC-V | Debian Trixie does now support this architecture, hence our VisionFive 2 and Star64 images are now provided with Debian Trixie/testing instead of Debian Sid/unstable, and existing systemd will be migrated to the Trixie suite.
- RISC-V | Additional software options have been enabled for RISC-V systems: NZBGet, MicroK8s and AdGuard Home
- DietPi-Software | myMPD: We enabled the software option for ARMv6 Bookworm systems, since packages for Raspbian Bookworm are now available. Many thanks to @hackslikeus for bringing up the topic: https://github.com/MichaIng/DietPi/issues/7345

Bug fixes:
Expand Down
Loading

0 comments on commit 8543f91

Please sign in to comment.