[OS-BUILD PATCHv12 7/13] arm64-64k: Add new kernel variant to RHEL9/CS9 for 64K page-size'd ARM64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Donald Dutile <ddutile@xxxxxxxxxx>

arm64-64k: Add new kernel variant to RHEL9/CS9 for 64K page-size'd ARM64

Modifications to spec file generation files for arm64 64K pagesize kernel;
add 64k variant CONFIG files.

Modelled after expected changes for RT variant in RHEL-9.3.
Added lua macro to kernel.spec.template that was provided
by kmaint team (Herton), and tested in updated RT variant MR
for 9.3.

Todo: Update ARK kernel so upstream-based kernel comparisons can be done.

Testing:
1) Simple boot testing on Ampere-based, Mt. Snow server
2) Forced crash dump via sysfs to ensure kexec, kdump & crash
all work.
3) Compared .config files btwn -64k and existing (-4k) aarch64
to ensure only page-size-related changes in the configs.
4) Checked build.log of brew'd kernel rpms to verify
signature file usage for each respective kernel variant:
std, -debug, -64k, -64k-debug.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2153073
Upstream Status: RHEL only

Signed-off-by: Donald Dutile <ddutile@xxxxxxxxxx>
Signed-off-by: Clark Williams <williams@xxxxxxxxxx>

diff --git a/redhat/configs/common/debug/arm/aarch64/64k/README b/redhat/configs/common/debug/arm/aarch64/64k/README
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/debug/arm/aarch64/64k/README
diff --git a/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_4K_PAGES b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_4K_PAGES
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_4K_PAGES
@@ -0,0 +1 @@
+# CONFIG_ARM64_4K_PAGES is not set
diff --git a/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_64K_PAGES b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_64K_PAGES
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_64K_PAGES
@@ -0,0 +1 @@
+CONFIG_ARM64_64K_PAGES=y
diff --git a/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_48 b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_48
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_48
@@ -0,0 +1 @@
+# CONFIG_ARM64_PA_BITS_48 is not set
diff --git a/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_52 b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_52
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_52
@@ -0,0 +1 @@
+CONFIG_ARM64_PA_BITS_52=y
diff --git a/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_42 b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_42
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_42
@@ -0,0 +1 @@
+# CONFIG_ARM64_VA_BITS_42 is not set
diff --git a/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_48 b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_48
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_48
@@ -0,0 +1 @@
+CONFIG_ARM64_VA_BITS_48=y
diff --git a/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_52 b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_52
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_52
@@ -0,0 +1 @@
+# CONFIG_ARM64_VA_BITS_52 is not set
diff --git a/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_FORCE_MAX_ZONEORDER b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_FORCE_MAX_ZONEORDER
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/arm/aarch64/64k/CONFIG_FORCE_MAX_ZONEORDER
@@ -0,0 +1,3 @@
+# This relies on an out of tree patch to arch/arm64/Kconfig
+# Otherwise, we would be stuck with a default of 11
+CONFIG_FORCE_MAX_ZONEORDER=14
diff --git a/redhat/configs/priority.common b/redhat/configs/priority.common
index blahblah..blahblah 100644
--- a/redhat/configs/priority.common
+++ b/redhat/configs/priority.common
@@ -17,6 +17,7 @@ s390x-zfcpdump=generic:generic-s390x:generic-s390x-zfcpdump
 # aarch64
 aarch64=generic:generic-arm:generic-arm-aarch64
 aarch64-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm-aarch64
+aarch64-64k-debug=generic:generic-arm:generic-arm-aarch64:generic-arm-aarch64-64k:debug:debug-arm-aarch64:debug-arm-aarch64-64k
 
 # arm
 armv7hl=generic:generic-arm:generic-arm-armv7:generic-arm-armv7-armv7
diff --git a/redhat/configs/priority.rhel b/redhat/configs/priority.rhel
index blahblah..blahblah 100644
--- a/redhat/configs/priority.rhel
+++ b/redhat/configs/priority.rhel
@@ -24,7 +24,7 @@ x86_64=generic:generic-x86
 x86_64-debug=generic:generic-x86:debug:debug-x86
 x86_64-kgcov=generic:generic-x86:kgcov
 x86_64-rt=generic:generic-x86:rt-generic:rt-generic-x86
-x86_64-rt_debug=generic:generic-x86:debug:debug-x86:rt-generic:rt-generic-x86:rt-debug:rt-debug-x86
+x86_64-rt-debug=generic:generic-x86:debug:debug-x86:rt-generic:rt-generic-x86:rt-debug:rt-debug-x86
 
 # ppc64le
 ppc64le=generic:generic-powerpc
@@ -41,5 +41,7 @@ s390x-kgcov=generic:generic-s390x:kgcov
 aarch64=generic:generic-arm:generic-arm-aarch64
 aarch64-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm:debug-arm-aarch64
 aarch64-kgcov=generic:generic-arm:generic-arm-aarch64:kgcov
+aarch64-64k=generic:generic-arm:generic-arm-aarch64:generic-arm-aarch64-64k
+aarch64-64k-debug=generic:generic-arm:generic-arm-aarch64:generic-arm-aarch64-64k:debug:debug-arm-aarch64:debug-arm-aarch64-64k
 aarch64-rt=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64
-aarch64-rt_debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm:debug-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64:rt-debug:rt-debug-arm:rt-debug-arm-aarch64
+aarch64-rt-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm:debug-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64:rt-debug:rt-debug-arm:rt-debug-arm-aarch64
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -66,6 +66,30 @@
 # will not see them.
 %global __spec_install_pre %{___build_pre}
 
+# Replace '-' with '_' where needed so that variants can use '-' in
+# their name.
+%define uname_suffix %{lua:
+	local flavour = rpm.expand('%{?1:+%{1}}')
+	flavour = flavour:gsub('-', '_')
+	if flavour ~= '' then
+		print(flavour)
+	end
+}
+
+# This returns the main kernel tied to a debug variant. For example,
+# kernel-debug is the debug version of kernel, so we return an empty
+# string. However, kernel-64k-debug is the debug version of kernel-64k,
+# in this case we need to return "64k", and so on. This is used in
+# macros below where we need this for some uname based requires.
+%define uname_variant %{lua:
+	local flavour = rpm.expand('%{?1:%{1}}')
+	_, _, main, sub = flavour:find("(%w+)-(.*)")
+	if main then
+		print("+" .. main)
+	end
+}
+
+
 # At the time of this writing (2019-03), RHEL8 packages use w2.xzdio
 # compression for rpms (xz, level 2).
 # Kernel has several large (hundreds of mbytes) rpms, they take ~5 mins
@@ -186,6 +210,10 @@ Summary: The Linux kernel
 %define with_debug     %{?_without_debug:     0} %{?!_without_debug:     1}
 # kernel-zfcpdump (s390 specific kernel for zfcpdump)
 %define with_zfcpdump  %{?_without_zfcpdump:  0} %{?!_without_zfcpdump:  1}
+# kernel-64k (aarch64 kernel with 64K page_size)
+%define with_arm64_64k %{?_without_arm64_64k: 0} %{?!_without_arm64_64k: 1}
+# kernel-rt (x86_64 and aarch64 only PREEMPT_RT enabled kernel)
+%define with_realtime  %{?_without_realtime:  1} %{?!_without_realtime:  0}
 # kernel-doc
 %define with_doc       %{?_without_doc:       0} %{?!_without_doc:       1}
 # kernel-headers
@@ -256,11 +284,6 @@ Summary: The Linux kernel
 # Want to build a vanilla kernel build without any non-upstream patches?
 %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
 
-# special purpose variants
-
-# RHEL real-time kernel (PREEMPT_RT)
-%define with_realtime %{?_without_realtime: 1} %{?!_without_realtime: 0}
-
 %ifarch x86_64
 %define with_efiuki %{?_without_efiuki: 0} %{?!_without_efiuki: 1}
 %else
@@ -283,6 +306,7 @@ Summary: The Linux kernel
 %define with_selftests 0
 # No realtime fedora variants
 %define with_realtime 0
+%define with_arm64_64k 0
 %endif
 
 %if %{with_verbose}
@@ -485,6 +509,11 @@ Summary: The Linux kernel
 %define with_zfcpdump 0
 %endif
 
+# 64k variant only for aarch64
+%ifnarch aarch64
+%define with_arm64_64k 0
+%endif
+
 %if 0%{?fedora}
 # This is not for Fedora
 %define with_zfcpdump 0
@@ -575,6 +604,7 @@ Summary: The Linux kernel
 %define with_debug 0
 %define with_pae 0
 %define with_zfcpdump 0
+%define with_arm64_64k 0
 %define with_realtime 0
 
 %define with_debuginfo 0
@@ -878,6 +908,10 @@ Source39: filter-s390x.sh.rhel
 Source40: filter-modules.sh.rhel
 
 Source41: x509.genkey.centos
+# ARM64 64K page-size kernel config
+Source42: %{name}-aarch64-64k-rhel.config
+Source43: %{name}-aarch64-64k-debug-rhel.config
+
 %endif
 
 %if 0%{?include_fedora}
@@ -942,9 +976,9 @@ Source400: mod-kvm.list
 %if %{include_rt}
 # realtime config files
 Source474: %{name}-aarch64-rt-rhel.config
-Source475: %{name}-aarch64-rt_debug-rhel.config
+Source475: %{name}-aarch64-rt-debug-rhel.config
 Source476: %{name}-x86_64-rt-rhel.config
-Source477: %{name}-x86_64-rt_debug-rhel.config
+Source477: %{name}-x86_64-rt-debug-rhel.config
 %endif
 
 # Sources for kernel-tools
@@ -988,9 +1022,9 @@ The kernel meta package
 %if %{-o:0}%{!-o:1}\
 Provides: kernel = %{specversion}-%{pkg_release}\
 %endif\
-Provides: kernel-%{_target_cpu} = %{specrpmversion}-%{pkg_release}%{?1:+%{1}}\
-Provides: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel-%{_target_cpu} = %{specrpmversion}-%{pkg_release}%{uname_suffix %{?1:+%{1}}}\
+Provides: kernel-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 Requires(pre): %{kernel_prereq}\
 Requires(pre): %{initrd_prereq}\
 Requires(pre): ((linux-firmware >= 20150904-56.git6ebf5d57) if linux-firmware)\
@@ -1292,8 +1326,8 @@ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\
 %package %{?1:%{1}-}devel\
 Summary: Development package for building kernel modules to match the %{?2:%{2} }kernel\
 Provides: kernel%{?1:-%{1}}-devel-%{_target_cpu} = %{specrpmversion}-%{release}\
-Provides: kernel-devel-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\
-Provides: kernel-devel-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel-devel-%{_target_cpu} = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
+Provides: kernel-devel-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 Provides: installonlypkg(kernel)\
 AutoReqProv: no\
 Requires(pre): findutils\
@@ -1306,7 +1340,7 @@ Requires: flex\
 Requires: make\
 Requires: gcc\
 %if %{-m:1}%{!-m:0}\
-Requires: kernel-devel-uname-r = %{KVERREL}\
+Requires: kernel-devel-uname-r = %{KVERREL}%{uname_variant %{?1:%{1}}}\
 %endif\
 %description %{?1:%{1}-}devel\
 This package provides kernel headers and makefiles sufficient to build modules\
@@ -1348,13 +1382,13 @@ This package provides *.ipa-clones files.\
 Summary: Extra kernel modules to match the %{?2:%{2} }kernel\
 Group: System Environment/Kernel\
 Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{specrpmversion}-%{release}\
-Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\
-Provides: kernel%{?1:-%{1}}-modules-internal = %{specrpmversion}-%{release}%{?1:+%{1}}\
+Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
+Provides: kernel%{?1:-%{1}}-modules-internal = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
 Provides: installonlypkg(kernel-module)\
-Provides: kernel%{?1:-%{1}}-modules-internal-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel%{?1:-%{1}}-modules-internal-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 AutoReq: no\
 AutoProv: yes\
 %description %{?1:%{1}-}modules-internal\
@@ -1369,15 +1403,15 @@ This package provides kernel modules for the %{?2:%{2} }kernel package for Red H
 %package %{?1:%{1}-}modules-extra\
 Summary: Extra kernel modules to match the %{?2:%{2} }kernel\
 Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{specrpmversion}-%{release}\
-Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\
-Provides: kernel%{?1:-%{1}}-modules-extra = %{specrpmversion}-%{release}%{?1:+%{1}}\
+Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
+Provides: kernel%{?1:-%{1}}-modules-extra = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
 Provides: installonlypkg(kernel-module)\
-Provides: kernel%{?1:-%{1}}-modules-extra-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel%{?1:-%{1}}-modules-extra-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 %if %{-m:1}%{!-m:0}\
-Requires: kernel-modules-extra-uname-r = %{KVERREL}\
+Requires: kernel-modules-extra-uname-r = %{KVERREL}%{uname_variant %{?1:+%{1}}}\
 %endif\
 AutoReq: no\
 AutoProv: yes\
@@ -1393,14 +1427,14 @@ This package provides less commonly used kernel modules for the %{?2:%{2} }kerne
 %package %{?1:%{1}-}modules\
 Summary: kernel modules to match the %{?2:%{2}-}core kernel\
 Provides: kernel%{?1:-%{1}}-modules-%{_target_cpu} = %{specrpmversion}-%{release}\
-Provides: kernel-modules-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\
-Provides: kernel-modules = %{specrpmversion}-%{release}%{?1:+%{1}}\
+Provides: kernel-modules-%{_target_cpu} = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
+Provides: kernel-modules = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
 Provides: installonlypkg(kernel-module)\
-Provides: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 %if %{-m:1}%{!-m:0}\
-Requires: kernel-modules-uname-r = %{KVERREL}\
+Requires: kernel-modules-uname-r = %{KVERREL}%{uname_variant %{?1:+%{1}}}\
 %endif\
 AutoReq: no\
 AutoProv: yes\
@@ -1416,13 +1450,13 @@ This package provides commonly used kernel modules for the %{?2:%{2}-}core kerne
 %package %{?1:%{1}-}modules-core\
 Summary: Core kernel modules to match the %{?2:%{2}-}core kernel\
 Provides: kernel%{?1:-%{1}}-modules-core-%{_target_cpu} = %{specrpmversion}-%{release}\
-Provides: kernel-modules-core-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\
-Provides: kernel-modules-core = %{specrpmversion}-%{release}%{?1:+%{1}}\
+Provides: kernel-modules-core-%{_target_cpu} = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
+Provides: kernel-modules-core = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
 Provides: installonlypkg(kernel-module)\
-Provides: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 %if %{-m:1}%{!-m:0}\
-Requires: kernel-modules-core-uname-r = %{KVERREL}\
+Requires: kernel-modules-core-uname-r = %{KVERREL}%{uname_variant %{?1:+%{1}}}\
 %endif\
 AutoReq: no\
 AutoProv: yes\
@@ -1437,10 +1471,10 @@ This package provides essential kernel modules for the %{?2:%{2}-}core kernel pa
 %define kernel_meta_package() \
 %package %{1}\
 summary: kernel meta-package for the %{1} kernel\
-Requires: kernel-%{1}-core-uname-r = %{KVERREL}+%{1}\
-Requires: kernel-%{1}-modules-uname-r = %{KVERREL}+%{1}\
-Requires: kernel-%{1}-modules-core-uname-r = %{KVERREL}+%{1}\
-%if "%{1}" == "rt" || "%{1}" == "rt_debug"\
+Requires: kernel-%{1}-core-uname-r = %{KVERREL}+%{uname_suffix %{1}}\
+Requires: kernel-%{1}-modules-uname-r = %{KVERREL}+%{uname_suffix %{1}}\
+Requires: kernel-%{1}-modules-core-uname-r = %{KVERREL}+%{uname_suffix %{1}}\
+%if "%{1}" == "rt" || "%{1}" == "rt-debug"\
 Requires: realtime-setup\
 %endif\
 Provides: installonlypkg(kernel)\
@@ -1474,11 +1508,11 @@ This package provides KVM modules for package kernel%{?1:-%{1}}.\
 %define kernel_variant_package(n:mo) \
 %package %{?1:%{1}-}core\
 Summary: %{variant_summary}\
-Provides: kernel-%{?1:%{1}-}core-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel-%{?1:%{1}-}core-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 Provides: installonlypkg(kernel)\
 %if %{-m:1}%{!-m:0}\
-Requires: kernel-core-uname-r = %{KVERREL}\
-Requires: kernel-%{?1:%{1}-}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
+Requires: kernel-core-uname-r = %{KVERREL}%{uname_variant %{?1:+%{1}}}\
+Requires: kernel-%{?1:%{1}-}-modules-core-uname-r = %{KVERREL}%{uname_variant %{?1:+%{1}}}\
 %endif\
 %{expand:%%kernel_reqprovconf %{?1:%{1}} %{-o:%{-o}}}\
 %if %{?1:1} %{!?1:0} \
@@ -1496,15 +1530,15 @@ Requires: kernel-%{?1:%{1}-}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
 %endif\
 %{expand:%%kernel_debuginfo_package %{?1:%{1}}}\
 %endif\
-%if "%{1}" == "rt" || "%{1}" == "rt_debug"\
+%if "%{1}" == "rt" || "%{1}" == "rt-debug"\
 %{expand:%%kernel_kvm_package %{?1:%{1}}} %{!?{-n}:%{1}}%{?{-n}:%{-n*}}}\
 %endif \
 %if %{with_efiuki}\
 %package %{?1:%{1}-}uki-virt\
 Summary: %{variant_summary} unified kernel image for virtual machines\
 Provides: installonlypkg(kernel)\
-Provides: kernel-%{?1:%{1}-}uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel-%{?1:%{1}-}uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 %endif\
 %if %{with_gcov}\
 %{expand:%%kernel_gcov_package %{?1:%{1}}}\
@@ -1520,13 +1554,13 @@ Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
 Summary: Extra kernel modules to match the %{?2:%{2} }kernel\
 Group: System Environment/Kernel\
 Provides: kernel%{?1:-%{1}}-modules-partner-%{_target_cpu} = %{specrpmversion}-%{release}\
-Provides: kernel%{?1:-%{1}}-modules-partner-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\
-Provides: kernel%{?1:-%{1}}-modules-partner = %{specrpmversion}-%{release}%{?1:+%{1}}\
+Provides: kernel%{?1:-%{1}}-modules-partner-%{_target_cpu} = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
+Provides: kernel%{?1:-%{1}}-modules-partner = %{specrpmversion}-%{release}%{uname_suffix %{?1:+%{1}}}\
 Provides: installonlypkg(kernel-module)\
-Provides: kernel%{?1:-%{1}}-modules-partner-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?1:+%{1}}\
-Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\
+Provides: kernel%{?1:-%{1}}-modules-partner-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
+Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{uname_suffix %{?1:+%{1}}}\
 AutoReq: no\
 AutoProv: yes\
 %description %{?1:%{1}-}modules-partner\
@@ -1535,14 +1569,6 @@ This package provides kernel modules for the %{?2:%{2} }kernel package for Red H
 
 # Now, each variant package.
 
-%if %{with_realtime}
-%define variant_summary The Linux kernel compiled with PREEMPT_RT
-%kernel_variant_package rt
-%description rt-core
-This package includes a version of the Linux kernel compiled with the
-PREEMPT_RT real-time preemption support
-%endif
-
 %if %{with_pae}
 %define variant_summary The Linux kernel compiled for Cortex-A15
 %kernel_variant_package lpae
@@ -1560,13 +1586,33 @@ zfcpdump infrastructure.
 # with_zfcpdump
 %endif
 
+%if %{with_arm64_64k}
+%define variant_summary The Linux kernel compiled for 64k pagesize usage
+%kernel_variant_package 64k
+%description 64k-core
+The kernel package contains a variant of the ARM64 Linux kernel using
+a 64K page size.
+%endif
+
+%if %{with_arm64_64k} && %{with_debug}
 %define variant_summary The Linux kernel compiled with extra debugging enabled
 %if !%{debugbuildsenabled}
-%kernel_variant_package -m debug
+%kernel_variant_package -m 64k-debug
 %else
-%kernel_variant_package debug
+%kernel_variant_package 64k-debug
 %endif
-%description debug-core
+%description 64k-debug-core
+The debug kernel package contains a variant of the ARM64 Linux kernel using
+a 64K page size.
+This variant of the kernel has numerous debugging options enabled.
+It should only be installed when trying to gather additional information
+on kernel bugs, as some of these options impact performance noticably.
+%endif
+
+%if %{with_debug} && %{with_realtime}
+%define variant_summary The Linux PREEMPT_RT kernel compiled with extra debugging enabled
+%kernel_variant_package rt-debug
+%description rt-debug-core
 The kernel package contains the Linux kernel (vmlinuz), the core of any
 Linux operating system.  The kernel handles the basic functions
 of the operating system:  memory allocation, process allocation, device
@@ -1575,11 +1621,22 @@ input and output, etc.
 This variant of the kernel has numerous debugging options enabled.
 It should only be installed when trying to gather additional information
 on kernel bugs, as some of these options impact performance noticably.
+%endif
 
-%if %{with_debug} && %{with_realtime}
-%define variant_summary The Linux PREEMPT_RT kernel compiled with extra debugging enabled
-%kernel_variant_package rt_debug
-%description rt_debug-core
+%if %{with_realtime}
+%define variant_summary The Linux kernel compiled with PREEMPT_RT enabled
+%kernel_variant_package rt
+%description rt-core
+This package includes a version of the Linux kernel compiled with the
+PREEMPT_RT real-time preemption support
+%endif
+
+%if !%{debugbuildsenabled}
+%kernel_variant_package -m debug
+%else
+%kernel_variant_package debug
+%endif
+%description debug-core
 The kernel package contains the Linux kernel (vmlinuz), the core of any
 Linux operating system.  The kernel handles the basic functions
 of the operating system:  memory allocation, process allocation, device
@@ -1588,7 +1645,6 @@ input and output, etc.
 This variant of the kernel has numerous debugging options enabled.
 It should only be installed when trying to gather additional information
 on kernel bugs, as some of these options impact performance noticably.
-%endif
 
 %if %{with_up}
 # And finally the main -core package
@@ -2345,7 +2401,7 @@ BuildKernel() {
     # Identify modules in the kernel-modules-partner package
     %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE85} partner
 %endif
-    if [[ "$Variant" == "rt" || "$Variant" == "rt_debug" ]]; then
+    if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" ]]; then
     # Identify modules in the kernel-rt-kvm package
         %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE400} kvm
     fi
@@ -2370,7 +2426,7 @@ BuildKernel() {
     # don't include anything going into kernel-modules-partner in the file lists
     xargs rm -rf < mod-partner.list
 %endif
-    if [[ "$Variant" == "rt" || "$Variant" == "rt_debug" ]]; then
+    if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" ]]; then
     	# don't include anything going into kernel-rt-kvm in the file lists
 	xargs rm -rf < mod-kvm.list
     fi
@@ -2467,7 +2523,7 @@ BuildKernel() {
     sed -e 's/^lib*/%dir \/lib/' %{?zipsed} $RPM_BUILD_ROOT/module-dirs.list > ../kernel${Variant:+-${Variant}}-modules-core.list
     sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/modules.list >> ../kernel${Variant:+-${Variant}}-modules-core.list
     sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-extra.list >> ../kernel${Variant:+-${Variant}}-modules-extra.list
-    if [[ "$Variant" == "rt" || "$Variant" == "rt_debug" ]]; then
+    if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" ]]; then
     	sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-kvm.list >> ../kernel${Variant:+-${Variant}}-kvm.list
     fi
 
@@ -2480,7 +2536,7 @@ BuildKernel() {
 %if 0%{!?fedora:1}
     rm -f $RPM_BUILD_ROOT/mod-partner.list
 %endif
-    if [[ "$Variant" == "rt" || "$Variant" == "rt_debug" ]]; then
+    if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" ]]; then
     	rm -f $RPM_BUILD_ROOT/mod-kvm.list
     fi
 
@@ -2564,8 +2620,12 @@ cd linux-%{KVERREL}
 
 %if %{with_debug}
 %if %{with_realtime} && !%{with_dbgonly}
-echo "building rt_debug"
-BuildKernel %make_target %kernel_image %{_use_vdso} rt_debug
+echo "building rt-debug"
+BuildKernel %make_target %kernel_image %{_use_vdso} rt-debug
+%endif
+
+%if %{with_arm64_64k}
+BuildKernel %make_target %kernel_image %{_use_vdso} 64k-debug
 %endif
 
 %if %{with_up}
@@ -2578,20 +2638,24 @@ BuildKernel %make_target %kernel_image %{_use_vdso} debug
 BuildKernel %make_target %kernel_image %{_use_vdso} zfcpdump
 %endif
 
-%if %{with_pae}
-BuildKernel %make_target %kernel_image %{use_vdso} lpae
+%if %{with_arm64_64k}
+BuildKernel %make_target %kernel_image %{_use_vdso} 64k
 %endif
 
-%if %{with_up}
-BuildKernel %make_target %kernel_image %{_use_vdso}
+%if %{with_pae}
+BuildKernel %make_target %kernel_image %{use_vdso} lpae
 %endif
 
 %if %{with_realtime}
 BuildKernel %make_target %kernel_image %{_use_vdso} rt
 %endif
 
+%if %{with_up}
+BuildKernel %make_target %kernel_image %{_use_vdso}
+%endif
+
 %ifnarch noarch i686 %{nobuildarches}
-%if !%{with_debug} && !%{with_zfcpdump} && !%{with_pae} && !%{with_up} && !%{with_realtime}
+%if !%{with_debug} && !%{with_zfcpdump} && !%{with_pae} && !%{with_up} && !%{with_arm64_64k} && !%{with_realtime}
 # If only building the user space tools, then initialize the build environment
 # and some variables so that the various userspace tools can be built.
 InitBuildVars
@@ -2744,11 +2808,14 @@ find Documentation -type d | xargs chmod u+w
     fi \
     if [ "%{with_debug}" -ne "0" ]; then \
       if [ "%{with_realtime}" -ne "0" ]; then \
-        %{modsign_cmd} certs/signing_key.pem.sign+rt_debug certs/signing_key.x509.sign+rt_debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+rt_debug/ \
+        %{modsign_cmd} certs/signing_key.pem.sign+rt-debug certs/signing_key.x509.sign+rt-debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+rt-debug/ \
       fi \
       if [ "%{with_up}" -ne "0" ]; then \
         %{modsign_cmd} certs/signing_key.pem.sign+debug certs/signing_key.x509.sign+debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+debug/ \
       fi \
+      if [ "%{with_arm64_64k}" -ne "0" ]; then \
+        %{modsign_cmd} certs/signing_key.pem.sign+64k-debug certs/signing_key.x509.sign+64k-debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+64k-debug/ \
+      fi \
     fi \
     if [ "%{with_up}" -ne "0" ]; then \
       %{modsign_cmd} certs/signing_key.pem.sign certs/signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \
@@ -3282,6 +3349,11 @@ fi\
 %kernel_variant_post -v lpae -r (kernel|kernel-smp)
 %endif
 
+%if %{with_zfcpdump}
+%kernel_variant_preun zfcpdump
+%kernel_variant_post -v zfcpdump
+%endif
+
 %if %{with_debug}
 %if %{with_efiuki}
 %kernel_uki_virt_scripts debug
@@ -3290,9 +3362,14 @@ fi\
 %kernel_variant_post -v debug
 %endif
 
-%if %{with_zfcpdump}
-%kernel_variant_preun zfcpdump
-%kernel_variant_post -v zfcpdump
+%if %{with_arm64_64k}
+%kernel_variant_preun 64k
+%kernel_variant_post -v 64k
+%endif
+
+%if %{with_debug} && %{with_arm64_64k}
+%kernel_variant_preun 64k-debug
+%kernel_variant_post -v 64k-debug
 %endif
 
 %if %{with_realtime}
@@ -3300,9 +3377,9 @@ fi\
 %kernel_variant_post -v rt -r (kernel|kernel-smp)
 %kernel_kvm_post rt
 %if %{with_debug}
-%kernel_variant_preun rt_debug
-%kernel_variant_post -v rt_debug
-%kernel_kvm_post rt_debug
+%kernel_variant_preun rt-debug
+%kernel_variant_post -v rt-debug
+%kernel_kvm_post rt-debug
 %endif
 %endif
 
@@ -3546,7 +3623,7 @@ fi
 %{expand:%%files %{?3:%{3}-}modules-partner}\
 /lib/modules/%{KVERREL}%{?3:+%{3}}/partner\
 %endif\
-%if "%{3}" == "rt" || "%{3}" == "rt_debug"\
+%if "%{3}" == "rt" || "%{3}" == "rt-debug"\
 %{expand:%%files -f %{name}-%{?3:%{3}-}kvm.list %{?3:%{3}-}kvm}\
 %endif\
 %if %{with_debuginfo}\
@@ -3575,12 +3652,14 @@ fi
 %{nil}
 
 %kernel_variant_files %{_use_vdso} %{with_up}
-%if %{with_debug}
-%if %{with_realtime} && !%{with_dbgonly}
-%kernel_variant_files %{_use_vdso} %{with_debug} rt_debug
-%endif
-%if %{with_up}
 %kernel_variant_files %{_use_vdso} %{with_debug} debug
+%if %{with_arm64_64k}
+%kernel_variant_files %{_use_vdso} %{with_debug} 64k-debug
+%endif
+%kernel_variant_files %{_use_vdso} %{with_realtime} rt
+%if %{with_realtime}
+%kernel_variant_files %{_use_vdso} %{with_debug} rt-debug
+%endif
 %if %{with_debug_meta}
 %files debug
 %files debug-core
@@ -3589,12 +3668,17 @@ fi
 %files debug-modules
 %files debug-modules-core
 %files debug-modules-extra
+%if %{with_arm64_64k}
+%files 64k-debug
+%files 64k-debug-core
+%files 64k-debug-devel
+%files 64k-debug-devel-matched
+%files 64k-debug-modules
+%files 64k-debug-modules-extra
 %endif
 %endif
-%endif
-%kernel_variant_files %{use_vdso} %{with_pae} lpae
 %kernel_variant_files %{_use_vdso} %{with_zfcpdump} zfcpdump
-%kernel_variant_files %{_use_vdso} %{with_realtime} rt
+%kernel_variant_files %{_use_vdso} %{with_arm64_64k} 64k
 
 %define kernel_variant_ipaclones(k:) \
 %if %{1}\

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2403
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux