From 0278a09fdf43b914ae21004d7b0e66be99d2e724 Mon Sep 17 00:00:00 2001 From: Koichiro Iwao Date: Mon, 23 Jun 2025 18:08:56 +0900 Subject: [PATCH] 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