diff --git a/kernel.spec b/kernel.spec index 6e26af04f1530db6ec86f723a889aae7c70c2544..94aea13c80f6514943ba09de509a5237b26141b5 100644 --- a/kernel.spec +++ b/kernel.spec @@ -5,14 +5,13 @@ %global Arch $(echo %{_host_cpu} | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e s/aarch64.*/arm64/) -%global KernelVer %{version}-%{release}.%{_target_cpu} %global debuginfodir /usr/lib/debug %global upstream_version 5.10 %global upstream_sublevel 0 %global devel_release 153 %global maintenance_release .35.0 -%global pkg_release .112 +%global pkg_release .113 %define with_debuginfo 1 # Do not recompute the build-id of vmlinux in find-debuginfo.sh @@ -33,11 +32,15 @@ %define with_64kb %{?_with_64kb: 1} %{?!_with_64kb: 0} %if %{with_64kb} %global package64kb -64kb +%global kv_suffix +64kb +%define with_kabichk 0 %endif %else %define with_64kb 0 %endif +%global KernelVer %{version}-%{release}.%{_target_cpu}%{?kv_suffix} + #default is enabled. You can disable it with --without option %define with_perf %{?_without_perf: 0} %{?!_without_perf: 1} @@ -155,6 +158,7 @@ Requires: perl findutils This package provides kernel headers and makefiles sufficient to build modules against the %{KernelVer} kernel package. +%if !%{with_64kb} %package tools Summary: Assortment of tools for the Linux kernel Provides: %{name}-tools-libs @@ -214,6 +218,7 @@ manipulation of eBPF programs and maps. Summary: the kernel source %description source This package contains vaious source files from the kernel. +%endif %if 0%{?with_debuginfo} %define _debuginfo_template %{nil} @@ -231,6 +236,10 @@ Debug information is useful when developing applications that use this\ package or when debugging this package.\ %{nil} +%if %{with_64kb} +%debuginfo_template -n kernel-64kb +%files -n kernel-64kb-debuginfo -f debugfiles.list +%else %debuginfo_template -n kernel %files -n kernel-debuginfo -f debugfiles.list @@ -258,7 +267,8 @@ package or when debugging this package.\ %{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{python3_sitearch}/perf.*(.debug)?|XXX' -o python3-perf-debugfiles.list} #with_perf %endif - +#with_64kb +%endif %endif %prep @@ -329,7 +339,7 @@ cp -a tools/perf tools/python3-perf %build cd linux-%{KernelVer} -perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.%{_target_cpu}/" Makefile +perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.%{_target_cpu}%{?kv_suffix}/" Makefile ## make linux make mrproper %{_smp_mflags} @@ -443,6 +453,7 @@ make BPFTOOL=../../tools/bpf/bpftool/bpftool popd %install +%if !%{with_64kb} %if 0%{?with_source} %define _python_bytecompile_errors_terminate_build 0 mkdir -p $RPM_BUILD_ROOT/usr/src/ @@ -450,6 +461,7 @@ popd cp linux-%{KernelVer}/.config $RPM_BUILD_ROOT/usr/src/linux-%{KernelVer}/ cp linux-%{KernelVer}/.scmversion $RPM_BUILD_ROOT/usr/src/linux-%{KernelVer}/ %endif +%endif cd linux-%{KernelVer} @@ -641,6 +653,7 @@ popd ## install tools +%if !%{with_64kb} %if %{with_perf} # perf # perf tool binary and supporting scripts/binaries @@ -722,6 +735,7 @@ popd pushd tools/netacc make INSTALL_ROOT=%{buildroot} install popd +%endif %define __spec_install_post\ %{?__debug_package:%{__debug_install_post}}\ @@ -778,6 +792,7 @@ then done) fi +%if !%{with_64kb} %post -n %{name}-tools /sbin/ldconfig %systemd_post cpupower.service @@ -788,6 +803,7 @@ fi %postun -n %{name}-tools /sbin/ldconfig %systemd_postun cpupower.service +%endif %files %defattr (-, root, root) @@ -820,6 +836,7 @@ fi %defattr (-, root, root) /usr/include/* +%if !%{with_64kb} %if %{with_perf} %files -n perf %{_bindir}/perf @@ -909,7 +926,13 @@ fi /usr/src/linux-%{KernelVer}/.scmversion %endif +#with_64kb +%endif + %changelog +* Wed Dec 06 2023 zhaoxiaoqiang11 - 5.10.0-153.35.0.113 +- adapt spec for arm64 64kb page build + * Tue Dec 05 2023 Jialin Zhang - 5.10.0-153.35.0.112 - !3195 [sync] PR-3128: fix ksmbd to release the ones allocated for async work - !3003 [sync] PR-1656: Revert "arm64/mpam: Fix mpam corrupt when cpu online"