Sync openEuler-22.03-LTS: Add with_64kb to control 64KB page size

This commit is contained in:
Zheng Zengkai 2022-03-09 21:49:28 +08:00
parent 51f28e250b
commit a76653f078
3 changed files with 28 additions and 15355 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -29,10 +29,19 @@
# failed if there is new config options
%define listnewconfig_fail 0
#defualt is enabled. You can disable it with --without option
%ifarch aarch64
%define with_64kb %{?_with_64kb: 1} %{?!_with_64kb: 0}
%if %{with_64kb}
%global package64kb -64kb
%endif
%else
%define with_64kb 0
%endif
#default is enabled. You can disable it with --without option
%define with_perf %{?_without_perf: 0} %{?!_without_perf: 1}
Name: kernel
Name: kernel%{?package64kb}
Version: %{upstream_version}.%{upstream_sublevel}
Release: %{devel_release}%{?maintenance_release}%{?pkg_release}%{?extra_release}
Summary: Linux Kernel
@ -54,9 +63,6 @@ Source200: mkgrub-menu-aarch64.sh
Source2000: cpupower.service
Source2001: cpupower.config
Source3000: kernel-5.10.0-aarch64.config
Source3001: kernel-5.10.0-x86_64.config
%if 0%{?with_patch}
Source9000: apply-patches
Source9001: guards
@ -155,10 +161,10 @@ and the supporting documentation.
%package tools-devel
Summary: Assortment of tools for the Linux kernel
Requires: kernel-tools = %{version}-%{release}
Requires: kernel-tools-libs = %{version}-%{release}
Provides: kernel-tools-libs-devel = %{version}-%{release}
Obsoletes: kernel-tools-libs-devel
Requires: %{name}-tools = %{version}-%{release}
Requires: %{name}-tools-libs = %{version}-%{release}
Provides: %{name}-tools-libs-devel = %{version}-%{release}
Obsoletes: %{name}-tools-libs-devel
%description tools-devel
This package contains the development files for the tools/ directory from
the kernel source.
@ -314,6 +320,14 @@ perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.%{_target_cpu}/" Mak
## make linux
make mrproper %{_smp_mflags}
%if %{with_64kb}
sed -i arch/arm64/configs/openeuler_defconfig -e 's/^CONFIG_ARM64_4K_PAGES.*/CONFIG_ARM64_64K_PAGES=y/'
sed -i arch/arm64/configs/openeuler_defconfig -e 's/^CONFIG_ARM64_PA_BITS=.*/CONFIG_ARM64_PA_BITS=52/'
sed -i arch/arm64/configs/openeuler_defconfig -e 's/^CONFIG_ARM64_PA_BITS_.*/CONFIG_ARM64_PA_BITS_52=y/'
sed -i arch/arm64/configs/openeuler_defconfig -e 's/^CONFIG_ARM64_VA_BITS=.*/CONFIG_ARM64_VA_BITS=52/'
sed -i arch/arm64/configs/openeuler_defconfig -e 's/^CONFIG_ARM64_VA_BITS_.*/CONFIG_ARM64_VA_BITS_52=y/'
%endif
make ARCH=%{Arch} openeuler_defconfig
TargetImage=$(basename $(make -s image_name))
@ -737,14 +751,14 @@ then
done)
fi
%post -n kernel-tools
%post -n %{name}-tools
/sbin/ldconfig
%systemd_post cpupower.service
%preun -n kernel-tools
%preun -n %{name}-tools
%systemd_preun cpupower.service
%postun -n kernel-tools
%postun -n %{name}-tools
/sbin/ldconfig
%systemd_postun cpupower.service
@ -803,7 +817,7 @@ fi
%{python3_sitearch}/*
%endif
%files -n kernel-tools -f cpupower.lang
%files -n %{name}-tools -f cpupower.lang
%{_bindir}/cpupower
%ifarch %{ix86} x86_64
%{_bindir}/centrino-decode
@ -833,7 +847,7 @@ fi
%{_libdir}/libcpupower.so.0.0.1
%license linux-%{KernelVer}/COPYING
%files -n kernel-tools-devel
%files -n %{name}-tools-devel
%{_libdir}/libcpupower.so
%{_includedir}/cpufreq.h
%{_includedir}/cpuidle.h