Skip to content

Commit

Permalink
Beta v8.10.0 (#5805)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Oct 15, 2022
2 parents 8918f87 + 1fb1077 commit afaff4f
Show file tree
Hide file tree
Showing 23 changed files with 1,438 additions and 135 deletions.
15 changes: 14 additions & 1 deletion .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,15 @@ exclude=
case $DISTRO in
5) distro='buster'; [[ $HW_MODEL == 75 ]] || { G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1; };;
6) distro='bullseye' exclude=',gcc-8-base,gcc-9-base';;
7) distro='bookworm' exclude=',gcc-8-base,gcc-9-base,gcc-10-base,gcc-11-base'; [[ $HW_MODEL == 21 ]] && ((root_size+=384));; # Raise root size where required
7)
distro='bookworm' exclude=',gcc-8-base,gcc-9-base,gcc-10-base,gcc-11-base'
# Raise root size where required
case $HW_MODEL in
1[256]|7[45]) ((root_size+=128));;
21) ((root_size+=384));;
*) :;;
esac
;;
*) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;;
esac

Expand Down Expand Up @@ -408,6 +416,9 @@ then
# Revert autostart option, in case Amiberry image was generated before
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 -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

# Workaround invalid TERM on login
# shellcheck disable=SC2016
G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || export TERM=dumb'\'' > rootfs/etc/bashrc.d/00-dietpi-build.sh'
Expand Down Expand Up @@ -467,6 +478,8 @@ G_EXEC rm /etc/bashrc.d/00-dietpi-build.sh /boot/Automation_Custom_Script.sh /ro
poweroff
}
_EOF_
(( $HW_ARCH == 1 )) && G_EXEC sed -i '/Automation_Custom_Script/i\G_EXEC rm /boot/Automation_Custom_PreScript.sh' rootfs/boot/Automation_Custom_Script.sh

# Start container
# - dbus required for container spawn
mask_dbus=0
Expand Down
16 changes: 8 additions & 8 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,8 @@ _EOF_
# Remove obsolete combined keyring
[[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg
[[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~'
# Exclude doubled device tree files, shipped with the kernel package
G_EXEC eval "echo 'path-exclude /usr/lib/linux-image-current-*' > /etc/dpkg/dpkg.cfg.d/01-dietpi-exclude_doubled_devicetrees"
# Remove obsolete lists and doubled device tree files, shipped with the kernel package
G_EXEC rm -Rf /etc/apt/sources.list.d/* /usr/lib/linux-image-current-*
# Remove obsolete lists
G_EXEC rm -Rf /etc/apt/sources.list.d/*
# Add Armbian repository
G_EXEC eval "echo 'deb http://apt.armbian.com/ ${DISTRO_TARGET_NAME/bookworm/bullseye} main' > /etc/apt/sources.list.d/dietpi-armbian.list"
# Update APT lists
Expand Down Expand Up @@ -1141,7 +1139,7 @@ _EOF_
getent group openmediavault-webgui > /dev/null && groupdel openmediavault-webgui # OMV (NanoPi NEO2)

G_DIETPI-NOTIFY 2 'Resetting root user account'
G_EXEC usermod -d /root -s /bin/dash root
G_EXEC usermod -d /root -s /bin/bash root
G_EXEC eval 'chpasswd <<< '\''root:dietpi'\'

G_EXEC_DESC='Creating DietPi user account' G_EXEC /boot/dietpi/func/dietpi-set_software useradd dietpi
Expand Down Expand Up @@ -1366,7 +1364,9 @@ _EOF_'

G_DIETPI-NOTIFY 2 'Configuring DNS nameserver:'
# Failsafe: Assure that /etc/resolv.conf is not a symlink and disable systemd-resolved + systemd-networkd
G_EXEC systemctl disable --now systemd-{resolve,network}d
# - Since Bookworm, systemd-resolved is now an own package.
G_EXEC systemctl disable --now systemd-networkd
(( $G_DISTRO > 6 )) || G_EXEC systemctl disable --now systemd-resolved
G_EXEC rm -f /etc/resolv.conf
echo 'nameserver 9.9.9.9' > /etc/resolv.conf # Apply generic functional DNS nameserver, updated on next service start

Expand Down Expand Up @@ -1525,8 +1525,8 @@ _EOF_'
then
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyAMA0

# ROCK Pi 4 and Quartz64
elif (( $G_HW_MODEL == 72 || $G_HW_MODEL == 49 ))
# ROCK Pi 4, ROCKPro64, NanoPi R4S and Quartz64
elif [[ $G_HW_MODEL =~ ^(72|4[279])$ ]]
then
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS2

Expand Down
6 changes: 3 additions & 3 deletions .build/software/Amiberry/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ G_AGDUG
G_AG_CHECK_INSTALL_PREREQ "${adeps_build[@]}"

# Build libSDL2
v_sdl='2.0.22'
v_sdl='2.24.1'
if [[ ! -d /tmp/SDL2-$v_sdl ]]
then
G_DIETPI-NOTIFY 2 "Building libSDL2 version \e[33m$v_sdl"
Expand Down Expand Up @@ -97,7 +97,7 @@ else
fi

# Build Amiberry
v_ami='5.3'
v_ami='5.4'
G_DIETPI-NOTIFY 2 "Building Amiberry version \e[33m$v_ami\e[90m for platform: \e[33m$PLATFORM"
[[ -d /tmp/amiberry-$v_ami ]] && G_EXEC rm -R "/tmp/amiberry-$v_ami"
G_EXEC cd /tmp
Expand Down Expand Up @@ -186,7 +186,7 @@ grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+
# - control
cat << _EOF_ > "$DIR/DEBIAN/control"
Package: amiberry
Version: $v_ami-dietpi4
Version: $v_ami-dietpi1
Architecture: $(dpkg --print-architecture)
Maintainer: MichaIng <[email protected]>
Date: $(date -u '+%a, %d %b %Y %T %z')
Expand Down
17 changes: 13 additions & 4 deletions .build/software/raspberrypi-sys-mods/build.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/bash
{
. /boot/dietpi/func/dietpi-globals || exit 1
if [[ -f '/boot/dietpi/func/dietpi-globals' ]]
then
. /boot/dietpi/func/dietpi-globals || exit 1
else
curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:-MichaIng}/DietPi/${G_GITBRANCH:-master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1
# shellcheck disable=SC1091
. /tmp/dietpi-globals || exit 1
G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals
fi

G_EXEC mkdir -p raspberrypi-sys-mods/{DEBIAN,lib/udev/rules.d,usr/{lib,share/doc}/raspberrypi-sys-mods}

Expand Down Expand Up @@ -51,7 +60,7 @@ while :; do
if grep -q "alias $SUBSYSTEM:$comp " $ALIASES; then
modprobe "$SUBSYSTEM:$comp" && exit 0
fi
let n="$n + 1"
n=$(expr $n + 1)
done
modprobe "$MODALIAS" || modprobe "of:N${OF_NAME}T<NULL>C$OF_COMPATIBLE_0"
_EOF_
Expand Down Expand Up @@ -132,7 +141,7 @@ find raspberrypi-sys-mods ! \( -path raspberrypi-sys-mods/DEBIAN -prune \) -type

cat << _EOF_ > raspberrypi-sys-mods/DEBIAN/control
Package: raspberrypi-sys-mods
Version: 2:20220915-dietpi1
Version: 2:20220915-dietpi2
Architecture: all
Maintainer: MichaIng <[email protected]>
Date: $(date -u '+%a, %d %b %Y %T %z')
Expand All @@ -149,6 +158,6 @@ G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk raspberrypi-sys-mod

# Build DEB package
G_EXEC rm -Rf raspberrypi-sys-mods.deb
G_EXEC_OUTPUT=1 G_EXEC dpkg-deb -b raspberrypi-sys-mods
G_EXEC_OUTPUT=1 G_EXEC dpkg-deb -b -Zxz -z9 raspberrypi-sys-mods
G_EXEC rm -Rf raspberrypi-sys-mods
}
Loading

0 comments on commit afaff4f

Please sign in to comment.