Merge pull request #512 from RealJohnGalt/ck-patch

New package: linux3.16-ck
This commit is contained in:
Juan RP 2014-08-19 11:08:43 +02:00
commit fab000de57
10 changed files with 22731 additions and 0 deletions

View File

@ -0,0 +1 @@
linux3.16-ck

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-3.16-ck1/Makefile
===================================================================
--- linux-3.16-ck1.orig/Makefile 2014-08-16 14:46:12.574916784 +1000
+++ linux-3.16-ck1/Makefile 2014-08-16 14:46:12.573916784 +1000
@@ -10,6 +10,10 @@ NAME = Shuffling Zombie Juror
# Comments in this file are targeted only to the developer, do not
# expect to learn how to build the kernel reading this file.
+CKVERSION = -ck1
+CKNAME = BFS Powered
+EXTRAVERSION := $(EXTRAVERSION)$(CKVERSION)
+
# Do not:
# o use make's built-in rules and variables
# (this increases performance and avoids hard-to-debug behaviour);

View File

@ -0,0 +1,21 @@
Set default HZ to 1000 which is what most desktop users should still be using.
-ck
---
kernel/Kconfig.hz | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-3.16-ck1/kernel/Kconfig.hz
===================================================================
--- linux-3.16-ck1.orig/kernel/Kconfig.hz 2014-08-16 14:46:12.392916801 +1000
+++ linux-3.16-ck1/kernel/Kconfig.hz 2014-08-16 14:46:12.391916801 +1000
@@ -4,7 +4,7 @@
choice
prompt "Timer frequency"
- default HZ_250
+ default HZ_1000
help
Allows the configuration of the timer frequency. It is customary
to have the timer interrupt run at 1000 Hz but 100 Hz may be more

View File

@ -0,0 +1,53 @@
Make 250HZ not be the default to discourage desktop users from choosing this
option since 1000 will provide better latencies with only miniscule amounts
of extra overhead and power consumption.
-ck
---
kernel/Kconfig.hz | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
Index: linux-3.16-ck1/kernel/Kconfig.hz
===================================================================
--- linux-3.16-ck1.orig/kernel/Kconfig.hz 2014-08-16 14:46:12.299916810 +1000
+++ linux-3.16-ck1/kernel/Kconfig.hz 2014-08-16 14:46:12.298916810 +1000
@@ -23,13 +23,14 @@ choice
with lots of processors that may show reduced performance if
too many timer interrupts are occurring.
- config HZ_250
+ config HZ_250_NODEFAULT
bool "250 HZ"
help
- 250 Hz is a good compromise choice allowing server performance
- while also showing good interactive responsiveness even
- on SMP and NUMA systems. If you are going to be using NTSC video
- or multimedia, selected 300Hz instead.
+ 250 HZ is a lousy compromise choice allowing server interactivity
+ while also showing desktop throughput and no extra power saving on
+ laptops. No good for anything.
+
+ Recommend 100 or 1000 instead.
config HZ_300
bool "300 HZ"
@@ -43,14 +44,16 @@ choice
bool "1000 HZ"
help
1000 Hz is the preferred choice for desktop systems and other
- systems requiring fast interactive responses to events.
+ systems requiring fast interactive responses to events. Laptops
+ can also benefit from this choice without sacrificing battery life
+ if dynticks is also enabled.
endchoice
config HZ
int
default 100 if HZ_100
- default 250 if HZ_250
+ default 250 if HZ_250_NODEFAULT
default 300 if HZ_300
default 1000 if HZ_1000

View File

@ -0,0 +1,46 @@
The options to alter the vmsplit to enable more lowmem are hidden behind the
expert option. Make it more exposed for -ck users and make the help menu
more explicit about what each option means.
-ck
---
arch/x86/Kconfig | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: linux-3.16-ck1/arch/x86/Kconfig
===================================================================
--- linux-3.16-ck1.orig/arch/x86/Kconfig 2014-08-16 14:46:12.483916793 +1000
+++ linux-3.16-ck1/arch/x86/Kconfig 2014-08-16 14:46:12.482916793 +1000
@@ -1143,7 +1143,7 @@ config HIGHMEM64G
endchoice
choice
- prompt "Memory split" if EXPERT
+ prompt "Memory split"
default VMSPLIT_3G
depends on X86_32
---help---
@@ -1163,17 +1163,17 @@ choice
option alone!
config VMSPLIT_3G
- bool "3G/1G user/kernel split"
+ bool "Default 896MB lowmem (3G/1G user/kernel split)"
config VMSPLIT_3G_OPT
depends on !X86_PAE
- bool "3G/1G user/kernel split (for full 1G low memory)"
+ bool "1GB lowmem (3G/1G user/kernel split)"
config VMSPLIT_2G
- bool "2G/2G user/kernel split"
+ bool "2GB lowmem (2G/2G user/kernel split)"
config VMSPLIT_2G_OPT
depends on !X86_PAE
- bool "2G/2G user/kernel split (for full 2G low memory)"
+ bool "2GB lowmem (2G/2G user/kernel split)"
config VMSPLIT_1G
- bool "1G/3G user/kernel split"
+ bool "3GB lowmem (1G/3G user/kernel split)"
endchoice
config PAGE_OFFSET

View File

@ -0,0 +1,40 @@
Enable preempt by default and make people steer away from voluntary.
-ck
---
kernel/Kconfig.preempt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: linux-3.16-ck1/kernel/Kconfig.preempt
===================================================================
--- linux-3.16-ck1.orig/kernel/Kconfig.preempt 2014-08-16 14:46:12.208916818 +1000
+++ linux-3.16-ck1/kernel/Kconfig.preempt 2014-08-16 14:46:12.206916818 +1000
@@ -1,7 +1,7 @@
choice
prompt "Preemption Model"
- default PREEMPT_NONE
+ default PREEMPT
config PREEMPT_NONE
bool "No Forced Preemption (Server)"
@@ -17,7 +17,7 @@ config PREEMPT_NONE
latencies.
config PREEMPT_VOLUNTARY
- bool "Voluntary Kernel Preemption (Desktop)"
+ bool "Voluntary Kernel Preemption (Nothing)"
help
This option reduces the latency of the kernel by adding more
"explicit preemption points" to the kernel code. These new
@@ -31,7 +31,8 @@ config PREEMPT_VOLUNTARY
applications to run more 'smoothly' even when the system is
under load.
- Select this if you are building a kernel for a desktop system.
+ Select this for no system in particular (choose Preemptible
+ instead on a desktop if you know what's good for you).
config PREEMPT
bool "Preemptible Kernel (Low-Latency Desktop)"

View File

@ -0,0 +1,218 @@
# Template file for 'linux3.16-ck'
#
pkgname=linux3.16-ck
version=3.16.1
revision=1
patch_args="-p1"
wrksrc="linux-${version}"
maintainer="John Galt <johngaltfirstrun@gmail.com>"
homepage="http://www.kernel.org"
license="GPL-2"
short_desc="Colin Kolivas patched Linux kernel and modules (${version%.*} series)"
distfiles="http://www.kernel.org/pub/linux/kernel/v3.x/linux-${version}.tar.xz"
checksum=be37dda8ea090525661d64e5c7fc8580f313b7f9ba8592e32120f1332bc57d71
_kernver="${version}ck_${revision}"
nostrip=yes
noverifyrdeps=yes
preserve=yes
only_for_archs="i686 x86_64"
makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
triggers="kernel-hooks"
# These files could be modified when an external module is built.
mutable_files="
/usr/lib/modules/${_kernver}/modules.dep
/usr/lib/modules/${_kernver}/modules.dep.bin
/usr/lib/modules/${_kernver}/modules.symbols
/usr/lib/modules/${_kernver}/modules.symbols.bin
/usr/lib/modules/${_kernver}/modules.alias
/usr/lib/modules/${_kernver}/modules.alias.bin
/usr/lib/modules/${_kernver}/modules.devname"
do_configure() {
# If there's a file called <arch>-dotconfig, use it to
# configure the kernel; otherwise use arch defaults and all stuff
# as modules (defconfig+allmodconfig).
local arch
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
arch=i386
else
arch=x86_64
fi
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
msg_normal "Detected a custom .config file for your arch, using it.\n"
cp -f ${FILESDIR}/${arch}-dotconfig-custom .config
make ${makejobs} oldconfig
elif [ -f ${FILESDIR}/${arch}-dotconfig ]; then
msg_normal "Detected a .config file for your arch, using it.\n"
cp -f ${FILESDIR}/${arch}-dotconfig .config
make ${makejobs} oldconfig
else
msg_normal "Defaulting to 'defconfig and allmodconfig'.\n"
make ${makejobs} defconfig
make ${makejobs} allmodconfig
fi
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
}
do_build() {
make EXTRAVERSION=ck ${makejobs} prepare
make EXTRAVERSION=ck ${makejobs} bzImage modules
}
do_install() {
local arch hdrdest
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
arch=i386
else
arch=x86_64
fi
# Run depmod after compressing modules.
sed -i '2iexit 0' scripts/depmod.sh
# Install kernel, firmware and modules
make ${makejobs} INSTALL_MOD_PATH=${DESTDIR} modules_install
hdrdest=${DESTDIR}/usr/src/kernel-headers-${_kernver}
install -Dm644 .config ${DESTDIR}/boot/config-${_kernver}
install -Dm644 arch/x86/boot/bzImage \
${DESTDIR}/boot/vmlinuz-${_kernver}
install -Dm644 System.map \
${DESTDIR}/boot/System.map-${_kernver}
# Switch to /usr.
vmkdir usr
mv ${DESTDIR}/lib ${DESTDIR}/usr
cd ${DESTDIR}/usr/lib/modules/${_kernver}
rm -f source build
ln -sf ../../../src/kernel-headers-${_kernver} build
cd ${wrksrc}
# Install required headers to build external modules
install -Dm644 Makefile ${hdrdest}/Makefile
install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
install -Dm644 .config ${hdrdest}/.config
mkdir -p ${hdrdest}/include
# Remove firmware stuff provided by the "linux-firmware" pkg.
rm -rf ${DESTDIR}/usr/lib/firmware
for i in acpi asm-generic config crypto drm generated linux math-emu \
media net pcmcia scsi sound trace uapi video xen; do
if [ -d include/$i ]; then
cp -a include/$i ${hdrdest}/include
fi
done
cd ${wrksrc}
mkdir -p ${hdrdest}/arch/x86
cp -a arch/x86/include ${hdrdest}/arch/x86
# Copy files necessary for later builds, like nvidia and vmware
cp Module.symvers ${hdrdest}
cp -a scripts ${hdrdest}
mkdir -p ${hdrdest}/arch/x86/kernel
cp arch/x86/Makefile ${hdrdest}/arch/x86
if [ "$arch" = "i386" ]; then
cp arch/x86/Makefile_32.cpu ${hdrdest}/arch/x86
fi
cp arch/x86/kernel/asm-offsets.s ${hdrdest}/arch/x86/kernel
# add headers for lirc package
# pci
for i in bt8xx cx88 saa7134; do
mkdir -p ${hdrdest}/drivers/media/pci/${i}
cp -a drivers/media/pci/${i}/*.h ${hdrdest}/drivers/media/pci/${i}
done
# usb
for i in cpia2 em28xx pwc; do
mkdir -p ${hdrdest}/drivers/media/usb/${i}
cp -a drivers/media/usb/${i}/*.h ${hdrdest}/drivers/media/usb/${i}
done
# i2c
mkdir -p ${hdrdest}/drivers/media/i2c
cp drivers/media/i2c/*.h ${hdrdest}/drivers/media/i2c
for i in cx25840; do
mkdir -p ${hdrdest}/drivers/media/i2c/${i}
cp -a drivers/media/i2c/${i}/*.h ${hdrdest}/drivers/media/i2c/${i}
done
# Add docbook makefile
install -Dm644 Documentation/DocBook/Makefile \
${hdrdest}/Documentation/DocBook/Makefile
# Add md headers
mkdir -p ${hdrdest}/drivers/md
cp drivers/md/*.h ${hdrdest}/drivers/md
# Add inotify.h
mkdir -p ${hdrdest}/include/linux
cp include/linux/inotify.h ${hdrdest}/include/linux
# Add wireless headers
mkdir -p ${hdrdest}/net/mac80211/
cp net/mac80211/*.h ${hdrdest}/net/mac80211
# add dvb headers for external modules
mkdir -p ${hdrdest}/drivers/media/dvb-core
cp drivers/media/dvb-core/*.h ${hdrdest}/drivers/media/dvb-core/
mkdir -p ${hdrdest}/include/config/dvb/
cp include/config/dvb/*.h ${hdrdest}/include/config/dvb/
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
mkdir -p ${hdrdest}/drivers/media/dvb-frontends
cp drivers/media/dvb-frontends/lgdt330x.h \
${hdrdest}/drivers/media/dvb-frontends/
cp drivers/media/i2c/msp3400-driver.h ${hdrdest}/drivers/media/i2c/
# add dvb headers
mkdir -p ${hdrdest}/drivers/media/usb/dvb-usb
cp drivers/media/usb/dvb-usb/*.h ${hdrdest}/drivers/media/usb/dvb-usb/
mkdir -p ${hdrdest}/drivers/media/dvb-frontends
cp drivers/media/dvb-frontends/*.h ${hdrdest}/drivers/media/dvb-frontends/
mkdir -p ${hdrdest}/drivers/media/tuners
cp drivers/media/tuners/*.h ${hdrdest}/drivers/media/tuners/
# Add xfs and shmem for aufs building
mkdir -p ${hdrdest}/fs/xfs
mkdir -p ${hdrdest}/mm
cp fs/xfs/xfs_sb.h ${hdrdest}/fs/xfs/xfs_sb.h
# Copy in Kconfig files
for i in $(find . -name "Kconfig*"); do
mkdir -p ${hdrdest}/$(echo $i | sed 's|/Kconfig.*||')
cp $i ${hdrdest}/$i
done
# Remove unneeded architectures
for arch in alpha arm* avr32 blackfin cris frv h8300 \
ia64 m* p* s* um v850 xtensa; do
rm -rf ${hdrdest}/arch/${arch}
done
# Compress all modules with gzip to save a few MBs.
msg_normal "$pkgver: compressing kernel modules with gzip, please wait...\n"
find ${DESTDIR} -name '*.ko' -exec gzip -9 {} \;
# ... and run depmod again.
depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
}
linux3.16-ck-headers_package() {
preserve=yes
nostrip=yes
noverifyrdeps=yes
short_desc+=" - source headers for 3rd party modules"
pkg_install() {
vmove usr/src
vmove usr/lib/modules/${_kernver}/build
}
}