fedora 14 kernel performance with ip forwarding workload
by Jesse Brandeburg
The other day I was running the stock fedora kernel on my ip
forwarding setup, to see what the performance was, and the performance
wasn't very good.
system is S5520HC dual socket 2.93GHz Xeon 5570 (Nehalem) with 3 quad
port 82580 adapters (12 ports). Traffic is bidirectional 64 byte
packets being forwarded and received on each port, basically port to
port routing. I am only using 12 flows currently.
The driver is igb, and I am using an affinity script that lines up
each pair of ports that are forwarding traffic into optimal
configurations for cache locality. I am also disabling
remote_node_defrag_ratio to stop cross node traffic.
With the fedora default kernel from F14 it appears that
CONFIG_NETFILTER=y means that I cannot unload all of netfilter even if
I stop iptables service.
perf showed netfilter being prominent, and removing it gives me much
higher throughput. Is there a reason CONFIG_NETFILTER=y ? Isn't it a
good thing to be able to disable netfilter if you want to?
Jesse
8 years, 6 months
[PATCHSET] utrace for 3.1 kernel
by Oleg Nesterov
Hello.
utrace patches for 3.1 kernel. Untested, will try to do some tests
tomorrow.
I do not want to spam you all and the lists, please look at
git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc.git utrace-3.1
Oleg Nesterov (29):
utrace: add utrace_init_task/utrace_free_task calls
tracehooks: add utrace hooks
tracehooks: reintroduce tracehook_consider_fatal_signal()
add utrace hooks into sig_ignored() and recalc_sigpending()
restore the EXEC/EXIT/CLONE utrace hooks
utrace: utrace_report_death() can use task_utrace_struct()
restore the DEATH/REAP utrace hooks
utrace: remove jobctl bits
ptrace: take ->siglock around s/TRACED/RUNNING/
introduce wake_up_quiescent()
introduce ptrace_signal_wake_up()
wait_task_inactive: treat task->state and match_state as bitmasks
introduce TASK_UTRACED state
utrace: use TASK_UTRACED instead of TASK_TRACED
reintroduce tracehook_finish_jctl() as utrace_end_stop()
teach wake_up_quiescent() to do "selective" wake_up
ptrace_stop: do not assume the task is running after wake_up_quiescent()
get_signal_to_deliver: restore/restructure utrace/ptrace signal reporting
utrace_get_signal: s/JOBCTL_STOP_PENDING/JOBCTL_PENDING_MASK/
introduce ptrace_set_syscall_trace()
introduce PT_SYSCALL_TRACE flag
utrace: don't clear TIF_SYSCALL_TRACE if it is needed by ptrace
introduce task_utrace_lock/task_utrace_unlock
teach ptrace_set_syscall_trace() to play well with utrace
introduce PT_SINGLE_STEP and PT_SINGLE_BLOCK
utrace: finish_resume_report: don't do user_xxx_step() if ptrace_wants_step()
ptrace: shift user_*_step() from ptrace_resume() to ptrace_stop()
ptrace_disable: no need to disable stepping
ptrace_report_syscall: check TIF_SYSCALL_EMU
Roland McGrath (1):
utrace core
Documentation/DocBook/Makefile | 2 +-
Documentation/DocBook/utrace.tmpl | 589 +++++++++
arch/s390/kernel/traps.c | 4 +-
arch/x86/kernel/ptrace.c | 1 -
fs/exec.c | 5 +-
fs/proc/array.c | 14 +-
include/linux/ptrace.h | 7 +
include/linux/sched.h | 25 +-
include/linux/signal.h | 2 +
include/linux/tracehook.h | 53 +-
include/linux/utrace.h | 773 ++++++++++++
init/Kconfig | 9 +
kernel/Makefile | 1 +
kernel/exit.c | 5 +
kernel/fork.c | 9 +
kernel/ptrace.c | 57 +-
kernel/sched.c | 2 +-
kernel/signal.c | 97 ++-
kernel/utrace.c | 2461 +++++++++++++++++++++++++++++++++++++
19 files changed, 4062 insertions(+), 54 deletions(-)
create mode 100644 Documentation/DocBook/utrace.tmpl
create mode 100644 include/linux/utrace.h
create mode 100644 kernel/utrace.c
11 years, 10 months
[RFC PATCH] Add modules-extra subpackage
by Josh Boyer
Below is the first swag at a kernel-modules-extra package. It seems to
do the proper thing, and move the listed modules to the
/lib/modules/`uname -r`/extra/ directory[1], and then package those up into
a kernel-<flavor>-modules-extra subpackage. I have a scratch build with
this change here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3523738
The macros the define the kernel-modules-extra subpackage and %files
sections look nasty, but they are required for when we build multiple
kernel flavors (e.g. PAE, debug, etc) so we get the proper per-flavor
subpackage.
The mod-extra.list file is the configuration file for which modules
should be put into the modules-extra subpackage. This isn't a fully
comprehensive list of exactly what will wind up in the subpackage.
Instead, it is a somewhat higher level list and the code will go through
and also put anything with a dependency[2] on one of these modules into the
subpackage as well (e.g. listing wimax.ko will also get
wimax/i2400m/i2400m.ko pulled in).
Comments welcome.
josh
[1] The extra/ directory already exists and is set aside for "out of tree"
modules, so we're slightly overriding the intention by sticking modules that
are built in-tree there. However, we do consider these modules _extra_ and
it seemed silly to create yet another directory for this purpose.
[2] The dependency stuff is a poor-man's depmod, which isn't run until
after the kernel package is installed. It's a best effort really, not
100% comprehensive but it seems to catch most things. We could run
depmod here and then use those results to catch everything but I wasn't
sure if that was desired or required.
---
kernel.spec | 69 ++++++++++++++++++++++-
mod-extra.list | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 238 insertions(+), 1 deletions(-)
create mode 100644 mod-extra.list
diff --git a/kernel.spec b/kernel.spec
index b72afb3..9eadbb1 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -548,6 +548,7 @@ Source1: compat-wireless-%{cwversion}.tar.bz2
Source11: genkey
Source14: find-provides
Source15: merge.pl
+Source16: mod-extra.list
Source19: Makefile.release
Source20: Makefile.config
@@ -902,6 +903,24 @@ against the %{?2:%{2} }kernel package.\
%{nil}
#
+# This macro creates a kernel-<subpackage>-modules-extra package.
+# %%kernel_modules-extra_package <subpackage> <pretty-name>
+#
+%define kernel_modules-extra_package() \
+%package %{?1:%{1}-}modules-extra\
+Summary: Extra kernel modules to match the %{?2:%{2} }kernel\
+Group: System Environment/Kernel\
+Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{version}-%{release}\
+Provides: kernel-modules-extra-%{_target_cpu} = %{version}-%{release}%{?1:.%{1}}\
+Provides: kernel-modules-extra = %{version}-%{release}%{?1:.%{1}}\
+Provides: kernel-modules-extra-uname-r = %{KVERREL}%{?1:.%{1}}\
+Requires: kernel%{?1:-%{1}}-%{_target_cpu} = %{version}-%{release}%{?1:.%{1}}\
+AutoReqProv: no\
+%description -n kernel%{?variant}%{?1:-%{1}}-modules-extra\
+This package provides less commonly used kernel modules for the %{?2:%{2} }kernel package.\
+%{nil}
+
+#
# This macro creates a kernel-<subpackage> and its -devel and -debuginfo too.
# %%define variant_summary The Linux kernel compiled for <configuration>
# %%kernel_variant_package [-n <pretty-name>] <subpackage>
@@ -912,12 +931,14 @@ Summary: %{variant_summary}\
Group: System Environment/Kernel\
%kernel_reqprovconf\
%{expand:%%kernel_devel_package %1 %{!?-n:%1}%{?-n:%{-n*}}}\
+%{expand:%%kernel_modules-extra_package %1 %{!?-n:%1}%{?-n:%{-n*}}}\
%{expand:%%kernel_debuginfo_package %1}\
%{nil}
# First the auxiliary packages of the main kernel package.
%kernel_devel_package
+%kernel_modules-extra_package
%kernel_debuginfo_package
@@ -1645,6 +1666,50 @@ BuildKernel() {
rm -f modinfo modnames
+ pushd $RPM_BUILD_ROOT/lib/modules/$KernelVer/
+ rm -rf modnames
+ find . -name "*.ko" -type f > modnames
+ # Look through all of the modules, and throw any that have a dependency in
+ # our list into the list as well.
+ rm -rf dep.list dep2.list
+ cp %{SOURCE16} .
+ for dep in `cat modnames`
+ do
+ depends=`modinfo $dep | grep depends| cut -f2 -d":" | sed -e 's/^[ \t]*//'`
+ [ -z "$depends" ] && continue;
+ for mod in `echo $depends | sed -e 's/,/ /g'`
+ do
+ match=`grep "^$mod.ko" mod-extra.list` ||:
+ if [ -z "$match" ]
+ then
+ continue
+ else
+ echo $dep >> dep.list
+ fi
+ done
+ done
+
+ for mod in `cat mod-extra.list`
+ do
+ # get the path for the module
+ modpath=`grep /$mod modnames`
+ [ -z "$modpath" ] && continue;
+ echo $modpath >> dep.list
+ done
+
+ sort -u dep.list > dep2.list
+
+ # now move the modules into the extra/ directory
+ for mod in `cat dep2.list`
+ do
+ newpath=`dirname $mod | sed -e 's/kernel\//extra\//'`
+ mkdir -p $newpath
+ mv $mod $newpath
+ done
+
+ rm modnames mod-extra.list dep.list dep2.list
+ popd
+
# remove files that will be auto generated by depmod at rpm -i time
for i in alias alias.bin builtin.bin ccwmap dep dep.bin ieee1394map inputmap isapnpmap ofmap pcimap seriomap symbols symbols.bin usbmap
do
@@ -2061,7 +2126,6 @@ fi
/lib/modules/%{KVERREL}%{?2:.%{2}}/kernel\
/lib/modules/%{KVERREL}%{?2:.%{2}}/build\
/lib/modules/%{KVERREL}%{?2:.%{2}}/source\
-/lib/modules/%{KVERREL}%{?2:.%{2}}/extra\
/lib/modules/%{KVERREL}%{?2:.%{2}}/updates\
%if %{with_backports}\
/lib/modules/%{KVERREL}%{?2:.%{2}}/backports\
@@ -2075,6 +2139,9 @@ fi
%{expand:%%files %{?2:%{2}-}devel}\
%defattr(-,root,root)\
/usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
+%{expand:%%files %{?2:%{2}-}modules-extra}\
+%defattr(-,root,root)\
+/lib/modules/%{KVERREL}%{?2:.%{2}}/extra\
%if %{with_debuginfo}\
%ifnarch noarch\
%{expand:%%files -f debuginfo%{?2}.list %{?2:%{2}-}debuginfo}\
diff --git a/mod-extra.list b/mod-extra.list
new file mode 100644
index 0000000..faec1d8
--- /dev/null
+++ b/mod-extra.list
@@ -0,0 +1,170 @@
+aer_inject.ko
+yenta_socket.ko
+tcp_bic.ko
+tcp_westwood.ko
+tcp_htcp.ko
+tcp_highspeed.ko
+tcp_hybla.ko
+tcp_vegas.ko
+tcp_scalable.ko
+tcp_lp.ko
+tcp_veno.ko
+tcp_yeah.ko
+tcp_illinois.ko
+dccp_diag.ko
+dccp_ipv4.ko
+dccp_ipv6.ko
+dccp.ko
+dccp_probe.ko
+sctp.ko
+sctp_probe.ko
+rds.ko
+rds_rdma.ko
+rds_tcp.ko
+atm.ko
+br2684.ko
+clip.ko
+lec.ko
+pppoatm.ko
+l2tp_core.ko
+l2tp_debugfs.ko
+l2tp_eth.ko
+l2tp_ip.ko
+l2tp_netlink.ko
+l2tp_ppp.ko
+8021q.ko
+llc.ko
+ipx.ko
+appletalk.ko
+ipddp.ko
+wanrouter.ko
+phonet.ko
+pn_pep.ko
+af_802154.ko
+ieee802154.ko
+sch_atm.ko
+sch_cbq.ko
+sch_choke.ko
+sch_drr.ko
+sch_dsmark.ko
+sch_gred.ko
+sch_hfsc.ko
+sch_htb.ko
+sch_ingress.ko
+sch_mqprio.ko
+sch_multiq.ko
+sch_netem.ko
+sch_prio.ko
+sch_qfq.ko
+sch_red.ko
+sch_sfb.ko
+sch_sfq.ko
+sch_tbf.ko
+sch_teql.ko
+ax25.ko
+netrom.ko
+rose.ko
+6pack.ko
+baycom_par.ko
+baycom_ser_fdx.ko
+baycom_ser_hdx.ko
+bpqether.ko
+hdlcdrv.ko
+mkiss.ko
+yam.ko
+can.ko
+can-raw.ko
+can-bcm.ko
+can-dev.ko
+slcan.ko
+vcan.ko
+c_can.ko
+c_can_platform.ko
+ems_pci.ko
+kvaser_pci.ko
+plx_pci.ko
+sja1000.ko
+sja1000_platform.ko
+softing_cs.ko
+softing.ko
+ems_usb.ko
+esd_usb2.ko
+wimax.ko
+nfc.ko
+nci.ko
+mtd.ko
+mptbase.ko
+mptctl.ko
+mptfc.ko
+i2400m.ko
+hisax.ko
+hysdn.ko
+isdn.ko
+mISDN_core.ko
+mISDN_dsp.ko
+capi.ko
+dss1_divert.ko
+bas_gigaset.ko
+gigaset.ko
+avm_cs.ko
+b1.ko
+diva_idi.ko
+divas.ko
+avmfritz.ko
+hfcpci.ko
+hfcmulti.ko
+netjet.ko
+w6692.ko
+avma1_cs.ko
+elsa_cs.ko
+hfc4s8s_l1.ko
+joydev.ko
+a3d.ko
+adi.ko
+analog.ko
+cobra.ko
+db9.ko
+gamecon.ko
+gf2k.ko
+grip.ko
+grip_mp.ko
+guillemot.ko
+iforce.ko
+interact.ko
+joydump.ko
+magellan.ko
+sidewinder.ko
+spaceball.ko
+spaceorb.ko
+stinger.ko
+tmdc.ko
+turbografx.ko
+twidjoy.ko
+walkera0701.ko
+warrior.ko
+xpad.ko
+zhenhua.ko
+trancevibrator.ko
+umc.ko
+uwb.ko
+whci.ko
+hwa-rc.ko
+uio.ko
+uio_aec.ko
+uio_pci_generic.ko
+jfs.ko
+gfs2.ko
+ocfs2.ko
+ocfs2_stackglue.ko
+ocfs2_dlm.ko
+cuse.ko
+affs.ko
+befs.ko
+jffs2.ko
+ubifs.ko
+sysv.ko
+ufs.ko
+ncpfs.ko
+coda.ko
+9p.ko
+9pnet.ko
--
1.7.7.1
12 years
Fedora 16: elantech patch
by JJ Ding
Hi Josh,
I just updated one of my work machine to kernel-3.1.2-1.fc16.i386 and
touchpad stopped working. I checked and realized that you applied my
elantech patches upstreamed for 3.2. But since you backported there is
one more fix you missed, which is also upstreamed now. It's commit
3940d6185a982a970ff562e085caccbdd62f40bb in Linus' latest tree. Please
also take this patch for Fedora 16's kernel, thanks a lot.
br,
jj
12 years
[PATCH 0/33] utrace for 3.2 kernel
by Oleg Nesterov
Hello,
utrace patches for 3.2 kernel.
Also available at git://github.com/utrace/linux utrace-3.2
Oleg.
Documentation/DocBook/Makefile | 2 +-
Documentation/DocBook/utrace.tmpl | 589 +++++++++
arch/s390/kernel/traps.c | 6 +-
arch/x86/kernel/ptrace.c | 1 -
fs/exec.c | 5 +-
fs/proc/array.c | 14 +-
include/linux/ptrace.h | 7 +
include/linux/sched.h | 25 +-
include/linux/signal.h | 2 +
include/linux/tracehook.h | 59 +-
include/linux/utrace.h | 773 ++++++++++++
init/Kconfig | 9 +
kernel/Makefile | 1 +
kernel/exit.c | 5 +
kernel/fork.c | 9 +
kernel/ptrace.c | 57 +-
kernel/sched.c | 2 +-
kernel/signal.c | 97 ++-
kernel/utrace.c | 2462 +++++++++++++++++++++++++++++++++++++
19 files changed, 4069 insertions(+), 56 deletions(-)
12 years
Proposal to add build of kernel-backports package to kernel.spec
by John W. Linville
So, I have a little proposal for the Fedora kernel SRPM...
TL;DR -- I want to create a kernel-backports package that includes the
output of building compat-wireless against the corresponding kernel. A
version of this package will automatically be built for every kernel
RPM built.
Why?
Hardware enablement is an endless treadmill. As Fedora has matured,
the delta between current Fedora kernels and current upstream kernels
has tended to widen (at least for older releases e.g. F14). This can
cause problems both for users needing cutting-edge hardware support
and for developers trying to diagnose problems in Fedora kernels that
may have already been fixed upstream.
Creating a seperate package allows both of the above situations to
be addressed while allowing "normal" users to use the base kernel
without unnecessary risk of destabilization. Integrating the build
of that package with the kernel build ensures that every new kernel
automatically has a kernel-backports package built without need of
human intervention or creative scripting.
How does this proposal look?
I have a scratch F14 kernel build available here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3404605
You will also need an updated module-init-tools package:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3404725
When you install the kernel-backports package, modinfo for an affected
driver (e.g. iwlagn) will show that the driver chosen by depmod will
change. Removing kernel-backports will point you back to the version
from the base kernel.
What is in the kernel-backports package?
At present, a stable release of the compat-wireless project would be
included in the kernel-backports package:
http://www.linuxwireless.org/en/users/Download
The compat-wireless project contains backports of sources from current
upstream kernels. These are not out-of-tree drivers in the traditional
sense. These drivers are in-tree -- just a later version of the tree.
As such, the compat-wireless sources follow the same license as the
upstream Linux kernel (i.e. GPLv2).
The compat-* project is expected/intended to expand to include wired
networking drivers and more in the future. As that happens, those new
compat-* drivers will be included in the kernel-backports package as
well.
Isn't this just a big kmod package?
No, or at least not exactly. Existing kmod package standards require a
separate kmod build for every kernel build. Most (or all?) of them
require complex versioning to distinquish between versions of the kmod
package and versions of the target kernel. They are a nightmare to
maintain. Worse, they require multiple kmod packages for multiple drivers,
multiplying the maintenance burden.
This proposal minimizes the maintenance required while maximizing the
coverage of driver upates. A single compat-wireless package update will
suffice to update a full suite of drivers all at once.
Isn't this too "bleeding edge" for non-rawhide Fedora?
Perhaps so, at least for many people. That is the advantage of having a
separate kernel-backports package. Those that don't want to use the
cutting-edge hardware support will simply not install the package.
Those who want or need that support will have it easily available.
Why not just use Rawhide?
Rawhide might have even more "bleeding" edge hardware support than the
kernel-backports package would get. Plus, Rawhide kernels will have
less mature core kernel changes as well. Keeping a stable release
kernel with a kernel-backports package offers an intermediate step
towards cutting-edge hardware support while maintaining a stable core
kernel.
Who will maintain it?
For now, I will. When I am old and gone, my successor will only have
to update the compat-wireless bits once per upstream kernel release
and perhaps add a few Fedora-specific compat-wireless patches as
things are backported to the Fedora base kernel that conflict with
the compat layer in compat-wireless.
Can we turn it off easily?
Yes. The spec file changes are all bracketed by a "with_backports"
symbol already. In fact, with_backports will have to be turned-off
in Rawhide and in any other Fedora releases where the kernel version
is the same or newer than the latest compat-wireless stable release.
What do the changes look like?
I'll paste the kernel.spec file changes for F14 below. I'll attach the
required module-init-tools.spec file patch to this email for reference
as well.
Conclusion
So, there is my proposal. What are the objections?
Once any major objections are addressed, I'll pursue any required Fedora
project management items required (e.g. a Feature page).
John
---
diff --git a/kernel.spec b/kernel.spec
index cc12bce..b96c348 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -25,6 +25,7 @@ Summary: The Linux kernel
#
# % define buildid .local
###################################################################
+%define buildid .1.compat
# The buildid can also be specified on the rpmbuild command line
# by adding --define="buildid .whatever". If both the specfile and
@@ -147,6 +148,10 @@ Summary: The Linux kernel
# should we do C=1 builds with sparse
%define with_sparse %{?_with_sparse: 1} %{?!_with_sparse: 0}
+# Include driver backports (e.g. compat-wireless) in the kernel build.
+# This builds a separate kernel-backports package.
+%define with_backports %{?_with_backports: 1} %{?!_with_backports: 0}
+
# 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'.
@@ -531,6 +536,9 @@ BuildRequires: rpm-build >= 4.4.2.1-4
%endif
Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
+%if %{with_backports}
+Source1: compat-wireless-3.0-2.tar.bz2
+%endif
Source11: genkey
Source14: find-provides
@@ -864,6 +872,10 @@ Patch14050: x86-PCI-don-t-use-native-Broadcom-CNB20LE-driver-whe.patch
# RHBZ #648571
Patch14051: modules-Fix-module_bug_list-list-corruption-race.patch
+%if %{with_backports}
+Patch20000: compat-wireless-vzalloc.patch
+%endif
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1042,6 +1054,37 @@ It should only be installed when trying to gather additional information
on kernel bugs, as some of these options impact performance noticably.
+%if %{with_backports}
+
+#
+# This macro creates a kernel-backports-<subpackage>.
+# %%kernel_variant_backports_package <condition> <subpackage>
+#
+%define kernel_variant_backports_package() \
+%if %{1}\
+%package %{?2:%{2}-}backports\
+Summary: Drivers backported from later versions of the Linux kernel\
+Group: System Environment/Kernel\
+License: GPLv2\
+Requires: kernel = %{rpmversion}-%{pkg_release}\
+Requires(post): module-init-tools >= 3.11.1-6.1.compat\
+%description %{?2:%{2}-}backports\
+This package provies pre-compiled drivers backported from later versions\
+of the Linux kernel. This package contains drivers from the upstream\
+Linux kernel exclusively. Out-of-tree drivers are not provided.\
+This version matches the kernel%{?2:-%{2}} package.\
+%{nil}\
+%endif
+
+%kernel_variant_backports_package %{with_up}
+%kernel_variant_backports_package %{with_smp} smp
+%kernel_variant_backports_package %{with_debug} debug
+%kernel_variant_backports_package %{with_pae} PAE
+%kernel_variant_backports_package %{with_pae_debug} PAEdebug
+
+%endif
+
+
%prep
# do a few sanity-checks for --with *only builds
%if %{with_baseonly}
@@ -1670,6 +1713,16 @@ find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
cd ..
+%if %{with_backports}
+
+# Extract the compat-wireless bits
+%setup -q -n kernel-%{kversion}%{?dist} -T -D -a 1
+
+cd compat-wireless-3.0-2
+%patch20000 -p1
+
+%endif
+
###
### build
###
@@ -1787,6 +1840,9 @@ BuildKernel() {
# dirs for additional modules per module-init-tools, kbuild/modules.txt
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
+%if %{with_backports}
+ mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/backports
+%endif
# first copy everything
cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
@@ -1886,6 +1942,23 @@ BuildKernel() {
mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
ln -sf ../../..$DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+
+%if %{with_backports}
+
+ cd ../compat-wireless-3.0-2/
+ make clean
+
+ make KLIB_BUILD=../linux-%{kversion}.%{_target_cpu} \
+ KMODPATH_ARG="INSTALL_MOD_PATH=$RPM_BUILD_ROOT" \
+ KMODDIR="backports" install-modules
+
+ # mark modules executable so that strip-to-file can strip them
+ find $RPM_BUILD_ROOT/lib/modules/$KernelVer/backports -name "*.ko" \
+ -type f | xargs --no-run-if-empty chmod u+x
+
+ cd -
+
+%endif
}
###
@@ -2103,6 +2176,54 @@ fi}\
%kernel_variant_post -v PAEdebug -r (kernel|kernel-smp)
%kernel_variant_preun PAEdebug
+%if %{with_backports}
+
+#
+# This macro defines a depmod operation for install/remove of backports.
+# %%kernel_variant_backports_depmod [-v <subpackage>]
+#
+%define kernel_variant_backports_depmod(v:) \
+%{expand:\
+/sbin/depmod -ae -F /boot/System.map-%{KVERREL}%{?-v:.%{-v*}} || exit $?\
+}\
+%{nil}
+
+#
+# This macro defines a %%post script for a kernel backports package.
+# %%kernel_variant_backports_post <condition> <subpackage>
+#
+%define kernel_variant_backports_post() \
+%if %{1}\
+%{expand:%%post %{?2:%{2}-}backports}\
+%{expand:%%kernel_variant_backports_depmod %{?2:-v %{2}}}\
+%endif\
+%{nil}
+
+#
+# This macro defines a %%postun script for a kernel backports package.
+# %%kernel_variant_backports_postun <condition> <subpackage>
+#
+%define kernel_variant_backports_postun() \
+%if %{1}\
+%{expand:%%postun %{?2:%{2}-}backports}\
+%{expand:%%kernel_variant_backports_depmod %{?2:-v %{2}}}\
+%endif\
+%{nil}
+
+%kernel_variant_backports_post %{with_up}
+%kernel_variant_backports_post %{with_smp} smp
+%kernel_variant_backports_post %{with_debug} debug
+%kernel_variant_backports_post %{with_pae} PAE
+%kernel_variant_backports_post %{with_pae_debug} PAEdebug
+
+%kernel_variant_backports_postun %{with_up}
+%kernel_variant_backports_postun %{with_smp} smp
+%kernel_variant_backports_postun %{with_debug} debug
+%kernel_variant_backports_postun %{with_pae} PAE
+%kernel_variant_backports_postun %{with_pae_debug} PAEdebug
+
+%endif
+
if [ -x /sbin/ldconfig ]
then
/sbin/ldconfig -X || exit $?
@@ -2209,10 +2330,39 @@ fi
%kernel_variant_files %{with_pae} PAE
%kernel_variant_files %{with_pae_debug} PAEdebug
+
+%if %{with_backports}
+
+#
+# This macro defines the %%files sections for a kernel-backports
+# package.
+# %%kernel_variant_backports_files <condition> <subpackage>
+#
+%define kernel_variant_backports_files() \
+%if %{1}\
+%{expand:%%files %{?2:%{2}-}backports}\
+%defattr(-,root,root)\
+/lib/modules/%{KVERREL}%{?2:.%{2}}/backports\
+%endif\
+%{nil}
+
+%kernel_variant_backports_files %{with_up}
+%kernel_variant_backports_files %{with_smp} smp
+%kernel_variant_backports_files %{with_debug} debug
+%kernel_variant_backports_files %{with_pae} PAE
+%kernel_variant_backports_files %{with_pae_debug} PAEdebug
+
+%endif
+
+
# plz don't put in a version string unless you're going to tag
# and build.
%changelog
+* Tue Oct 4 2011 John W. Linville <linville(a)redhat.com>
+- Add infrastructure for kernel-backports package
+- Include compat-wireless project in package above
+
* Mon Sep 12 2011 Josh Boyer <jwboyer(a)redhat.com>
- Backport 5336377d to fix RHBZ #648571
--
John W. Linville The water won't run clean until you get
linville(a)redhat.com the pigs out of the creek.
12 years
Exclude plymouth from Kernel?
by Frank Murphy
How can I prevent plymouth from loading.
Have tried *dracut -o blacklist plymouth* on it's own
How can I set a test machine up so,
yum update kernel
doesn't build plymouth in.
Without havin'g to manually
rebuild each one.
--
Regards,
Frank Murphy
UTF_8 Encoded
Friend of fedoraproject.org
12 years
Re: fedora kernel question (and patch?)
by Brendan Jones
> I saw a bug comment go flying by pointing to this same patch, but I
> can't recall what bug it was. Did you point to this in a bug, if so
> which one?
>
> Since you're applying it locally, I'm wondering if you can let us know
> if it solves that particular bug.
>
> josh
Yeah I did, it was this one
https://bugzilla.redhat.com/show_bug.cgi?id=527813
The reason I'm getting excited is I think there are a few issues at play
here which are confusing us in userland. There was a problem with the 5
series laptops which caused the same problem both in linux and windows,
whereas I think this particular patch is EHCI related and not hardware
specific.
More than happy/capable to test this... unfortunately just moved to
Europe and my container is in UK customs as we speak - give me a week or
so. More than happy to pass on any builds you do to the LAD/LAU/CCRMA guys.
I guess what it comes down to is USB pro-audio is broken on linux
laptops. This gives me hope.
Will keep you posted.
thanks
Brendan
12 years
rpmbuild of a f16 kernel drops core.
by Steve Dickson
Hey,
I did the following that cause depmod.sh to drop core
$ fedpkg --dist 16 srpm
$ rpm -ihv kernel-3.1.0-10.idmap.fc17.src.rpm
$ rpmbuild -bb --without tools --with firmware --target x86_64 kernel.spec
which cause the following error:
/home/src/f16/build/BUILD/kernel-3.1.fc15/linux-3.1.x86_64/scripts/depmod.sh: line 43: 10982 Segmentation fault (core dumped) "$DEPMOD" "$@" "$KERNELRELEASE"
make: *** [_modinst_post] Error 139
error: Bad exit status from /var/tmp/rpm-tmp.JhZ0CH (%build)
The entire log is at: http://people.redhat.com/steved/.tmp/build-coredump
A known problem?
steved.
12 years