From 050b53f02a2765f555a24235f37e28714e9a19ed Mon Sep 17 00:00:00 2001 From: ebasov Date: Thu, 26 Dec 2024 16:26:44 +0300 Subject: [PATCH] Fix load kernel --- SPECS/kernel-6.1.spec | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/SPECS/kernel-6.1.spec b/SPECS/kernel-6.1.spec index 0a4cf91..ccab012 100644 --- a/SPECS/kernel-6.1.spec +++ b/SPECS/kernel-6.1.spec @@ -1,5 +1,5 @@ # All global changes to build and install should follow this line. -%define patchlevel 14 +%define patchlevel 1 # Disable LTO in userspace packages. %global _lto_cflags %{nil} @@ -711,7 +711,7 @@ BuildKernel() { fi if [ -n "$Variant" ]; then - ln -s $(pwd) ../linux-%{KVERREL}-${Variant} + cp -R %{_builddir}/%{name}-%{version}/linux-%{KVERREL} ../linux-%{KVERREL}-${Variant} fi echo "continuing build in: $(pwd)" pushd ../linux-%{KVERREL}${Variant:+-${Variant}} @@ -812,6 +812,10 @@ BuildKernel() { # We'll get it from the linux-firmware package and we don't want conflicts. %{make} %{?_smp_mflags} ARCH=%{bldarch} INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw= + ls $RPM_BUILD_ROOT/ + find $RPM_BUILD_ROOT/ -name dm_mod.ko -type f -print + + # Add a noop %%defattr statement because rpm doesn't like empty file list files. echo '%%defattr(-,-,-)' > ../%{name}${Variant:+-${Variant}}-ldsoconf.list @@ -1052,7 +1056,8 @@ BuildKernel() { # Don't include anything going into kernel-lt-modules-extra in the file lists. xargs rm -fr < mod-extra.list - + + find lib/modules/$KernelVer/kernel -name *.ko -type f | sort -n > modules.list cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} @@ -1106,6 +1111,7 @@ BuildKernel() { # Cleanup. rm -f System.map cp -r restore/* lib/modules/$KernelVer/ + rm -fr restore popd > /dev/null @@ -1257,12 +1263,12 @@ popd > /dev/null %install -%define __modsign_install_post \ -if [ "%{signmodules}" -eq "1" ]; then \ - if [ "%{with_std}" -ne "0" ]; then \ - %{SOURCE21} linux-%{version}-%{release}.%{_build_arch}/certs/signing_key.pem.sign${Variant:++${Variant}} linux-%{version}-%{release}.%{_build_arch}/certs/signing_key.x509.sign${Variant:++${Variant}} $RPM_BUILD_ROOT${Variant:++${Variant}}/lib/modules/%{KVERREL}/ \ - fi \ -fi \ +#%define __modsign_install_post \ +#if [ "%{signmodules}" -eq "1" ]; then \ +# if [ "%{with_std}" -ne "0" ]; then \ +# %{SOURCE21} linux-%{version}-%{release}.%{_build_arch}/certs/signing_key.pem.sign${Variant:++${Variant}} linux-%{version}-%{release}.%{_build_arch}/certs/signing_key.x509.sign${Variant:++${Variant}} $RPM_BUILD_ROOT${Variant:++${Variant}}/lib/modules/%{KVERREL}/ \ +# fi \ +#fi \ if [ "%{zipmodules}" -eq "1" ]; then \ find $RPM_BUILD_ROOT/lib/modules/ -name '*.ko' -type f | xargs --no-run-if-empty -P%{zcpu} xz \ fi \ @@ -1518,10 +1524,14 @@ fi\ %ifarch x86_64 %kernel_lt_variant_preun kasan +%kernel_lt_variant_post -v kasan %kernel_lt_variant_preun kmsan +%kernel_lt_variant_post -v kmsan %kernel_lt_variant_preun kmemleak +%kernel_lt_variant_post -v kmemleak + %endif if [ -x /sbin/ldconfig ]