Created attachment 871099 [details] config-powerpc64le The following changes allow for the kernel to build and work for ppc64le. This will consist of four changes: 1. Makefile.conf 2. kernel.spec 3. addition of config-powerpc64le 4. ppc64le_module_fix.patch Please consider incorporating them in rawhide: diff --git a/Makefile.config b/Makefile.config index 806c567..371c85a 100644 --- a/Makefile.config +++ b/Makefile.config @@ -12,7 +12,8 @@ CONFIGFILES = \ $(CFG)-armv7hl.config $(CFG)-armv7hl-lpae.config \ $(CFG)-aarch64.config \ $(CFG)-ppc.config $(CFG)-ppc-smp.config \ - $(CFG)-ppc64.config $(CFG)-ppc64p7.config $(CFG)-ppc64-debug.config + $(CFG)-ppc64.config $(CFG)-ppc64p7.config $(CFG)-ppc64-debug.config \ + $(CFG)-ppc64le.config PLATFORMS = x86 x86_64 powerpc powerpc32 powerpc64 s390x arm arm64 TEMPFILES = $(addprefix temp-, $(addsuffix -generic, $(PLATFORMS))) @@ -86,6 +87,9 @@ temp-powerpc32-generic: config-powerpc32-generic temp-powerpc-generic temp-powerpc64-generic: config-powerpc64 temp-powerpc-generic perl merge.pl $^ > $@ +temp-powerpc64le-generic: config-powerpc64le temp-powerpc64-generic + perl merge.pl $^ > $@ + temp-s390-generic: config-s390x temp-generic perl merge.pl $^ > $@ @@ -116,6 +120,12 @@ $(CFG)-ppc64-debug.config: temp-powerpc64-generic temp-powerpc-debug-generic $(CFG)-ppc64p7.config: config-powerpc64p7 temp-powerpc64-generic perl merge.pl $^ powerpc > $@ +$(CFG)-ppc64le.config: /dev/null temp-powerpc64le-generic + perl merge.pl $^ powerpc > $@ + +temp-powerpc64le-generic: config-powerpc64le temp-powerpc64-generic + perl merge.pl $^ > $@ + $(CFG)-s390x.config: config-s390x temp-s390-generic perl merge.pl $^ s390 > $@ diff --git a/kernel.spec b/kernel.spec index a9ecc44..80e720f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -222,7 +222,7 @@ Summary: The Linux kernel %if %{with_vdso_install} # These arches install vdso/ directories. -%define vdso_arches %{all_x86} x86_64 ppc ppc64 ppc64p7 s390 s390x aarch64 +%define vdso_arches %{all_x86} x86_64 ppc ppc64 ppc64p7 s390 s390x aarch64 ppc64le %endif # Overrides for generic default options @@ -252,7 +252,7 @@ Summary: The Linux kernel %endif # sparse blows up on ppc64 and sparc64 -%ifarch ppc64 ppc ppc64p7 +%ifarch ppc64 ppc ppc64p7 ppc64le %define with_sparse 0 %endif @@ -284,6 +284,17 @@ Summary: The Linux kernel %define kernel_image_elf 1 %endif +%ifarch ppc64le +%define asmarch powerpc +%define hdrarch powerpc +%define all_arch_configs kernel-%{version}-ppc64le.config +%define image_install_path boot +%define make_target vmlinux +%define kernel_image vmlinux +%define kernel_image_elf 1 +%define with_tools 0 +%endif + %ifarch s390x %define asmarch s390 %define hdrarch s390 @@ -365,7 +376,7 @@ Summary: The Linux kernel %endif # Architectures we build tools/cpupower on -%define cpupowerarchs %{ix86} x86_64 ppc ppc64 ppc64p7 %{arm} aarch64 +%define cpupowerarchs %{ix86} x86_64 ppc ppc64 ppc64p7 %{arm} aarch64 ppc64le # # Packages that need to be installed before the kernel is, because the %%post @@ -406,7 +417,7 @@ Version: %{rpmversion} Release: %{pkg_release} # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD. # SET %%nobuildarches (ABOVE) INSTEAD -ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ppc64p7 s390 s390x %{arm} aarch64 +ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ppc64p7 s390 s390x %{arm} aarch64 ppc64le ExclusiveOS: Linux %kernel_reqprovconf @@ -473,6 +484,7 @@ Source51: config-powerpc32-generic Source52: config-powerpc32-smp Source53: config-powerpc64 Source54: config-powerpc64p7 +Source55: config-powerpc64le Source70: config-s390x @@ -634,6 +646,9 @@ Patch25203: dma-debug-account-for-cachelines-and-read-only-mappings.patch #CVE-2014-0102 rhbz 1071396 Patch25026: keyring-fix.patch +#Fixes module loading on ppc64le +Patch29999: ppc64le_module_fix.patch + # END OF PATCH DEFINITIONS %endif @@ -1287,6 +1302,9 @@ ApplyPatch dma-debug-account-for-cachelines-and-read-only-mappings.patch #CVE-2014-0102 rhbz 1071396 ApplyPatch keyring-fix.patch +# Fixes module loading on ppc64le +ApplyPatch ppc64le_module_fix.patch + # END OF PATCH APPLICATIONS %endif
Created attachment 871100 [details] ppc64le_module_fix.patch
I'll try and look at this today.
The Makefile.config patch added temp-powerpc64le-generic twice. I removed the second one.