Skip to content

Commit

Permalink
Release v9.7 (#7193)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Aug 26, 2024
2 parents b9bebf6 + 2c429ef commit 5c5951a
Show file tree
Hide file tree
Showing 17 changed files with 892 additions and 133 deletions.
410 changes: 410 additions & 0 deletions .build/images/VisionFive2/visionfive2_defconfig

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
##########################################
# Load DietPi-Globals
##########################################
Error_Exit(){ G_DIETPI-NOTIFY 1 "$1, aborting ..."; exit 1; }
if [[ -f '/boot/dietpi/func/dietpi-globals' ]]
then
. /boot/dietpi/func/dietpi-globals
else
curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1
curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || Error_Exit 'Failed to download DietPi-Globals'
# shellcheck disable=SC1091
. /tmp/dietpi-globals
G_EXEC rm /tmp/dietpi-globals
Expand Down Expand Up @@ -612,7 +613,8 @@ _EOF_
G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt

# Force ARMv6 arch on Raspbian
(( $HW_ARCH == 1 )) && echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh
# shellcheck disable=SC2015
(( $HW_ARCH > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'

# Skip filesystem expansion
G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service
Expand Down Expand Up @@ -672,8 +674,6 @@ G_EXEC rm /etc/bashrc.d/00-dietpi-build.sh /boot/Automation_Custom_Script.sh
poweroff
}
_EOF_
(( $HW_ARCH == 1 )) && G_EXEC sed --follow-symlinks -i 's/Custom_Script/Custom_{Pre,}Script/' rootfs/boot/Automation_Custom_Script.sh

# Start container
# - Bind mounts required to allow container reading its own drive info, /dev/disk for GRUB and probably other tools to detect UUIDs
# - Skip for container images
Expand All @@ -688,6 +688,9 @@ _EOF_
# Reset IPv4 network connectivity check setting
G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=9.9.9.9' rootfs/boot/dietpi.txt

# Revert ARMv6 Workaround
(( $HW_ARCH == 1 )) && G_EXEC rm rootfs/usr/local/bin/uname

# Revert workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
(( $DISTRO == 8 )) && G_EXEC rm rootfs/etc/systemd/system/{multi-user.target.wants/,}dietpi-automation.service

Expand Down
4 changes: 2 additions & 2 deletions .build/images/dietpi-imager
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
Run_fsck

# Shrink last filesystem to minimum
local last_part_dev=$(lsblk -rnpo NAME "$FP_SOURCE"?* | tail -1)
local last_part_dev=$(lsblk -rnpo NAME "$FP_SOURCE" | tail -1)
local last_fs_type=$(lsblk -no FSTYPE "$last_part_dev")
if [[ $last_fs_type == 'ext4' ]]
then
Expand Down Expand Up @@ -753,7 +753,7 @@ _EOF_
# Move GPT backup partition table to end of drive
if [[ $CLONING_TOOL != 'Clonezilla' && $PART_TABLE_TYPE == 'gpt' ]]
then
G_EXEC_DESC='Moving GPT backup partition table to end of drive' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT"
G_EXEC_DESC='Re-creating GPT backup partition table and header at end of image' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT"
G_EXEC sync
fi

Expand Down
99 changes: 45 additions & 54 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,11 @@ _EOF_
#------------------------------------------------------------------------------------------------

G_EXEC_DESC='Downloading source code' G_EXEC curl -sSfLO "https://github.com/$G_GITOWNER/DietPi/archive/$G_GITBRANCH.tar.gz"
[[ -d DietPi-$G_GITBRANCH ]] && G_EXEC_DESC='Removing old source code' G_EXEC rm -R "DietPi-$G_GITBRANCH"
G_EXEC_DESC='Unpacking source code' G_EXEC tar xf "$G_GITBRANCH.tar.gz"
G_EXEC_DESC='Removing unused files' G_EXEC rm -f "$G_GITBRANCH.tar.gz" "DietPi-$G_GITBRANCH/dietpi/"{pre-patch_file,patch_file,server_version-6}
G_EXEC_DESC='Hardening source code mode' G_EXEC chmod -R g-w "DietPi-$G_GITBRANCH"
local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes
[[ -d $dir ]] && G_EXEC_DESC='Removing old source code' G_EXEC rm -R "$dir"
G_EXEC_DESC='Unpacking source code' G_EXEC tar xf "${G_GITBRANCH##*/}.tar.gz" # Support for Git branch names with forward slashes
G_EXEC_DESC='Removing unused files' G_EXEC rm -f "${G_GITBRANCH##*/}.tar.gz" "$dir/"{pre-patch_file,patch_file,server_version-6}
G_EXEC_DESC='Hardening update archive mode' G_EXEC chmod -R g-w "$dir"

[[ -d '/boot' ]] || G_EXEC mkdir /boot

Expand All @@ -605,9 +606,9 @@ _EOF_
then
G_EXEC ln -sf firmware/cmdline.txt /boot/cmdline.txt
G_EXEC ln -sf firmware/config.txt /boot/config.txt
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/RPi/config.txt" /boot/firmware/
G_EXEC mv "$dir/.build/images/RPi/config.txt" /boot/firmware/
else
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/RPi/config.txt" /boot/
G_EXEC mv "$dir/.build/images/RPi/config.txt" /boot/
fi
echo "root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /) rootfstype=$(findmnt -Ufnro FSTYPE -M /) rootwait net.ifnames=0 logo.nologo console=serial0,115200 console=tty1" > /boot/cmdline.txt
# Boot in 64-bit mode if this is a 64-bit image
Expand All @@ -618,26 +619,26 @@ _EOF_
armbian_packages=1
local model='OdroidC1'
(( $G_HW_MODEL == 11 )) && model='OdroidXU4'
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/$model/boot.ini" /boot/boot.ini
G_EXEC mv "$dir/.build/images/$model/boot.ini" /boot/boot.ini
G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=UUID=$(findmnt -Ufnro UUID -M /)/" /boot/boot.ini
G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/boot.ini
G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup
G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup
G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot
G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot
G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot

elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90)$ ]]
then
armbian_packages=1
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt
G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd
G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt
G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt
G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt
G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup
G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup
G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot
G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot
# Odroid C2: Fix USB device detection: https://github.com/MichaIng/DietPi/issues/5963
if (( $G_HW_MODEL == 12 ))
then
Expand Down Expand Up @@ -688,7 +689,13 @@ setenv rootuuid "true"' /boot/boot.cmd
73) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3308-rock-pi-s.dtb' /boot/dietpiEnv.txt;; # U-Boot does not pass any ${fdtfile}
77) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3568-rock-3a.dtb' /boot/dietpiEnv.txt;;
78) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588-rock-5b.dtb' /boot/dietpiEnv.txt;;
79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;;
79)
case $HW_VARIANT in
1) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6s.dtb' /boot/dietpiEnv.txt;;
2) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;;
*) :;;
esac
;;
85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;;
87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;;
*) :;;
Expand Down Expand Up @@ -781,7 +788,7 @@ setenv rootuuid "true"' /boot/boot.cmd
# NanoPi M3/T3/Fire3 (64-bit)
elif (( $G_HW_MODEL == 62 ))
then
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd
G_EXEC mv "$dir/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd
G_EXEC sed --follow-symlinks -i '/overlay/d' /boot/dietpiEnv.txt
G_EXEC sed --follow-symlinks -i 's/ttyAML0/ttySAC0/' /boot/dietpiEnv.txt
fi
Expand All @@ -790,20 +797,20 @@ setenv rootuuid "true"' /boot/boot.cmd
# shellcheck disable=SC2016
[[ -f '/etc/initramfs/post-update.d/99-dietpi-uboot' && $(findmnt -t vfat -M /boot) ]] && G_EXEC sed --follow-symlinks -i '/^ln -s/c\mv -v "/boot/uInitrd-$1" /boot/uInitrd' /etc/initramfs/post-update.d/99-dietpi-uboot # FAT does not support symlinks

G_EXEC mv "DietPi-$G_GITBRANCH/dietpi.txt" /boot/
G_EXEC mv "DietPi-$G_GITBRANCH/README.md" /boot/dietpi-README.md
G_EXEC mv "DietPi-$G_GITBRANCH/LICENSE" /boot/dietpi-LICENSE.txt
G_EXEC mv "$dir/dietpi.txt" /boot/
G_EXEC mv "$dir/README.md" /boot/dietpi-README.md
G_EXEC mv "$dir/LICENSE" /boot/dietpi-LICENSE.txt

# Reading version string for later use
# shellcheck source=.update/version source=/boot/dietpi/.version
. "DietPi-$G_GITBRANCH/.update/version"
. "$dir/.update/version"
G_DIETPI_VERSION_CORE=$G_REMOTE_VERSION_CORE
G_DIETPI_VERSION_SUB=$G_REMOTE_VERSION_SUB
G_DIETPI_VERSION_RC=$G_REMOTE_VERSION_RC

G_EXEC_DESC='Copy DietPi scripts to /boot/dietpi' G_EXEC cp -a "DietPi-$G_GITBRANCH/dietpi" /boot/
G_EXEC_DESC='Copy DietPi system files in place' G_EXEC cp -a "DietPi-$G_GITBRANCH/rootfs/." /
G_EXEC_DESC='Clean download location' G_EXEC rm -R "DietPi-$G_GITBRANCH"
G_EXEC_DESC='Copy DietPi scripts to /boot/dietpi' G_EXEC cp -a "$dir/dietpi" /boot/
G_EXEC_DESC='Copy DietPi system files in place' G_EXEC cp -a "$dir/rootfs/." /
G_EXEC_DESC='Clean download location' G_EXEC rm -R "$dir"

G_DIETPI-NOTIFY 2 'Storing DietPi version info:'
G_CONFIG_INJECT 'DEV_GITBRANCH=' "DEV_GITBRANCH=$G_GITBRANCH" /boot/dietpi.txt
Expand Down Expand Up @@ -1043,42 +1050,23 @@ setenv rootuuid "true"' /boot/boot.cmd
[[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~'

# Remove obsolete lists
find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} +
find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rv {} +

if [[ $G_GITBRANCH == 'master' ]]
if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20
then
# Prevent any unintended packages from being installed from Armbian's APT repository, like base-files: https://github.com/MichaIng/DietPi/issues/6227#issuecomment-1713688577
cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian
Package: *
Pin: origin apt.armbian.com
Pin-Priority: -1
Package: armbian-firmware* linux-*
Pin: origin apt.armbian.com
Pin-Priority: 500
_EOF_
if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20
then
G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s'
cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp
G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s'
cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp
Package: base-files
Pin: release o=Debian
Pin-Priority: 1000
_EOF_
G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian'
fi

# Bootstrap Armbian repository
G_EXEC_RETRIES=2 G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes'

# Add Armbian repository
G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list"
G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian'
fi

# Select kernel, device tree and U-Boot packages
local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=()
case $G_HW_MODEL in
10) model='odroidc1' kernel='meson' arch='arm';;
10) model='odroidc1' kernel='meson' arch='arm' branch='edge';;
11) model='odroidxu4' kernel='odroidxu4' arch='arm';;
12) model='odroidc2';;
16) model='odroidc4';;
Expand Down Expand Up @@ -1132,17 +1120,17 @@ _EOF_
*) model='nanopi-r5s';;
esac;;
77) model='rock-3a' kernel='rockchip64';;
78) model='rock-5b' kernel='rk35xx' branch='legacy';;
79) kernel='rk35xx' branch='legacy'
78) model='rock-5b' kernel='rk35xx' branch='vendor';;
79) kernel='rk35xx' branch='vendor'
case $HW_VARIANT in
2) model='nanopi-r6c';;
3) model='nanopct6';;
*) model='nanopi-r6s';;
esac;;
80) model='orangepi5' kernel='rk35xx' branch='legacy';;
82) model='orangepi5-plus' kernel='rk35xx' branch='legacy';;
80) model='orangepi5' kernel='rk35xx' branch='vendor';;
82) model='orangepi5-plus' kernel='rk35xx' branch='vendor';;
83) model='orangepizero3' kernel='sunxi64';;
85) model='rock-5a' kernel='rk35xx' branch='legacy';;
85) model='rock-5a' kernel='rk35xx' branch='vendor';;
86) model='tinkerboard-2' kernel='rockchip64';;
87) model='orangepi3b' kernel='rockchip64' branch='edge';;
88) model='orangepizero2w' kernel='sunxi64';;
Expand Down Expand Up @@ -1422,7 +1410,7 @@ _EOF_
[[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~'

# Remove obsolete components from Armbian list and connect via HTTPS
find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} +
find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rv {} +
G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list"

# Skip creating kernel symlinks and remove existing ones
Expand Down Expand Up @@ -1792,7 +1780,10 @@ _EOF_'
G_AGP rfkill
[[ -d '/var/lib/systemd/rfkill' ]] && G_EXEC rm -R /var/lib/systemd/rfkill

G_DIETPI-NOTIFY 2 'Configuring wlan/eth naming to be preferred for networked devices:'
G_DIETPI-NOTIFY 2 'Removing all systemd-networkd configs, since DietPi uses ifupdown by default' # https://github.com/MichaIng/DietPi/issues/5871
G_EXEC rm -Rf /etc/systemd/network/{,.??,.[^.]}*

G_DIETPI-NOTIFY 2 'Avoid "predictable" network interface names'
G_EXEC ln -sf /dev/null /etc/systemd/network/99-default.link
G_EXEC ln -sf /dev/null /etc/udev/rules.d/80-net-setup-link.rules

Expand Down
3 changes: 2 additions & 1 deletion .build/software/Amiberry/container_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ G_EXEC mkdir rootfs
G_EXEC mount "${FP_LOOP}p1" rootfs

# Enforce ARMv6 arch on Raspbian
(( $arch > 1 )) || echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh || Error_Exit 'Failed to generate Automation_Custom_PreScript.sh'
# shellcheck disable=SC2015
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
Expand Down
3 changes: 2 additions & 1 deletion .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ G_EXEC mkdir rootfs
G_EXEC mount "${FP_LOOP}p1" rootfs

# Enforce ARMv6 arch on Raspbian
(( $arch > 1 )) || echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh || Error_Exit 'Failed to generate Automation_Custom_PreScript.sh'
# shellcheck disable=SC2015
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/armbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ jobs:
read -r version < VERSION
case '${{ github.event.inputs.asset }}' in
firmware) package='armbian-firmware';;
uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';;
uboot) package='linux-u-boot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';;
kernel)
family=$(. 'config/boards/${{ github.event.inputs.board }}.'* &> /dev/null; echo "$BOARDFAMILY")
echo "Board family is: $family"
family=$(BRANCH='${{ github.event.inputs.branch }}'; . "config/sources/families/$family.conf" &> /dev/null; echo "$LINUXFAMILY")
echo "Linux family is: $family"
package="linux-image-${{ github.event.inputs.branch }}-$family"
package="linux-dtb-${{ github.event.inputs.branch }}-$family"
;;
*) echo 'ERROR: Invalid asset "${{ github.event.inputs.asset }}"'; exit 1;;
esac
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
##########################################
# Load DietPi-Globals
##########################################
Error_Exit(){ G_DIETPI-NOTIFY 1 "$1, aborting ..."; exit 1; }
if [[ -f '/boot/dietpi/func/dietpi-globals' ]]
then
. /boot/dietpi/func/dietpi-globals
else
curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1
curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || Error_Exit 'Failed to download DietPi-Globals'
# shellcheck disable=SC1091
. /tmp/dietpi-globals
G_EXEC rm /tmp/dietpi-globals
Expand Down Expand Up @@ -179,7 +180,7 @@ Process_Software()
139) aSERVICES[i]='sabnzbd' aTCP[i]='8080'; (( $arch == 10 )) || aDELAY[i]=30;; # ToDo: Solve conflict with Airsonic
140) aSERVICES[i]='domoticz' aTCP[i]='8124 8424';;
#142) aSERVICES[i]='snapd';; "system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/syscheck-mountpoint-2075108377: mount failed: Operation not permitted."
143) aSERVICES[i]='koel' aTCP[i]='8003';;
143) aSERVICES[i]='koel' aTCP[i]='8003'; (( $arch == 10 )) || aDELAY[i]=30;;
144) aSERVICES[i]='sonarr' aTCP[i]='8989'; (( $arch < 10 )) && aDELAY[i]=90;;
145) aSERVICES[i]='radarr' aTCP[i]='7878'; (( $arch < 10 )) && aDELAY[i]=90;;
146) aSERVICES[i]='tautulli' aTCP[i]='8181'; (( $arch == 10 )) || aDELAY[i]=60;;
Expand Down Expand Up @@ -318,7 +319,8 @@ G_EXEC mkdir rootfs
G_EXEC mount "${FP_LOOP}p1" rootfs

# Force ARMv6 arch on Raspbian
(( $arch == 1 )) && G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/iG_EXEC sed -i -e '\''/^G_HW_ARCH=/cG_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/cG_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' rootfs/boot/dietpi/dietpi-login
# shellcheck disable=SC2015
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'

# Force RPi on ARM systems if requested
if [[ $RPI == 'true' ]] && (( $arch < 10 ))
Expand Down
Loading

0 comments on commit 5c5951a

Please sign in to comment.