From 53d21a7b938c250c48e5102f31b5b66fb4e9f218 Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Fri, 11 Oct 2024 19:44:07 -0700 Subject: [PATCH] Fixes to enable bootc Signed-off-by: Kevin Fox --- SOURCES/config_2711.patch | 6 +++++- SOURCES/config_2712.patch | 6 +++++- SPECS/raspberrypi2.spec | 26 +++++++++++++++++--------- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/SOURCES/config_2711.patch b/SOURCES/config_2711.patch index 7ca65b8..08e3474 100644 --- a/SOURCES/config_2711.patch +++ b/SOURCES/config_2711.patch @@ -23,7 +23,7 @@ index e87791286ab4..6fda5b261683 100644 CONFIG_CRYPTO_USER=m CONFIG_CRYPTO_CRYPTD=m CONFIG_CRYPTO_AES=m -@@ -1674,3 +1672,39 @@ CONFIG_SCHED_TRACER=y +@@ -1674,3 +1672,43 @@ CONFIG_SCHED_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set # CONFIG_STRICT_DEVMEM is not set @@ -63,6 +63,10 @@ index e87791286ab4..6fda5b261683 100644 +CONFIG_FW_LOADER_COMPRESS=y +CONFIG_FW_LOADER_COMPRESS_XZ=y +CONFIG_FW_LOADER_COMPRESS_ZSTD=y ++CONFIG_EROFS_FS=m ++CONFIG_EROFS_FS_XATTR=y ++CONFIG_EROFS_POSIX_ACL=y ++CONFIG_EROFS_FS_SECURITY=y -- 2.45.1 diff --git a/SOURCES/config_2712.patch b/SOURCES/config_2712.patch index 39c7248..7134e24 100644 --- a/SOURCES/config_2712.patch +++ b/SOURCES/config_2712.patch @@ -23,7 +23,7 @@ index 79c4332581eb..7b63683ff687 100644 CONFIG_CRYPTO_USER=m CONFIG_CRYPTO_CRYPTD=m CONFIG_CRYPTO_AES=m -@@ -1677,3 +1675,39 @@ CONFIG_SCHED_TRACER=y +@@ -1677,3 +1675,43 @@ CONFIG_SCHED_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set # CONFIG_STRICT_DEVMEM is not set @@ -63,6 +63,10 @@ index 79c4332581eb..7b63683ff687 100644 +CONFIG_FW_LOADER_COMPRESS=y +CONFIG_FW_LOADER_COMPRESS_XZ=y +CONFIG_FW_LOADER_COMPRESS_ZSTD=y ++CONFIG_EROFS_FS=m ++CONFIG_EROFS_FS_XATTR=y ++CONFIG_EROFS_POSIX_ACL=y ++CONFIG_EROFS_FS_SECURITY=y -- 2.45.1 diff --git a/SPECS/raspberrypi2.spec b/SPECS/raspberrypi2.spec index 617a9f7..590a759 100644 --- a/SPECS/raspberrypi2.spec +++ b/SPECS/raspberrypi2.spec @@ -353,16 +353,24 @@ find %{buildroot}/usr/include \ %posttrans kernel%{?ksuffix} -if [ -f /boot/kernel%{armtarget}.img ] || [ ! -f /boot/config-kernel.inc ];then - # if nothing exists, fall back to generating the file, but don't create it - # if we have moved to initramfs - cp /boot/kernel-%{version}-%{release}.img /boot/kernel%{armtarget}.img +if [ -d /boot ]; then + if [ -f /boot/kernel%{armtarget}.img ] || [ ! -f /boot/config-kernel.inc ];then + # if nothing exists, fall back to generating the file, but don't create it + # if we have moved to initramfs + cp /boot/kernel-%{version}-%{release}.img /boot/kernel%{armtarget}.img + fi + cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/*.dtb /boot/ + cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/*.dtb* /boot/overlays/ + cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/README /boot/overlays/ + /usr/bin/dracut /boot/initramfs-%{version}-%{release}.img %{version}-%{release} + cp /boot/config-kernel-%{version}-%{release}.inc /boot/config-kernel.inc +elif [ -d /usr/lib/ostree-boot ]; then + mv /usr/lib/ostree-boot/config-%{version}-%{release} /usr/lib/modules/%{version}-%{release} + mv /usr/lib/ostree-boot/config-kernel-%{version}-%{release}.inc /usr/lib/modules/%{version}-%{release} + mv /usr/lib/ostree-boot/initramfs-%{version}-%{release}.img /usr/lib/modules/%{version}-%{release}/initramfs + mv /usr/lib/ostree-boot/kernel-%{version}-%{release}.img /usr/lib/modules/%{version}-%{release}/vmlinuz + ls /usr/lib/modules/%{version}-%{release} fi -cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/*.dtb /boot/ -cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/*.dtb* /boot/overlays/ -cp /usr/share/%{name}-kernel/%{version}-%{release}/boot/overlays/README /boot/overlays/ -/usr/bin/dracut /boot/initramfs-%{version}-%{release}.img %{version}-%{release} -cp /boot/config-kernel-%{version}-%{release}.inc /boot/config-kernel.inc %postun kernel%{?ksuffix} if [ -f /boot/kernel%{armtarget}.img ];then -- 2.43.5