From f6390741dff48bf0b343e640cfa674e5b3fbd8ec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 12 Jun 2024 16:00:20 +0200 Subject: [PATCH] v9.6 - Odroid C1 | Resolved an issue, where the kernel upgrade did not apply as intended. Many thanks to @th2j for reporting this issue: https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 --- .build/images/dietpi-installer | 21 ++------------------- .update/patches | 10 +--------- .update/pre-patches | 28 ++++++++++++++-------------- CHANGELOG.txt | 2 +- 4 files changed, 18 insertions(+), 43 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 339425a51b..57f6a953e8 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1139,19 +1139,8 @@ _EOF_ *) :;; esac - # 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 - elif [[ $G_HW_MODEL =~ ^(55|56)$ ]] + if [[ $G_HW_MODEL =~ ^(55|56)$ ]] then G_DIETPI-NOTIFY 2 'Blacklisting video related kernel modules' cat << '_EOF_' > /etc/modprobe.d/dietpi-headless.conf @@ -1194,14 +1183,8 @@ _EOF_ # Flash U-Boot /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc "$BOOT_DEVICE" - # 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 - elif (( $G_HW_MODEL == 74 )) + if (( $G_HW_MODEL == 74 )) then G_AGI device-tree-compiler G_EXEC mkdir -p /boot/overlay-user diff --git a/.update/patches b/.update/patches index 694d195297..52f0bb8c33 100755 --- a/.update/patches +++ b/.update/patches @@ -1291,16 +1291,8 @@ Patch_8_22() [[ -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: Set kernel packages on hold. We pin them in pre-patches and enforce an automated downgrade, in case, but since v23.02.2 might not be available forever, we should also set them on hold, until we know there is a compatble newer version available: - # - https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 - # - https://github.com/MichaIng/DietPi/issues/6616#issuecomment-1730900296 - 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 - # NanoPi R4S: Fix Ethernet LEDs: https://github.com/MichaIng/DietPi/issues/6342#issuecomment-1697669420 - elif (( $G_HW_MODEL == 47 )) + if (( $G_HW_MODEL == 47 )) then G_DIETPI-NOTIFY 2 'Updating udev rule for NanoPi R4S Ethernet LEDs' G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' diff --git a/.update/pre-patches b/.update/pre-patches index 11fbb5afe4..0f6c7c38ba 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -257,20 +257,6 @@ _EOF_ 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 - - # Odroid C1: Pin "current" and "edge" kernel versions to Armbian 23.02.2, which are the latest currently known functional versions for C1: - # - https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 - # - https://github.com/MichaIng/DietPi/issues/6616#issuecomment-1730900296 - 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' fi @@ -426,5 +412,19 @@ then fi fi +# v9.6 +if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 6 ) )) +then + # https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 + if (( $G_HW_MODEL == 10 )) + then + G_DIETPI-NOTIFY 2 'Re-allowing kernel upgrades on Odroid C1' + [[ -f '/etc/apt/preferences.d/00-dietpi-odroidc1' ]] G_EXEC rm /etc/apt/preferences.d/00-dietpi-odroidc1 + mapfile -t apackages < <(apt-mark showhold | grep -E '^linux-(image|dtb|headers}-(current|edge)-meson$') + [[ ${apackages[0]} ]] && G_EXEC apt-mark unhold "${apackages[@]}" + unset -v apackages + fi +fi + exit 0 } diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c42adea9ec..b6aab5a5c9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,7 @@ Enhancements: - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 Bug fixes: -- +- Odroid C1 | Resolved an issue, where the kernel upgrade did not apply as intended. Many thanks to @th2j for reporting this issue: https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME