Skip to content

Commit

Permalink
v8.23
Browse files Browse the repository at this point in the history
- DietPi-Installer | Apply base-files downgrade and Odroid C1 kernel pinning as well for new images
  • Loading branch information
MichaIng committed Sep 25, 2023
1 parent 8079e2d commit 3090ab6
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,16 @@ 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
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'
# Remove obsolete combined keyring
Expand Down Expand Up @@ -1056,8 +1066,19 @@ _EOF_
G_EXEC rm package.deb
fi

# Odroid C1: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818
if (( $G_HW_MODEL == 10 ))
then
G_DIETPI-NOTIFY 2 'Pinning Odroid C1 "current" and "edge" kernel packages to latest known functional version and in case enforcing automated downgrade'
cat << '_EOF_' > /etc/apt/preferences.d/00-dietpi-odroidc1
Package: linux-image-current-meson linux-dtb-current-meson linux-headers-current-meson linux-image-edge-meson linux-dtb-edge-meson linux-headers-edge-meson
Pin: version 23.02.2
Pin-Priority: 1000
_EOF_
G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian'

# NanoPi R2S/NEO3
if [[ $G_HW_MODEL =~ ^(55|56)$ ]]
elif [[ $G_HW_MODEL =~ ^(55|56)$ ]]
then
G_DIETPI-NOTIFY 2 'Blacklisting video related kernel modules'
cat << '_EOF_' > /etc/modprobe.d/dietpi-headless.conf
Expand Down Expand Up @@ -1097,8 +1118,19 @@ _EOF_
. /usr/lib/u-boot/platform_install.sh
# shellcheck disable=SC2154
write_uboot_platform "$DIR" "$BOOT_DEVICE"

# Remove temporary APT configs
[[ -f '/etc/apt/preferences.d/dietpi-armbian-tmp' ]] && G_EXEC rm /etc/apt/preferences.d/dietpi-armbian-tmp
[[ -f '/etc/apt/apt.conf.d/dietpi-armbian' ]] && G_EXEC rm /etc/apt/apt.conf.d/dietpi-armbian

# Odroid C1 cleanup: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818
if (( $G_HW_MODEL == 10 ))
then
G_DIETPI-NOTIFY 2 'Setting Odroid C1 "current" and "edge" kernel packages on hold'
G_EXEC apt-mark hold linux-image-current-meson linux-dtb-current-meson linux-headers-current-meson linux-image-edge-meson linux-dtb-edge-meson linux-headers-edge-meson

# Radxa Zero: Enable USB OTG OOTB: https://github.com/MichaIng/DietPi/issues/5931
if (( $G_HW_MODEL == 74 ))
elif (( $G_HW_MODEL == 74 ))
then
G_AGI device-tree-compiler
[[ -d '/boot/overlay-user' ]] || G_EXEC mkdir /boot/overlay-user
Expand Down

0 comments on commit 3090ab6

Please sign in to comment.