diff options
Diffstat (limited to 'kernel.spec')
-rw-r--r-- | kernel.spec | 233 |
1 files changed, 147 insertions, 86 deletions
diff --git a/kernel.spec b/kernel.spec index a25fdf138..cb29994f6 100644 --- a/kernel.spec +++ b/kernel.spec @@ -75,9 +75,9 @@ Summary: The Linux kernel # The next upstream release sublevel (base_sublevel+1) %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%global rcrev 2 +%global rcrev 4 # The git snapshot level -%define gitrev 0 +%define gitrev 1 # Set rpm version accordingly %define rpmversion 4.%{upstream_sublevel}.0 %endif @@ -133,7 +133,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 1 +%define debugbuildsenabled 0 # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_without_vanilla: 0} %{?!_without_vanilla: 1} @@ -231,8 +231,7 @@ Summary: The Linux kernel %define all_x86 i386 i686 %if %{with_vdso_install} -# These arches install vdso/ directories. -%define vdso_arches %{all_x86} x86_64 %{power64} s390x aarch64 +%define use_vdso 1 %endif # Overrides for generic default options @@ -300,6 +299,7 @@ Summary: The Linux kernel %ifarch %{arm} %define all_arch_configs kernel-%{version}-arm*.config +%define skip_nonpae_vdso 1 %define asmarch arm %define hdrarch arm %define pae lpae @@ -361,6 +361,19 @@ Summary: The Linux kernel # Architectures we build tools/cpupower on %define cpupowerarchs %{ix86} x86_64 %{power64} %{arm} aarch64 +%if %{use_vdso} + +%if 0%{?skip_nonpae_vdso} +%define _use_vdso 0 +%else +%define _use_vdso 1 +%endif + +%else +%define _use_vdso 0 +%endif + + # # Packages that need to be installed before the kernel is, because the %%post # scripts use them. @@ -408,7 +421,16 @@ BuildRequires: pciutils-devel gettext ncurses-devel BuildConflicts: rhbuildsys(DiskFree) < 500Mb %if %{with_debuginfo} BuildRequires: rpm-build, elfutils -%define debuginfo_args --strict-build-id -r +BuildConflicts: rpm < 4.13.0.1-19 +# Most of these should be enabled after more investigation +%undefine _include_minidebuginfo +%undefine _find_debuginfo_dwz_opts +%undefine _unique_build_ids +%undefine _unique_debug_names +%undefine _unique_debug_srcs +%global _find_debuginfo_opts -r +%global _missing_build_ids_terminate_build 1 +%global _no_recompute_build_ids 1 %endif %if %{signkernel}%{signmodules} @@ -509,9 +531,6 @@ Source5000: patch-4.%{base_sublevel}-git%{gitrev}.xz ## Patches needed for building this package -# build tweak for build ID magic, even for -vanilla -Patch001: kbuild-AFTER_LINK.patch - ## compile fixes # ongoing complaint, full discussion delayed until ksummit/plumbers @@ -576,11 +595,14 @@ Patch211: drm-i915-hush-check-crtc-state.patch Patch301: qcom-QDF2432-tmp-errata.patch # http://www.spinics.net/lists/linux-tegra/msg26029.html -Patch102: usb-phy-tegra-Add-38.4MHz-clock-table-entry.patch +Patch302: usb-phy-tegra-Add-38.4MHz-clock-table-entry.patch # Fix OMAP4 (pandaboard) Patch303: arm-revert-mmc-omap_hsmmc-Use-dma_request_chan-for-reque.patch +# http://www.spinics.net/lists/arm-kernel/msg582772.html +Patch304: arm-dts-boneblack-wireless-add-WL1835-Bluetooth-device-node.patch + # http://patchwork.ozlabs.org/patch/587554/ Patch305: ARM-tegra-usb-no-reset.patch @@ -599,6 +621,9 @@ Patch311: arm-imx6-hummingboard2.patch Patch312: arm64-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch +Patch313: bcm2835-clk-audio-jitter-issues.patch +Patch314: bcm2835-fix-potential-null-pointer-dereferences.patch + # 400 - IBM (ppc/s390x) patches # 500 - Temp fixes/CVEs etc @@ -706,7 +731,7 @@ This package provides debug information for the perf package. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|XXX' -o perf-debuginfo.list} +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|XXX' -o perf-debuginfo.list} %package -n python-perf Summary: Python bindings for apps which will manipulate perf events @@ -727,7 +752,7 @@ AutoReqProv: no This package provides debug information for the perf python bindings. # the python_sitearch macro should already be defined from above -%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{python_sitearch}/perf.so(\.debug)?|XXX' -o python-perf-debuginfo.list} +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{python_sitearch}/perf.so(\.debug)?|XXX' -o python-perf-debuginfo.list} %endif # with_perf @@ -782,7 +807,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|XXX' -o kernel-tools-debuginfo.list} +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|XXX' -o kernel-tools-debuginfo.list} %endif # with_tools @@ -802,7 +827,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:[+]%{1}}/.*|/.*%%{KVERREL}%{?1:\+%{1}}(\.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '/.*/%%{KVERREL}%{?1:[+]%{1}}/.*|/.*%%{KVERREL}%{?1:\+%{1}}(\.debug)?' -o debuginfo%{?1}.list}\ %{nil} # @@ -1286,18 +1311,6 @@ cd .. %define sparse_mflags C=1 %endif -%if %{with_debuginfo} -# This override tweaks the kernel makefiles so that we run debugedit on an -# object before embedding it. When we later run find-debuginfo.sh, it will -# run debugedit again. The edits it does change the build ID bits embedded -# in the stripped object, but repeating debugedit is a no-op. We do it -# beforehand to get the proper final build ID bits into the embedded image. -# This affects the vDSO images in vmlinux, and the vmlinux image in bzImage. -export AFTER_LINK=\ -'sh -xc "/usr/lib/rpm/debugedit -b $$RPM_BUILD_DIR -d /usr/src/debug \ - -i $@ > $@.id"' -%endif - cp_vmlinux() { eu-strip --remove-comment -o "$2" "$1" @@ -1306,9 +1319,10 @@ cp_vmlinux() BuildKernel() { MakeTarget=$1 KernelImage=$2 - Flavour=$3 + Flavour=$4 + DoVDSO=$3 Flav=${Flavour:++${Flavour}} - InstallName=${4:-vmlinuz} + InstallName=${5:-vmlinuz} # Pick the right config file for the kernel we're building Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config @@ -1406,16 +1420,16 @@ BuildKernel() { # we'll get it from the linux-firmware package and we don't want conflicts %{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw= -%ifarch %{vdso_arches} - %{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer - if [ ! -s ldconfig-kernel.conf ]; then - echo > ldconfig-kernel.conf "\ -# Placeholder file, no vDSO hwcap entries used in this kernel." + if [ $DoVDSO -ne 0 ]; then + %{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer + if [ ! -s ldconfig-kernel.conf ]; then + echo > ldconfig-kernel.conf "\ + # Placeholder file, no vDSO hwcap entries used in this kernel." + fi + %{__install} -D -m 444 ldconfig-kernel.conf \ + $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf + rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/vdso/.build-id fi - %{__install} -D -m 444 ldconfig-kernel.conf \ - $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf - rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/vdso/.build-id -%endif # And save the headers/makefiles etc for building modules against # @@ -1509,12 +1523,8 @@ BuildKernel() { cp $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/config/auto.conf %if %{with_debuginfo} - if test -s vmlinux.id; then - cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id - else - echo >&2 "*** ERROR *** no vmlinux build ID! ***" - exit 1 - fi + eu-readelf -n vmlinux | grep "Build ID" | awk '{print $NF}' > vmlinux.id + cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id # # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm @@ -1650,20 +1660,21 @@ mkdir -p $RPM_BUILD_ROOT%{_libexecdir} cd linux-%{KVERREL} + %if %{with_debug} -BuildKernel %make_target %kernel_image debug +BuildKernel %make_target %kernel_image %{_use_vdso} debug %endif %if %{with_pae_debug} -BuildKernel %make_target %kernel_image %{pae}debug +BuildKernel %make_target %kernel_image %{use_vdso} %{pae}debug %endif %if %{with_pae} -BuildKernel %make_target %kernel_image %{pae} +BuildKernel %make_target %kernel_image %{use_vdso} %{pae} %endif %if %{with_up} -BuildKernel %make_target %kernel_image +BuildKernel %make_target %kernel_image %{_use_vdso} %endif %global perf_make \ @@ -1751,10 +1762,6 @@ popd %if %{with_debuginfo} -%define __debug_install_post \ - /usr/lib/rpm/find-debuginfo.sh %{debuginfo_args} %{_builddir}/%{?buildsubdir}\ -%{nil} - %ifnarch noarch %global __debug_package 1 %files -f debugfiles.list debuginfo-common-%{_target_cpu} @@ -2119,68 +2126,122 @@ fi # %%kernel_variant_files [-k vmlinux] <condition> <subpackage> # %define kernel_variant_files(k:) \ -%if %{1}\ -%{expand:%%files -f kernel-%{?2:%{2}-}core.list %{?2:%{2}-}core}\ +%if %{2}\ +%{expand:%%files -f kernel-%{?3:%{3}-}core.list %{?3:%{3}-}core}\ %defattr(-,root,root)\ %{!?_licensedir:%global license %%doc}\ %license linux-%{KVERREL}/COPYING\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/%{?-k:%{-k*}}%{!?-k:vmlinuz}\ -%ghost /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2:+%{2}}\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/.vmlinuz.hmac \ -%ghost /%{image_install_path}/.vmlinuz-%{KVERREL}%{?2:+%{2}}.hmac \ +/lib/modules/%{KVERREL}%{?3:+%{3}}/%{?-k:%{-k*}}%{!?-k:vmlinuz}\ +%ghost /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?3:+%{3}}\ +/lib/modules/%{KVERREL}%{?3:+%{3}}/.vmlinuz.hmac \ +%ghost /%{image_install_path}/.vmlinuz-%{KVERREL}%{?3:+%{3}}.hmac \ %ifarch %{arm} aarch64\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/dtb \ -%ghost /%{image_install_path}/dtb-%{KVERREL}%{?2:+%{2}} \ +/lib/modules/%{KVERREL}%{?3:+%{3}}/dtb \ +%ghost /%{image_install_path}/dtb-%{KVERREL}%{?3:+%{3}} \ %endif\ -%attr(600,root,root) /lib/modules/%{KVERREL}%{?2:+%{2}}/System.map\ -%ghost /boot/System.map-%{KVERREL}%{?2:+%{2}}\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/config\ -%ghost /boot/config-%{KVERREL}%{?2:+%{2}}\ -%ghost /boot/initramfs-%{KVERREL}%{?2:+%{2}}.img\ +%attr(600,root,root) /lib/modules/%{KVERREL}%{?3:+%{3}}/System.map\ +%ghost /boot/System.map-%{KVERREL}%{?3:+%{3}}\ +/lib/modules/%{KVERREL}%{?3:+%{3}}/config\ +%ghost /boot/config-%{KVERREL}%{?3:+%{3}}\ +%ghost /boot/initramfs-%{KVERREL}%{?3:+%{3}}.img\ %dir /lib/modules\ -%dir /lib/modules/%{KVERREL}%{?2:+%{2}}\ -%dir /lib/modules/%{KVERREL}%{?2:+%{2}}/kernel\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/build\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/source\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/updates\ -%ifarch %{vdso_arches}\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/vdso\ -/etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:+%{2}}.conf\ +%dir /lib/modules/%{KVERREL}%{?3:+%{3}}\ +%dir /lib/modules/%{KVERREL}%{?3:+%{3}}/kernel\ +/lib/modules/%{KVERREL}%{?3:+%{3}}/build\ +/lib/modules/%{KVERREL}%{?3:+%{3}}/source\ +/lib/modules/%{KVERREL}%{?3:+%{3}}/updates\ +%if %{1}\ +/lib/modules/%{KVERREL}%{?3:+%{3}}/vdso\ +/etc/ld.so.conf.d/kernel-%{KVERREL}%{?3:+%{3}}.conf\ %endif\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/modules.*\ -%{expand:%%files -f kernel-%{?2:%{2}-}modules.list %{?2:%{2}-}modules}\ +/lib/modules/%{KVERREL}%{?3:+%{3}}/modules.*\ +%{expand:%%files -f kernel-%{?3:%{3}-}modules.list %{?3:%{3}-}modules}\ %defattr(-,root,root)\ -%{expand:%%files %{?2:%{2}-}devel}\ +%{expand:%%files %{?3:%{3}-}devel}\ %defattr(-,root,root)\ %defverify(not mtime)\ -/usr/src/kernels/%{KVERREL}%{?2:+%{2}}\ -%{expand:%%files %{?2:%{2}-}modules-extra}\ +/usr/src/kernels/%{KVERREL}%{?3:+%{3}}\ +%{expand:%%files %{?3:%{3}-}modules-extra}\ %defattr(-,root,root)\ -/lib/modules/%{KVERREL}%{?2:+%{2}}/extra\ +/lib/modules/%{KVERREL}%{?3:+%{3}}/extra\ %if %{with_debuginfo}\ %ifnarch noarch\ -%{expand:%%files -f debuginfo%{?2}.list %{?2:%{2}-}debuginfo}\ +%{expand:%%files -f debuginfo%{?3}.list %{?3:%{3}-}debuginfo}\ %defattr(-,root,root)\ %endif\ %endif\ -%if %{?2:1} %{!?2:0}\ -%{expand:%%files %{2}}\ +%if %{?3:1} %{!?3:0}\ +%{expand:%%files %{3}}\ %defattr(-,root,root)\ %endif\ %endif\ %{nil} - -%kernel_variant_files %{with_up} -%kernel_variant_files %{with_debug} debug -%kernel_variant_files %{with_pae} %{pae} -%kernel_variant_files %{with_pae_debug} %{pae}debug +%kernel_variant_files %{_use_vdso} %{with_up} +%kernel_variant_files %{_use_vdso} %{with_debug} debug +%kernel_variant_files %{use_vdso} %{with_pae} %{pae} +%kernel_variant_files %{use_vdso} %{with_pae_debug} %{pae}debug # plz don't put in a version string unless you're going to tag # and build. # # %changelog +* Wed Jun 7 2017 Peter Robinson <pbrobinson@fedoraproject.org> +- A couple of upstream fixes for Raspberry Pi + +* Tue Jun 06 2017 Laura Abbott <labbott@redhat.com> +- Enable the vDSO for arm LPAE + +* Tue Jun 06 2017 Laura Abbott <labbott@fedoraproject.org> - 4.12.0-0.rc4.git1.1 +- Linux v4.12-rc4-13-gba7b238 + +* Tue Jun 06 2017 Laura Abbott <labbott@fedoraproject.org> +- Reenable debugging options. + +* Mon Jun 05 2017 Laura Abbott <labbott@fedoraproject.org> - 4.12.0-0.rc4.git0.1 +- Linux v4.12-rc4 + +* Mon Jun 05 2017 Laura Abbott <labbott@fedoraproject.org> +- Disable debugging options. + +* Fri Jun 02 2017 Laura Abbott <labbott@fedoraproject.org> +- Enable Chromebook keyboard backlight (rhbz 1447031) + +* Fri Jun 02 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc3.git3.1 +- Linux v4.12-rc3-80-g3b1e342 + +* Thu Jun 01 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc3.git2.1 +- Linux v4.12-rc3-51-ga374846 + +* Wed May 31 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc3.git1.1 +- Linux v4.12-rc3-11-gf511c0b +- Reenable debugging options. + +* Tue May 30 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc3.git0.1 +- Linux v4.12-rc3 +- Disable debugging options. + +* Mon May 29 2017 Peter Robinson <pbrobinson@fedoraproject.org> +- Updates for ARM devices +- Build ARM Chromebook specifics on all ARM architectures + +* Fri May 26 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc2.git3.1 +- Linux v4.12-rc2-223-ge2a9aa5 + +* Wed May 24 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc2.git2.1 +- Linux v4.12-rc2-62-g2426125 + +* Wed May 24 2017 Peter Robinson <pbrobinson@fedoraproject.org> +- Various ARM updates + +* Tue May 23 2017 Laura Abbott <labbott@fedoraproject.org> +- Update debuginfo generation + +* Tue May 23 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc2.git1.1 +- Linux v4.12-rc2-49-gfde8e33 +- Reenable debugging options. + * Mon May 22 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc2.git0.1 - Linux v4.12-rc2 - Disable debugging options. |