diff --git a/config.yaml b/config.yaml index a6a4a5e..8371b70 100644 --- a/config.yaml +++ b/config.yaml @@ -229,6 +229,7 @@ actions: # PPC64le KVM support config Source10001: kernel-ppc64le-kvm-rhel.config + Source10002: kernel-ppc64le-kvm-debug-rhel.config count: 1 - target: "spec" find: | @@ -263,6 +264,21 @@ actions: The kernel package contains a variant of the PPC64le Linux kernel with KVM support. %endif + + %if %{with_ppc_kvm} && %{with_debug} + %define variant_summary The Linux kernel compiled with extra debugging enabled + %if !%{debugbuildsenabled} + %kernel_variant_package -m kvm-debug + %else + %kernel_variant_package kvm-debug + %endif + %description kvm-debug-core + The debug kernel package contains a variant of the PPC64le Linux kernel with + KVM support. + 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 count: 1 - target: "spec" find: | @@ -276,6 +292,9 @@ actions: %if %{with_ppc_kvm} git apply $RPM_SOURCE_DIR/ppc64le-kvm-support.patch + %if %{with_debug} + BuildKernel %make_target %kernel_image %{_use_vdso} kvm-debug + %endif BuildKernel %make_target %kernel_image %{_use_vdso} kvm %endif count: 1 @@ -297,6 +316,9 @@ actions: if [ "%{with_ppc_kvm}" -ne "0" ]; then \ %{modsign_cmd} certs/signing_key.pem.sign+kvm certs/signing_key.x509.sign+kvm $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+kvm/ \ fi \ + if [ "%{with_ppc_kvm}" -ne "0" ] && [ "%{with_debug}" -ne "0" ]; then \ + %{modsign_cmd} certs/signing_key.pem.sign+kvm-debug certs/signing_key.x509.sign+kvm-debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+kvm-debug/ \ + fi \ count: 1 - target: "spec" find: | @@ -314,13 +336,65 @@ actions: %kernel_variant_preun -v kvm %kernel_variant_post -v kvm %endif + + %if %{with_ppc_kvm} && %{with_debug} + %kernel_variant_preun -v kvm-debug + %kernel_variant_post -v kvm-debug + %endif + count: 1 + - target: "spec" + find: | + %if %{with_debug_meta} + %files debug + %files debug-core + %files debug-devel + %files debug-devel-matched + %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 + replace: | + %if %{with_debug_meta} + %files debug + %files debug-core + %files debug-devel + %files debug-devel-matched + %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 + %if %{with_ppc_kvm} + %files kvm-debug + %files kvm-debug-core + %files kvm-debug-devel + %files kvm-debug-devel-matched + %files kvm-debug-modules + %files kvm-debug-modules-extra + %endif count: 1 - target: "spec" find: | %kernel_variant_files %{_use_vdso} %{with_arm64_64k} 64k replace: | %kernel_variant_files %{_use_vdso} %{with_arm64_64k} 64k + %if %{with_ppc_kvm} %kernel_variant_files %{_use_vdso} %{with_ppc_kvm} kvm + %kernel_variant_files %{_use_vdso} %{with_debug} kvm-debug + %endif count: 1 - delete_line: diff --git a/scripts/copy_ppc64le_config.sh b/scripts/copy_ppc64le_config.sh index 71d7ce6..ef0d600 100644 --- a/scripts/copy_ppc64le_config.sh +++ b/scripts/copy_ppc64le_config.sh @@ -1,2 +1,3 @@ cp SOURCES/kernel-ppc64le-rhel.config SOURCES/kernel-ppc64le-kvm-rhel.config -sed -i 's|# CONFIG_KVM_BOOK3S_64 is not set|CONFIG_KVM_BOOK3S_64=m\nCONFIG_KVM_BOOK3S_64_HV=m\n# CONFIG_KVM_BOOK3S_64_PR is not set\n# CONFIG_KVM_BOOK3S_HV_EXIT_TIMING is not set\nCONFIG_KVM_BOOK3S_PR_POSSIBLE=y\nCONFIG_KVM_XICS=y|g' SOURCES/kernel-ppc64le-kvm-rhel.config +cp SOURCES/kernel-ppc64le-debug-rhel.config SOURCES/kernel-ppc64le-kvm-debug-rhel.config +sed -i "" 's|# CONFIG_KVM_BOOK3S_64 is not set|CONFIG_KVM_BOOK3S_64=m\nCONFIG_KVM_BOOK3S_64_HV=m\n# CONFIG_KVM_BOOK3S_64_PR is not set\n# CONFIG_KVM_BOOK3S_HV_EXIT_TIMING is not set\nCONFIG_KVM_BOOK3S_PR_POSSIBLE=y\nCONFIG_KVM_XICS=y|g' SOURCES/kernel-ppc64le-kvm*-rhel.config