Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lerichi:Staging
kernel-rt
kernel-rt.5.10.1._spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kernel-rt.5.10.1._spec of Package kernel-rt
%define linux 5.10.1 %define preempt rt20 # found this ref with general notes on SUSE kernels # http://www.suse.de/~agruen/kernel-doc/ # /usr/share/doc/packages/kernel-source/README.SUSE # some documentation on version numbers # # %%linux Linux kernel base version, e.g. 3.4.32 # # %%preempt Preemption patch version, e.g. rt45 # # %%version Linux version number _ rt version number, e.g. 3.4.32_rt45 # # %%source_rel major release, e.g. 1, when release is 1.3 # # %%localversion Added to the .config file, major release - variant, # e.g. 1-preempt_rt. The variant is used to add this # kernel to the boot menu on SUSE distributions. # # %%kernelrelease Linux version number - rt version - localversion # e.g. 3.4.32-rt45-1-preempt_rt. This is also where # you find modules under /lib/modules # # The file localversion-rt will be added by the preempt_rt patch, and # contains for example "-rt45" Together with major version, and # localversion in the .config file, the kernel scripts calculate # kernelrelease from this file # Note that include/config/kernel.release in the kernel source dir # will contain the final release string, easy if you need to determine # this release string in a module package # My main motivation to build this kernel series is to use them in our # simulation facilities, in combination with EtherCat IO hardware. The # major kernel version (e.g., 3.4 as of feb 2013) is selected to have # as many available ethercat master drivers as possible # Hint: to re-create the config for 32 bit arch, when on a 64 bit # machine, run make oldconfig SUBARCH=i386 # Another Hint: The kernel debug option is deselected to provide a # possibility to create an nvidia kernel module; nvidia license is # incompatible with the dump_page symbol generated when kernel debug # is selected. # the openSUSE kernel sym "provides" calculation depends on the following: # * Having a /boot/vmlinux-%%{kernelrelease}.gz file, # basically a zipped kernel file. The variant (in this case preempt_rt), is # used as prefix for the ksyms # * Having /lib/modules/%%{kernelrelease}/...*.ko files. The variant/last part # of the %%{kernelrelease} is again prefix for the ksyms # Although SUSE likes to keep the different kernel variant versions # synchronized with the default kernel version, this is not possible # for the preempt_rt kernels, because of availability of the # preempt_rt patch for only select kernel base versions. Therefore # these kernels run slightly out of sync %define _buildshell /bin/bash %define source_rel %(echo %release | cut --delim=. -f 1) %define localversion -%{source_rel}-rt %define kernelrelease %{linux}-%{preempt}%{localversion} %define linux_dir linux-%{linux} Name: kernel-rt Summary: Kernel and modules for realtime operation Version: %{linux}_%{preempt} Release: 1 License: GPL-2.0 Group: System/Kernel URL: http://rt.wiki.kernel.org/ Source0: linux-%{linux}.tar.xz Source1: linux-%{linux}-%{preempt}.config Patch: patch-%{linux}-%{preempt}.patch.xz Prereq: /sbin/ldconfig BuildRequires: gcc gcc-c++ coreutils module-init-tools BuildRequires: bc flex bison openssl-devel libelf-devel BuildRequires: modutils BuildRequires: pesign-obs-integration Requires: irqbalance BuildRequires: makedumpfile BuildRequires: fdupes Requires(pre): coreutils gawk Requires(post): module-init-tools Requires(post): /sbin/depmod Requires(post): mkinitrd Requires(post): perl-Bootloader Prereq: fileutils Prereq: module-init-tools Prereq: mkinitrd BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This is a kernel package with the PREEMPT_RT patch applied. The preempt_rt patch provides preemption for most parts of the kernel, making this kernel excellent for producing short latency responses, and a bit worse for overall throughput. %package headers Summary: Development headers for the Linux kernel Group: System/Kernel Exclusivearch: x86_64 %description headers Kernel headers for the kernel with PREEMPT_RT patch applied. Includes a .config, and should provide all needed files to build external modules %prep df -h # see http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html # for options %setup -q -n %{linux_dir} # Patch kernel with RT, copy .config # copy the config, adjust CONFIG_LOCALVERSION, Together with # localversion-rt, this ensures a unique kernel # version string, equal to %%kernelversion %patch -p1 cp %{SOURCE1} .config ./scripts/config --set-str CONFIG_LOCALVERSION %{localversion} %build df -h %{make_build} oldconfig bzImage modules %install df -h rm -rf %{buildroot} install -d %{buildroot}/boot install -d %{buildroot}/lib/modules %{__make} modules_install INSTALL_MOD_PATH=%{buildroot} install -m 644 arch/$RPM_ARCH/boot/bzImage \ %{buildroot}/boot/vmlinuz-%{kernelrelease} install -m 644 System.map \ %{buildroot}/boot/System.map-%{kernelrelease} install -m 444 .config \ %{buildroot}/boot/config-%{kernelrelease} cat Module.symvers | gzip -9 >%{buildroot}/boot/symvers-%{kernelrelease}.gz # build and source currently point to the build directory here. Not good rm -f %{buildroot}/lib/modules/%{kernelrelease}/build rm -f %{buildroot}/lib/modules/%{kernelrelease}/source ln -sf /usr/src/linux-%{version} %{buildroot}/lib/modules/%{kernelrelease}/build ln -sf build %{buildroot}/lib/modules/%{kernelrelease}/source # make directories for external modules mkdir -p %{buildroot}/lib/modules/%{kernelrelease}/extra mkdir -p %{buildroot}/lib/modules/%{kernelrelease}/updates # directory with necessary sources for building additional modules install -d %{buildroot}/usr/src/linux-%{version} # copy kernel headers and the scripts directory cp -a include scripts %{buildroot}/usr/src/linux-%{version} # and all makefile and Kconfig files, with parents. The main Makefile # has these as targets cp -a --parents `find . -type f -name "Makefile*" -o -name "Kconfig*"` \ %{buildroot}/usr/src/linux-%{version} # copy the x86 architecture headers (add others, if you want more archs) cp -a --parents arch/x86/include %{buildroot}/usr/src/linux-%{version} cp Module.symvers %{buildroot}/usr/src/linux-%{version} cp System.map %{buildroot}/usr/src/linux-%{version} cp .config %{buildroot}/usr/src/linux-%{version} cp localversion-rt %{buildroot}/usr/src/linux-%{version} # Make sure the Makefile and generated files have a matching timestamp so that # external modules can be built find %{buildroot}/usr/src/linux-%{version}/include/generated -name "*.h" -print0 |\ xargs -0 touch -r %{buildroot}/usr/src/linux-%{version}/Makefile touch -r %{buildroot}/usr/src/linux-%{version}/Makefile %{buildroot}/usr/src/linux-%{version}/.config # remove various types of junk find %{buildroot}/usr/src/linux-%{version} \ \( -name .gitignore -o -name .install -o -name .\*.cmd \) -a -exec rm {} \; # de-duplicate files %if 0%{?suse_version} %fdupes -s %{buildroot}/usr/src/linux-%{version} %else fdupes -s %{buildroot}/usr/src/linux-%{version} %endif # remove modules.dep, will be created in post script rm %{buildroot}/lib/modules/*/modules.dep # vmlinux for dependency calculation cp vmlinux %{buildroot}/boot/vmlinux-%{kernelrelease} gzip -n -9 %{buildroot}/boot/vmlinux-%{kernelrelease} chmod a-x %{buildroot}/boot/vmlinux-%{kernelrelease}.gz %postun # remove the initrd file rm -f /boot/initrd-%{kernelrelease} # remove entry from bootloader if [ -x /usr/lib/bootloader/bootloader_entry ]; then /usr/lib/bootloader/bootloader_entry remove \ preempt \ %{kernelrelease} \ vmlinuz-%{kernelrelease} \ initrd-%{kernelrelease} \ no-default else echo "Manually remove %{kernelrelease} entry from bootloader" fi %post export PBL_SKIP_BOOT_TEST=1 /sbin/depmod -a -F /boot/System.map-%{kernelrelease} %{kernelrelease} if [ -f /etc/fstab -a ! -e /.buildenv -a -x /sbin/mkinitrd ] ; then tmp_dir=/dev/shm /sbin/mkinitrd -k /boot/vmlinuz-%{kernelrelease} \ -M /boot/System.map-%{kernelrelease} \ -i /boot/initrd-%{kernelrelease} else echo "Cannot find mkinitrd" fi if [ -x /usr/lib/bootloader/bootloader_entry ]; then /usr/lib/bootloader/bootloader_entry add \ preempt \ %{kernelrelease} \ vmlinuz-%{kernelrelease} \ initrd-%{kernelrelease} \ no-default else echo "Manually add %{kernelrelease} entry to bootloader" fi %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README %dir /lib/modules/%{kernelrelease} /lib/modules/%{kernelrelease}/modules.* /lib/modules/%{kernelrelease}/kernel /lib/modules/%{kernelrelease}/extra /lib/modules/%{kernelrelease}/updates /boot/System.map-%{kernelrelease} /boot/config-%{kernelrelease} /boot/vmlinuz-%{kernelrelease} /boot/symvers-%{kernelrelease}.gz /boot/vmlinux-%{kernelrelease}.gz %files headers %defattr(-,root,root,-) /usr/src/linux-%{version} /lib/modules/%{kernelrelease}/build /lib/modules/%{kernelrelease}/source %changelog * Fri Feb 6 2009 Rene van Paassen <Rene.vanPaassen@gmail.com> 2.6.26.8_rt15-2 - removed latency and mutex debug options * Wed Feb 4 2009 Rene van Paassen <Rene.vanPaassen@gmail.com> 2.6.26.8_rt15-1 - initial version
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor