From 0278a09fdf43b914ae21004d7b0e66be99d2e724 Mon Sep 17 00:00:00 2001 From: Koichiro Iwao Date: Mon, 23 Jun 2025 18:08:56 +0900 Subject: [PATCH 1/2] Reintroduce initramfs for XFS / LUKS --- SPECS/raspberrypi2.spec | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/SPECS/raspberrypi2.spec b/SPECS/raspberrypi2.spec index 3e033b7..7b851c9 100644 --- a/SPECS/raspberrypi2.spec +++ b/SPECS/raspberrypi2.spec @@ -11,7 +11,7 @@ ExclusiveArch: aarch64 %define local_version v8 %define bcmmodel 2711 -%define extra_version 1 +%define extra_version 2 # This originally implies Kernel 4.x for RPi 2 and is not appropriate now. # Be careful to change this not to disturb the seamless package update. @@ -78,6 +78,7 @@ Provides: kernel = %{version}-%{release} Provides: kernel-core = %{version}-%{release} Provides: installonlypkg(kernel) Requires: coreutils +Requires: dracut %description kernel%{?ksuffix} The kernel package contains the Linux kernel (vmlinuz), the core of any Linux operating system. The kernel handles the basic functions @@ -423,13 +424,19 @@ if [ -d /boot ]; then cp /usr/share/%{name}-kernel%{?ksuffix}/%{version}-%{release}/boot/overlays/*.dtb* /boot/overlays/ cp /usr/share/%{name}-kernel%{?ksuffix}/%{version}-%{release}/boot/overlays/README /boot/overlays/ cp /boot/config-kernel-%{version}-%{release}.inc /boot/config-kernel.inc + + /usr/bin/dracut --no-hostonly /boot/initramfs-%{version}-%{release}.img %{version}-%{release} + cp /boot/initramfs-%{version}-%{release}.img /boot/initramfs%{armtarget} fi %postun kernel%{?ksuffix} -if [ -f /boot/kernel%{armtarget}.img ];then +if [ -f /boot/kernel%{armtarget}.img ]; then #only restore kernel%{armtarget}.img if it exists, we may have moved to initramfs cp $(ls -1 /boot/kernel-*-*|sort -V|tail -1) /boot/kernel%{armtarget}.img fi +if [ -f /boot/initramfs%{armtarget} ]; then + cp $(ls -1 /boot/initramfs-*-*|sort -V| tail -1) /boot/initramfs%{armtarget} +fi cp $(ls -1d /usr/share/%{name}-kernel%{?ksuffix}/*-*/|sort -V|tail -1)/boot/*.dtb /boot/ cp $(ls -1d /usr/share/%{name}-kernel%{?ksuffix}/*-*/|sort -V|tail -1)/boot/overlays/*.dtb* /boot/overlays/ cp $(ls -1d /usr/share/%{name}-kernel%{?ksuffix}/*-*/|sort -V|tail -1)/boot/overlays/README /boot/overlays/ @@ -504,6 +511,11 @@ cp $(ls -1 /boot/config-kernel-*-*|sort -V|tail -1) /boot/config-kernel.inc %endif %changelog +* Mon Jun 23 2025 Koichiro Iwao - 6.12.25-20250428.v8.2 +- Reintroduce initramfs for XFS / LUKS + https://github.com/AlmaLinux/raspberry-pi/issues/65 + https://github.com/AlmaLinux/raspberry-pi/issues/86 + * Mon May 26 2025 Koichiro Iwao - 6.12.25-20250428.v8.1 - Update kernel to v6.12.25 stable_20250428 - Update firmware to 1.20250430 From 3500ea08fc39061f33dc9ac12706aeee42ef380f Mon Sep 17 00:00:00 2001 From: Koichiro Iwao Date: Tue, 24 Jun 2025 16:19:01 +0900 Subject: [PATCH 2/2] Exclude 10 specific subpackages < 10 --- SPECS/raspberrypi2.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SPECS/raspberrypi2.spec b/SPECS/raspberrypi2.spec index 7b851c9..5e538b2 100644 --- a/SPECS/raspberrypi2.spec +++ b/SPECS/raspberrypi2.spec @@ -99,6 +99,7 @@ Requires: perl-interpreter This package provides kernel headers and makefiles sufficient to build modules against the kernel package. +%if 0%{?rhel} >= 10 %package kernel%{?ksuffix}-modules Summary: Pseudo package for kernel modules Group: System Environment/Kernel @@ -140,6 +141,7 @@ AutoProv: yes %description kernel%{?ksuffix}-modules-extra This package provides pseudo dependency for the packages that depends on regular kernel-modules-extra packages. +%endif %if %{with_tools} %package kernel%{?ksuffix}-tools @@ -447,6 +449,7 @@ cp $(ls -1 /boot/config-kernel-*-*|sort -V|tail -1) /boot/config-kernel.inc %defattr(-,root,root) /usr/src/kernels/%{version}-%{release} +%if 0%{?rhel} >= 10 %files kernel%{?ksuffix}-modules # empty package %defattr(-,root,root) @@ -459,6 +462,7 @@ cp $(ls -1 /boot/config-kernel-*-*|sort -V|tail -1) /boot/config-kernel.inc # empty package %defattr(-,root,root) %endif +%endif %if %{with_tools} %files kernel%{?ksuffix}-tools -f cpupower.lang