서버 커널설정 파일 및 archlinux aur package 관련 파일 추가
This commit is contained in:
parent
091912aae2
commit
bf0a291b13
|
@ -0,0 +1,515 @@
|
||||||
|
# Maintainer: xduugu
|
||||||
|
_pkgext=-spica
|
||||||
|
pkgbase=linux$_pkgext
|
||||||
|
pkgname=$pkgbase
|
||||||
|
|
||||||
|
# required by AUR
|
||||||
|
# comment the following line to build a single package containing the kernel and the headers
|
||||||
|
(( 1 )) && pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
|
||||||
|
pkgdesc="The Linux Kernel and modules from Linus' git tree"
|
||||||
|
depends=('coreutils' 'linux-firmware-git' 'mkinitcpio')
|
||||||
|
|
||||||
|
pkgver=4.5.rc4
|
||||||
|
pkgrel=1
|
||||||
|
url="http://www.kernel.org/"
|
||||||
|
arch=(i686 x86_64)
|
||||||
|
license=('GPL2')
|
||||||
|
makedepends=(git bc)
|
||||||
|
options=(!strip)
|
||||||
|
source=($pkgname::git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git)
|
||||||
|
md5sums=('SKIP')
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
# set _gitrev to a git revision (man gitrevisions) like a tag, a commit sha1
|
||||||
|
# hash or a branch name to build from this tree instead of master
|
||||||
|
|
||||||
|
_gitrev="v4.4"
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
# KERNEL CONFIG FILES
|
||||||
|
#
|
||||||
|
# This PKGBUILD searches for config files in the current directory
|
||||||
|
# and will use the first one it finds from the following
|
||||||
|
# list as base configuration:
|
||||||
|
# config.local
|
||||||
|
# config.saved.$CARCH
|
||||||
|
# config.$CARCH
|
||||||
|
#
|
||||||
|
####################################################################
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# PATCHES
|
||||||
|
#
|
||||||
|
# This package builds the vanilla git kernel by default,
|
||||||
|
# but it is possible to patch the source without modifying
|
||||||
|
# this PKGBUILD.
|
||||||
|
#
|
||||||
|
# Simply create a directory 'patches' in your PKGBUILD
|
||||||
|
# directory and _any_ file (dotfiles excluded) in this
|
||||||
|
# folder will be applied to the kernel source.
|
||||||
|
#
|
||||||
|
# Prefixing the patch file names with dots will obviously
|
||||||
|
# excluded them from the patching process.
|
||||||
|
#
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# CONFIGURATION
|
||||||
|
#
|
||||||
|
# Uncomment desired options
|
||||||
|
#############################
|
||||||
|
#_make_modules=0
|
||||||
|
|
||||||
|
MAKEFLAGS="-j $(expr $(cat /proc/cpuinfo |grep processor |wc -l) \* 2)"
|
||||||
|
#######
|
||||||
|
# Set to e.g. menuconfig, xconfig or gconfig
|
||||||
|
#
|
||||||
|
# For a full list of supported commands, please have a look
|
||||||
|
# at "Configuration targets" section of `make help`'s output
|
||||||
|
# or the help target in scripts/kconfig/Makefile
|
||||||
|
# http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=scripts/kconfig/Makefile
|
||||||
|
#
|
||||||
|
# If unset or set to an empty or space-only string, the
|
||||||
|
# (manual) kernel configuration step will be skipped.
|
||||||
|
#
|
||||||
|
_config_cmd="${_config_cmd:-menuconfig}"
|
||||||
|
#_config_cmd="${_config_cmd:-oldconfig}"
|
||||||
|
|
||||||
|
|
||||||
|
#######
|
||||||
|
# Stop build process after kernel configuration
|
||||||
|
#
|
||||||
|
# This option enables _save_config implicitly.
|
||||||
|
#
|
||||||
|
# _configure_only=1
|
||||||
|
|
||||||
|
|
||||||
|
#######
|
||||||
|
# Append the date to the localversion
|
||||||
|
#
|
||||||
|
# e.g. -ARCH -> -ARCH-20090422
|
||||||
|
#
|
||||||
|
# _date_localversion=1
|
||||||
|
|
||||||
|
|
||||||
|
#######
|
||||||
|
# Save the .config file to package directory
|
||||||
|
# as config.saved.$CARCH
|
||||||
|
#
|
||||||
|
_save_config=1
|
||||||
|
|
||||||
|
|
||||||
|
#######
|
||||||
|
# Do not compress kernel modules
|
||||||
|
#
|
||||||
|
# _no_modules_compression=1
|
||||||
|
|
||||||
|
|
||||||
|
#######
|
||||||
|
# Make the kernel build process verbose
|
||||||
|
#
|
||||||
|
# _verbose=1
|
||||||
|
|
||||||
|
|
||||||
|
# internal variables
|
||||||
|
(( 1 )) && _kernel_src="$pkgname"
|
||||||
|
#(( 1 )) && _kernel_src="$BUILDDIR/$(find . -maxdepth 1 -type d -name "linux-*" -printf "%f\n" | head -1)"
|
||||||
|
|
||||||
|
#######
|
||||||
|
# define required functions
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$_kernel_src"
|
||||||
|
git describe --always | sed 's/^v//;s/-/./g'
|
||||||
|
}
|
||||||
|
|
||||||
|
# single package
|
||||||
|
package() {
|
||||||
|
eval package_$pkgbase-headers
|
||||||
|
eval package_$pkgbase
|
||||||
|
}
|
||||||
|
|
||||||
|
# split package functions
|
||||||
|
eval "package_$pkgbase() { _generic_package_linux; }"
|
||||||
|
eval "package_$pkgbase-headers() { _generic_package_linux-headers; }"
|
||||||
|
eval "package_$pkgbase-docs() { _generic_package_linux-docs; }"
|
||||||
|
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# where the magic happens...
|
||||||
|
##############################
|
||||||
|
build() {
|
||||||
|
cd "$_kernel_src"
|
||||||
|
msg "Sanitizing source tree.."
|
||||||
|
[[ -n $_gitrev ]] && git reset --hard "$_gitrev"
|
||||||
|
# cleaning source trees
|
||||||
|
git clean -f
|
||||||
|
|
||||||
|
#################
|
||||||
|
# Apply patches
|
||||||
|
#################
|
||||||
|
msg "Applying patches..."
|
||||||
|
local i patches
|
||||||
|
for i in "${source[@]}"; do
|
||||||
|
i=${i##*/}
|
||||||
|
[[ $i =~ .*\.patch$ ]] && patches=("${patches[@]}" "$srcdir/$i")
|
||||||
|
[[ ${i%.*} =~ .*\.patch$ ]] && patches=("${patches[@]}" "$srcdir/${i%.*}")
|
||||||
|
done
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
for i in "${patches[@]}" "$startdir/patches/"*; do
|
||||||
|
msg2 "Applying ${i##*/}..."
|
||||||
|
patch -Np1 -i "$i" || (error "Applying ${i##*/} failed" && return 1)
|
||||||
|
done
|
||||||
|
shopt -u nullglob
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
# CONFIGURATION
|
||||||
|
#################
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Loading configuration
|
||||||
|
#########################
|
||||||
|
msg "Loading configuration..."
|
||||||
|
for i in local "saved.$CARCH" "$CARCH"; do
|
||||||
|
if [[ -e $startdir/config.$i ]]; then
|
||||||
|
msg2 "Using kernel config file config.$i..."
|
||||||
|
cp -f "$startdir/config.$i" .config
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ ! -e .config ]] &&
|
||||||
|
warning "No suitable kernel config file was found. You'll have to configure the kernel from scratch."
|
||||||
|
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Start the configuration
|
||||||
|
###########################
|
||||||
|
msg "Updating configuration..."
|
||||||
|
yes "" | make config > /dev/null
|
||||||
|
|
||||||
|
if [[ -f "$startdir/config.saved.$CARCH" ]]; then
|
||||||
|
msg2 "migrating previous config..."
|
||||||
|
cp "$startdir/config.saved.$CARCH" .config
|
||||||
|
make oldconfig
|
||||||
|
else
|
||||||
|
msg2 "migrating default config..."
|
||||||
|
cp "$startdir/config.$CARCH" .config
|
||||||
|
make oldconfig
|
||||||
|
fi
|
||||||
|
if [[ -n ${_config_cmd// /} ]]; then
|
||||||
|
msg2 "Running make $_config_cmd..."
|
||||||
|
make $_config_cmd
|
||||||
|
else
|
||||||
|
warning "Unknown config command: $_config_cmd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
# Save the config file the package directory
|
||||||
|
##############################################
|
||||||
|
if [[ -n $_save_config || -n $_configure_only ]]; then
|
||||||
|
msg "Saving configuration..."
|
||||||
|
msg2 "Saving $_kernel_src/.config as $startdir/config.saved.$CARCH"
|
||||||
|
cp .config "$startdir/config.saved.$CARCH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# Stop after configuration if desired
|
||||||
|
#######################################
|
||||||
|
if [[ -n $_configure_only ]]; then
|
||||||
|
rm -rf "$srcdir" "$pkgdir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###############################
|
||||||
|
# Append date to localversion
|
||||||
|
###############################
|
||||||
|
if [[ -n $_date_localversion ]]; then
|
||||||
|
local _localversion="$(sed -rn 's/^CONFIG_LOCALVERSION="([^"]*)"$/\1/p' .config)"
|
||||||
|
[[ -n $_localversion ]] && msg2 "CONFIG_LOCALVERSION is set to: $_localversion"
|
||||||
|
|
||||||
|
# since this is a git package, the $pkgver is equal to $(date +%Y%m%d)
|
||||||
|
msg2 "Appending $pkgver to CONFIG_LOCALVERSION..."
|
||||||
|
sed -ri "s/^(CONFIG_LOCALVERSION=).*$/\1\"$_localversion-$pkgver\"/" .config
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
####################################
|
||||||
|
# Append pkgrel to kernel version
|
||||||
|
####################################
|
||||||
|
sed -ri "s/^(EXTRAVERSION =).*$/\1 -$pkgrel/" Makefile
|
||||||
|
|
||||||
|
|
||||||
|
####################################
|
||||||
|
# don't run depmod on 'make install'
|
||||||
|
####################################
|
||||||
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
git update-index --assume-unchanged scripts/depmod.sh
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
# BUILD PROCESS
|
||||||
|
#################
|
||||||
|
|
||||||
|
################################
|
||||||
|
# Build the kernel and modules
|
||||||
|
################################
|
||||||
|
msg "Building kernel and modules..."
|
||||||
|
if [[ -n $_make_modules ]]; then
|
||||||
|
make $MAKEFLAGS V="$_verbose" bzImage modules
|
||||||
|
else
|
||||||
|
make $MAKEFLAGS V="$_verbose" bzImage
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_generic_package_initialization() {
|
||||||
|
cd "$srcdir/${_kernel_src##*/}"
|
||||||
|
|
||||||
|
_karch="x86"
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Get kernel version
|
||||||
|
######################
|
||||||
|
_kernver=$(make kernelrelease)
|
||||||
|
_basekernver=${_kernver%%-*}
|
||||||
|
}
|
||||||
|
|
||||||
|
_generic_package_linux() {
|
||||||
|
pkgdesc="The Linux Kernel and modules from Linus' git tree"
|
||||||
|
backup=(etc/mkinitcpio.d/$pkgname.preset)
|
||||||
|
install=$pkgname.install
|
||||||
|
changelog=$pkgname.changelog
|
||||||
|
|
||||||
|
# set required variables
|
||||||
|
_generic_package_initialization
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# Provide linux
|
||||||
|
# (probably someone wants to use this kernel exclusively?)
|
||||||
|
#############################################################
|
||||||
|
provides=("${provides[@]}" "linux=${_kernver//-/_}")
|
||||||
|
|
||||||
|
################
|
||||||
|
# INSTALLATION
|
||||||
|
################
|
||||||
|
|
||||||
|
#####################
|
||||||
|
# Install the image
|
||||||
|
#####################
|
||||||
|
msg "Installing kernel image..."
|
||||||
|
install -Dm644 arch/$_karch/boot/bzImage "$pkgdir/boot/vmlinuz-$pkgname"
|
||||||
|
|
||||||
|
|
||||||
|
##########################
|
||||||
|
# Install kernel modules
|
||||||
|
##########################
|
||||||
|
msg "Installing kernel modules..."
|
||||||
|
if [[ -n $_make_modules ]]; then
|
||||||
|
# force -j1 to work around make 3.82 bug
|
||||||
|
make -j1 INSTALL_MOD_PATH="$pkgdir/usr" modules_install
|
||||||
|
[[ -z $_no_modules_compression ]] && find "$pkgdir" -name "*.ko" -exec gzip -9 {} +
|
||||||
|
|
||||||
|
#########################################################
|
||||||
|
# Set up extramodules directory (for external modules)
|
||||||
|
#########################################################
|
||||||
|
local extramodules="$pkgdir/usr/lib/modules/extramodules-$(cut -d. -f1,2 <<<$_basekernver)"
|
||||||
|
local modversion=$(grep '^CONFIG_LOCALVERSION=' .config | cut -d'"' -f2)
|
||||||
|
[[ -n $modversion ]] && extramodules+=$modversion
|
||||||
|
install -dm755 "${extramodules}${_pkgext}"
|
||||||
|
echo $_kernver > "${extramodules}${_pkgext}/version"
|
||||||
|
ln -s "../${extramodules##*/}${_pkgext}" "$pkgdir/usr/lib/modules/$_kernver/extramodules"
|
||||||
|
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# Create important symlinks
|
||||||
|
##################################
|
||||||
|
msg "Creating important symlinks..."
|
||||||
|
|
||||||
|
# Create generic modules symlink
|
||||||
|
if [[ $_kernver != ${_basekernver}${_pkgext} ]]; then
|
||||||
|
cd "$pkgdir/usr/lib/modules"
|
||||||
|
ln -s "$_kernver" "${_basekernver}${_pkgext}"
|
||||||
|
cd "$OLDPWD"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove header symlinks
|
||||||
|
cd "$pkgdir/usr/lib/modules/$_kernver"
|
||||||
|
rm -rf source build
|
||||||
|
cd "$OLDPWD"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Install mkinitcpio files
|
||||||
|
############################
|
||||||
|
install -d "$pkgdir/etc/mkinitcpio.d"
|
||||||
|
|
||||||
|
msg "Generating $pkgname.preset..."
|
||||||
|
cat > "$pkgdir/etc/mkinitcpio.d/$pkgname.preset" <<EOF
|
||||||
|
# mkinitcpio preset file for the '$pkgname' package
|
||||||
|
|
||||||
|
ALL_config="/etc/mkinitcpio.conf"
|
||||||
|
ALL_kver="/boot/vmlinuz-$pkgname"
|
||||||
|
|
||||||
|
PRESETS=('default')
|
||||||
|
|
||||||
|
#default_config="/etc/mkinitcpio.conf"
|
||||||
|
default_image="/boot/initramfs-$pkgname.img"
|
||||||
|
COMPRESSION="lz4" # since kernel 2.6.34
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Update install file
|
||||||
|
#######################
|
||||||
|
msg "Updating install file..."
|
||||||
|
sed -ri "s/^(pkgname=).*$/\1$pkgname/" "$startdir/$pkgname.install"
|
||||||
|
sed -ri "s/^(kernver=).*$/\1$_kernver/" "$startdir/$pkgname.install"
|
||||||
|
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Remove the firmware
|
||||||
|
#######################
|
||||||
|
rm -rf "$pkgdir/usr/lib/firmware"
|
||||||
|
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Run depmod
|
||||||
|
#######################
|
||||||
|
if [[ -n $_make_modules ]]; then
|
||||||
|
depmod -a "$pkgdir/usr"
|
||||||
|
depmod -b "$pkgdir/usr" -F System.map "$_kernver"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
_generic_package_linux-headers() {
|
||||||
|
pkgdesc="Header files and scripts for building modules for $pkgbase"
|
||||||
|
depends=("$pkgbase")
|
||||||
|
|
||||||
|
# set required variables
|
||||||
|
_generic_package_initialization
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# Provide linux-headers
|
||||||
|
# (probably someone wants to use this kernel exclusively?)
|
||||||
|
#############################################################
|
||||||
|
provides=("${provides[@]}" "linux-headers=${_kernver//-/_}")
|
||||||
|
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# Install fake kernel source
|
||||||
|
##############################
|
||||||
|
install -Dm644 Module.symvers "$pkgdir/usr/src/linux-$_kernver/Module.symvers"
|
||||||
|
install -Dm644 Makefile "$pkgdir/usr/src/linux-$_kernver/Makefile"
|
||||||
|
install -Dm644 kernel/Makefile "$pkgdir/usr/src/linux-$_kernver/kernel/Makefile"
|
||||||
|
install -Dm644 .config "$pkgdir/usr/src/linux-$_kernver/.config"
|
||||||
|
install -Dm644 .config "$pkgdir/usr/lib/modules/$_kernver/.config"
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
# Install scripts directory and fix permissions on it
|
||||||
|
#######################################################
|
||||||
|
cp -a scripts "$pkgdir/usr/src/linux-$_kernver"
|
||||||
|
|
||||||
|
|
||||||
|
##########################
|
||||||
|
# Install header files
|
||||||
|
##########################
|
||||||
|
msg "Installing header files..."
|
||||||
|
|
||||||
|
for i in net/ipv4/netfilter/ipt_CLUSTERIP.c \
|
||||||
|
$(find include/ net/mac80211/ drivers/md -iname "*.h") \
|
||||||
|
$(find include/config/ -type f) \
|
||||||
|
$(find . -name "Kconfig*")
|
||||||
|
do
|
||||||
|
mkdir -p "$pkgdir/usr/src/linux-$_kernver/${i%/*}"
|
||||||
|
cp -af "$i" "$pkgdir/usr/src/linux-$_kernver/$i"
|
||||||
|
done
|
||||||
|
|
||||||
|
# required by virtualbox and probably others
|
||||||
|
ln -s "../generated/autoconf.h" "$pkgdir/usr/src/linux-$_kernver/include/linux/"
|
||||||
|
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# Install architecture dependent files
|
||||||
|
########################################
|
||||||
|
msg "Installing architecture files..."
|
||||||
|
mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/kernel"
|
||||||
|
cp -a arch/$_karch/kernel/asm-offsets.s "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/kernel/"
|
||||||
|
|
||||||
|
cp -a arch/$_karch/Makefile* "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/"
|
||||||
|
cp -a arch/$_karch/configs "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/"
|
||||||
|
|
||||||
|
# copy arch includes for external modules and fix the nVidia issue
|
||||||
|
mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$_karch"
|
||||||
|
cp -a "arch/$_karch/include" "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/"
|
||||||
|
|
||||||
|
# create a necessary symlink to the arch folder
|
||||||
|
cd "$pkgdir/usr/src/linux-$_kernver/arch"
|
||||||
|
|
||||||
|
if [[ $CARCH = "x86_64" ]]; then
|
||||||
|
ln -s $_karch x86_64
|
||||||
|
else
|
||||||
|
ln -s $_karch i386
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$OLDPWD"
|
||||||
|
|
||||||
|
|
||||||
|
################################
|
||||||
|
# Remove unneeded architecures
|
||||||
|
################################
|
||||||
|
msg "Removing unneeded architectures..."
|
||||||
|
for i in "$pkgdir/usr/src/linux-$_kernver/arch/"*; do
|
||||||
|
[[ ${i##*/} =~ ($_karch|Kconfig) ]] || rm -rf "$i"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Remove .gitignore files
|
||||||
|
############################
|
||||||
|
msg "Removing .gitignore files from kernel source..."
|
||||||
|
find "$pkgdir/usr/src/linux-$_kernver/" -name ".gitignore" -delete
|
||||||
|
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# Create important symlinks
|
||||||
|
##################################
|
||||||
|
msg "Creating important symlinks..."
|
||||||
|
|
||||||
|
# the build symlink needs to be relative
|
||||||
|
cd "$pkgdir/usr/lib/modules/$_kernver"
|
||||||
|
rm -rf source build
|
||||||
|
ln -s "/usr/src/linux-$_kernver" build
|
||||||
|
cd "$OLDPWD"
|
||||||
|
|
||||||
|
if [[ $_kernver != ${_basekernver}${_pkgext} ]]; then
|
||||||
|
cd "$pkgdir/usr/src"
|
||||||
|
ln -s "linux-$_kernver" "linux-${_basekernver}${_pkgext}"
|
||||||
|
cd "$OLDPWD"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_generic_package_linux-docs() {
|
||||||
|
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
|
||||||
|
depends=("$pkgbase")
|
||||||
|
|
||||||
|
# set required variables
|
||||||
|
_generic_package_initialization
|
||||||
|
|
||||||
|
mkdir -p "$pkgdir/usr/src/linux-$_kernver"
|
||||||
|
cp -aL Documentation "$pkgdir/usr/src/linux-$_kernver/"
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: set fenc=utf-8 ts=2 sw=2 noet:
|
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
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,163 @@
|
||||||
|
2013-07-20
|
||||||
|
* added CONFIG_SND_HDA_I915=y to kernel config
|
||||||
|
* updated kernel config files to latest linux configs (3.10.1-1)
|
||||||
|
2013-04-15
|
||||||
|
* adjusted PKGBUILD to make use of pacman 4.1's vcs functionality
|
||||||
|
* updated kernel config files to latest linux configs (3.8.7-1)
|
||||||
|
2013-03-28
|
||||||
|
* added bc to makedepends
|
||||||
|
* updated kernel config files to latest linux configs (3.8.4-1)
|
||||||
|
2012-12-12
|
||||||
|
* updated kernel config files to latest linux configs (3.7-1)
|
||||||
|
2012-09-12
|
||||||
|
* added support for arch's kmod 10-1 package (thanks to gun26)
|
||||||
|
* updated kernel config files to latest linux configs (3.5.3-1)
|
||||||
|
2012-07-22
|
||||||
|
* unpatched kernels do not get the -dirty suffix appended to their version anymore
|
||||||
|
* updated kernel config files to latest linux configs (3.5.0-1)
|
||||||
|
2012-07-04
|
||||||
|
* updated kernel config files to latest linux configs (3.4.1-1)
|
||||||
|
* modules are now installed to /usr/lib instead of /lib
|
||||||
|
2012-03-19
|
||||||
|
* updated kernel config files to latest linux configs (3.3-1)
|
||||||
|
2012-01-05
|
||||||
|
* updated kernel config files to latest linux configs (3.2-1)
|
||||||
|
2011-11-05
|
||||||
|
* fixed kernel version in extramodules directory name (thanks to gun26)
|
||||||
|
2011-10-31
|
||||||
|
* removed System.map file (https://bugs.archlinux.org/task/25247)
|
||||||
|
* added extramodules directory (might not be very useful for git kernels,
|
||||||
|
but for stable ones)
|
||||||
|
* append pkgrel to kernel version for stable kernels
|
||||||
|
* updated kernel config files to latest linux configs (3.1-1)
|
||||||
|
2011-07-24
|
||||||
|
* new variable _gitrev that can be used to build a sepcific tag, commit or branch
|
||||||
|
* reworked mkinitcpio preset file
|
||||||
|
* removed kernel26{,-headers} from provides array because arch's linux
|
||||||
|
package conflicts with these
|
||||||
|
2011-07-23
|
||||||
|
* disabled file stripping
|
||||||
|
* renamed initramfs file from /boot/$pkgname.img to /boot/initramfs-$pkgname.img
|
||||||
|
* updated kernel config files to latest linux configs (3.0-1)
|
||||||
|
2011-07-22
|
||||||
|
* make sure the src directory is moved to $srcdir after finishing the build
|
||||||
|
step when the _build_dir config option is in use
|
||||||
|
* changed repository source url to linux.git (was linux-2.6.git) as a
|
||||||
|
result of the 3.0 release
|
||||||
|
2011-07-13
|
||||||
|
* fixed issue with mkinitcpio that led to broken images because the kernel
|
||||||
|
modules could not be found (solved by running depmod before mkinitcpio)
|
||||||
|
* removed kver file
|
||||||
|
* removed arch linux logo
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.39.3-1)
|
||||||
|
2011-05-30
|
||||||
|
* renamed kernel26-git to linux-git
|
||||||
|
* worked around make 3.82 bug
|
||||||
|
2011-05-25
|
||||||
|
* make kernel26$_pkgext-{headers,docs} depend on $pkgbase and not on itself
|
||||||
|
2011-05-24
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.39-1)
|
||||||
|
2011-01-31
|
||||||
|
* reworked kernel header package generation
|
||||||
|
* support for split (default) and single package kernels
|
||||||
|
* added -docs package
|
||||||
|
* honour MAKEFLAGS
|
||||||
|
2011-01-30
|
||||||
|
* compress kernel modules by default
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.37-5)
|
||||||
|
* added crypto and xen headers
|
||||||
|
2010-10-05
|
||||||
|
* Kconfig file was unintentionally removed from /usr/src/linux-$kver/arch (thanks to Kariddi)
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.35.7)
|
||||||
|
2010-08-18
|
||||||
|
* removed zc0301 from header copy list (driver was removed: 0d58cef664e01fb1848833455bfdbe1a3d91044c)
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.35.2)
|
||||||
|
2010-06-17
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.34)
|
||||||
|
* replaced kernel26-firmware-git dependency with linux-firmware-git
|
||||||
|
* introduced new variable _kernel_src that contains the directory where the
|
||||||
|
kernel is acutally built
|
||||||
|
2010-04-07
|
||||||
|
* make config options configurable via command line
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.33.2)
|
||||||
|
* removed /boot/kconfig26$_pkgext
|
||||||
|
* replaced dynamic kernel version detection with a static string which is
|
||||||
|
updated at build time
|
||||||
|
* generate the *.preset file from the PKGBUILD
|
||||||
|
* introduced new variable _pkgext to make it easier to adapt this PKGBUILD
|
||||||
|
to other kernel sources
|
||||||
|
2010-01-12
|
||||||
|
* fixed abort when patches directory exists but is empty
|
||||||
|
2009-12-24
|
||||||
|
* included some new required kernel header files
|
||||||
|
* save build directory to $srcdir when building without makepkg's -c flag
|
||||||
|
and if $_build_dir != $srcdir
|
||||||
|
* fixed kernel version detection in install file (again... replaced `\s`
|
||||||
|
with `[:space:]`)
|
||||||
|
2009-12-22
|
||||||
|
* fixed kernel version detection in install file
|
||||||
|
* removed asm-$_karch references
|
||||||
|
* some code cleanup
|
||||||
|
2009-12-05
|
||||||
|
* added kernel26-headers to provides
|
||||||
|
2009-12-04
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.32)
|
||||||
|
* reworked install scriptlet
|
||||||
|
2009-11-13
|
||||||
|
* added support for all available configuration commands of the kernel
|
||||||
|
* cleaned up the code
|
||||||
|
2009-10-25
|
||||||
|
* added changelog variable for pacman's next major release
|
||||||
|
* make use of new package function to reduce fakeroot usage
|
||||||
|
* added a warning about initial download size
|
||||||
|
2009-10-09
|
||||||
|
* removed .gitignore files from source tree
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.31.3)
|
||||||
|
2009-09-10
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.31)
|
||||||
|
2009-08-15
|
||||||
|
* added CONFIG_MEDIA_SUPPORT=m to config files
|
||||||
|
2009-08-14
|
||||||
|
* Since pacman 3.3.0, makepkg starts in $srcdir and not in $startdir
|
||||||
|
anymore. In order to get the kernel sources into $startdir again, it
|
||||||
|
is required to change to this directory
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.30.4)
|
||||||
|
2009-06-11
|
||||||
|
* updated kernel config files to latest kernel26 configs (2.6.30)
|
||||||
|
2009-04-26
|
||||||
|
* added new configure option _build_dir
|
||||||
|
* moved the 'patches' folder from $srcdir to $startdir
|
||||||
|
* moved the git repository clone from $srcdir to $startdir
|
||||||
|
* made the linux-2.6 directory a bare repository, which reduces the folder
|
||||||
|
size by more than the half
|
||||||
|
* renamed cloned git repository from kernel26-git to linux-2.6.git
|
||||||
|
2009-04-24
|
||||||
|
* documented configure option _verbose which makes the kernel building
|
||||||
|
process verbose
|
||||||
|
* added a check for an existing package when using _kernel_pkgver to avoid
|
||||||
|
silent overwrites
|
||||||
|
* cleaned up the PKGBUILD
|
||||||
|
* remove the git changelog generation functionality
|
||||||
|
* replace dashes in kernel version with underscores instead of periods
|
||||||
|
* separate date from localversion by a dash when using _date_localversion
|
||||||
|
* provide kernel26
|
||||||
|
* some more documentation
|
||||||
|
2009-04-22
|
||||||
|
* use arch's kernel config files as default
|
||||||
|
* removed patches
|
||||||
|
* added possibility to patch the source without modifying the PKGBUILD
|
||||||
|
* started to make PKGBUILD more readable
|
||||||
|
* documented PKGBUILD configure options
|
||||||
|
* introduced new configure option '_configure_only' which stops the building
|
||||||
|
process after the kernel configuration
|
||||||
|
2009-04-21
|
||||||
|
* moved firmware from package into new dependency kernel26-firmware-git,
|
||||||
|
which makes it possible to install kernel26-git beside arch's stock kernel
|
||||||
|
* fetch latest git changes when there is already a local repository
|
||||||
|
* added some "|| return 1"
|
||||||
|
* kernel26-git.install: extract required kernel version from package files
|
||||||
|
rather than specify it explicitly
|
||||||
|
* renamed config to config.i686
|
||||||
|
* replaced $startdir with $srcdir and $pkgdir
|
||||||
|
* added quotes where necessary
|
||||||
|
* cleaned up the checkout part
|
|
@ -0,0 +1,37 @@
|
||||||
|
pkgname=linux-spica
|
||||||
|
kernver=4.4.0-1spica-dirty
|
||||||
|
#bootdevice="BOOT_IMAGE=/boot/vmlinuz-$pkgname root=UUID=d670564f-2cb3-4981-9d51-6ed9c1327d47"
|
||||||
|
#option="rw quiet clocksource=hpet initrd=EFI/spi-ca/initrd intel_iommu=on pci-stub.ids=1002:683f,1002:aab0 vfio_iommu_type1.allow_unsafe_interrupts=1,kvm.ignore_msrs=1"
|
||||||
|
#option="rw quiet clocksource=hpet initrd=EFI/spi-ca/initrd quiet intremap=no_x2apic_optout zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4"
|
||||||
|
post_install () {
|
||||||
|
echo ">"
|
||||||
|
echo "> Updating module dependencies. Please wait ..."
|
||||||
|
depmod $kernver
|
||||||
|
|
||||||
|
echo ">"
|
||||||
|
echo "> Generating initramfs, using mkinitcpio. Please wait..."
|
||||||
|
echo ">"
|
||||||
|
mkinitcpio -p $pkgname
|
||||||
|
echo "> Modifing efibootmgr..."
|
||||||
|
efibootmgr|awk 'match($0,/^Boot([0-9a-fA-F]{4})\* spi-ca_v(.+)$/,m){printf "efibootmgr -b %s -B;echo \">> remove entry : %s\";",m[1],m[2]}'|sh
|
||||||
|
echo "> Copy efistub from boot"
|
||||||
|
cp -fv "boot/vmlinuz-$pkgname" "boot/efi/EFI/spi-ca/kernel.efi"
|
||||||
|
cp -fv "boot/initramfs-$pkgname.img" "boot/efi/EFI/spi-ca/initrd"
|
||||||
|
echo "> Registering efistub "
|
||||||
|
#echo 'efibootmgr -c -g -d /dev/sda -p 1 -L "spi-ca_v$kernver" -l "\EFI\spi-ca\kernel.efi" #-u "$bootdevice $option"'
|
||||||
|
efibootmgr -c -g -d /dev/sde -p 1 -L "spi-ca_v$kernver" -l "\EFI\spi-ca\kernel" # -u "$bootdevice $option"
|
||||||
|
echo "> Reordering Bootorder..."
|
||||||
|
newentry=`efibootmgr|awk 'match($0,/^Boot([0-9a-fA-F]{4})\* spi-ca_v(.+)$/,m){print m[1]}'`
|
||||||
|
prebootorder=`efibootmgr |grep BootOrder |cut -d : -f 2 |tr -d ' '`
|
||||||
|
efibootmgr -O
|
||||||
|
efibootmgr -o ${newentry},${prebootorder}
|
||||||
|
echo "> OK!"
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
post_install
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
rm -f -- "boot/initramfs-$pkgname.img"
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
From d54aac68a9655574a91e6d224300aba239ea58cc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paolo Valente <paolo.valente@unimore.it>
|
||||||
|
Date: Tue, 7 Apr 2015 13:39:12 +0200
|
||||||
|
Subject: [PATCH 1/3] block: cgroups, kconfig, build bits for BFQ-v7r10-4.4.0
|
||||||
|
|
||||||
|
Update Kconfig.iosched and do the related Makefile changes to include
|
||||||
|
kernel configuration options for BFQ. Also increase the number of
|
||||||
|
policies supported by the blkio controller so that BFQ can add its
|
||||||
|
own.
|
||||||
|
|
||||||
|
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
|
||||||
|
Signed-off-by: Arianna Avanzini <avanzini@google.com>
|
||||||
|
---
|
||||||
|
block/Kconfig.iosched | 32 ++++++++++++++++++++++++++++++++
|
||||||
|
block/Makefile | 1 +
|
||||||
|
include/linux/blkdev.h | 2 +-
|
||||||
|
3 files changed, 34 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched
|
||||||
|
index 421bef9..0ee5f0f 100644
|
||||||
|
--- a/block/Kconfig.iosched
|
||||||
|
+++ b/block/Kconfig.iosched
|
||||||
|
@@ -39,6 +39,27 @@ config CFQ_GROUP_IOSCHED
|
||||||
|
---help---
|
||||||
|
Enable group IO scheduling in CFQ.
|
||||||
|
|
||||||
|
+config IOSCHED_BFQ
|
||||||
|
+ tristate "BFQ I/O scheduler"
|
||||||
|
+ default n
|
||||||
|
+ ---help---
|
||||||
|
+ The BFQ I/O scheduler tries to distribute bandwidth among
|
||||||
|
+ all processes according to their weights.
|
||||||
|
+ It aims at distributing the bandwidth as desired, independently of
|
||||||
|
+ the disk parameters and with any workload. It also tries to
|
||||||
|
+ guarantee low latency to interactive and soft real-time
|
||||||
|
+ applications. If compiled built-in (saying Y here), BFQ can
|
||||||
|
+ be configured to support hierarchical scheduling.
|
||||||
|
+
|
||||||
|
+config CGROUP_BFQIO
|
||||||
|
+ bool "BFQ hierarchical scheduling support"
|
||||||
|
+ depends on CGROUPS && IOSCHED_BFQ=y
|
||||||
|
+ default n
|
||||||
|
+ ---help---
|
||||||
|
+ Enable hierarchical scheduling in BFQ, using the cgroups
|
||||||
|
+ filesystem interface. The name of the subsystem will be
|
||||||
|
+ bfqio.
|
||||||
|
+
|
||||||
|
choice
|
||||||
|
prompt "Default I/O scheduler"
|
||||||
|
default DEFAULT_CFQ
|
||||||
|
@@ -52,6 +73,16 @@ choice
|
||||||
|
config DEFAULT_CFQ
|
||||||
|
bool "CFQ" if IOSCHED_CFQ=y
|
||||||
|
|
||||||
|
+ config DEFAULT_BFQ
|
||||||
|
+ bool "BFQ" if IOSCHED_BFQ=y
|
||||||
|
+ help
|
||||||
|
+ Selects BFQ as the default I/O scheduler which will be
|
||||||
|
+ used by default for all block devices.
|
||||||
|
+ The BFQ I/O scheduler aims at distributing the bandwidth
|
||||||
|
+ as desired, independently of the disk parameters and with
|
||||||
|
+ any workload. It also tries to guarantee low latency to
|
||||||
|
+ interactive and soft real-time applications.
|
||||||
|
+
|
||||||
|
config DEFAULT_NOOP
|
||||||
|
bool "No-op"
|
||||||
|
|
||||||
|
@@ -61,6 +92,7 @@ config DEFAULT_IOSCHED
|
||||||
|
string
|
||||||
|
default "deadline" if DEFAULT_DEADLINE
|
||||||
|
default "cfq" if DEFAULT_CFQ
|
||||||
|
+ default "bfq" if DEFAULT_BFQ
|
||||||
|
default "noop" if DEFAULT_NOOP
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
diff --git a/block/Makefile b/block/Makefile
|
||||||
|
index 00ecc97..1ed86d5 100644
|
||||||
|
--- a/block/Makefile
|
||||||
|
+++ b/block/Makefile
|
||||||
|
@@ -18,6 +18,7 @@ obj-$(CONFIG_BLK_DEV_THROTTLING) += blk-throttle.o
|
||||||
|
obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o
|
||||||
|
obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
|
||||||
|
obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o
|
||||||
|
+obj-$(CONFIG_IOSCHED_BFQ) += bfq-iosched.o
|
||||||
|
|
||||||
|
obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o
|
||||||
|
obj-$(CONFIG_BLK_CMDLINE_PARSER) += cmdline-parser.o
|
||||||
|
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
|
||||||
|
index c70e358..ae43492 100644
|
||||||
|
--- a/include/linux/blkdev.h
|
||||||
|
+++ b/include/linux/blkdev.h
|
||||||
|
@@ -44,7 +44,7 @@ struct pr_ops;
|
||||||
|
* Maximum number of blkcg policies allowed to be registered concurrently.
|
||||||
|
* Defined here to simplify include dependency.
|
||||||
|
*/
|
||||||
|
-#define BLKCG_MAX_POLS 2
|
||||||
|
+#define BLKCG_MAX_POLS 3
|
||||||
|
|
||||||
|
struct request;
|
||||||
|
typedef void (rq_end_io_fn)(struct request *, int);
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,426 @@
|
||||||
|
WARNING - this version of the patch works with version 4.9+ of gcc and with
|
||||||
|
kernel version 3.15.x+ and should NOT be applied when compiling on older
|
||||||
|
versions due to name changes of the flags with the 4.9 release of gcc.
|
||||||
|
Use the older version of this patch hosted on the same github for older
|
||||||
|
versions of gcc. For example:
|
||||||
|
|
||||||
|
corei7 --> nehalem
|
||||||
|
corei7-avx --> sandybridge
|
||||||
|
core-avx-i --> ivybridge
|
||||||
|
core-avx2 --> haswell
|
||||||
|
|
||||||
|
For more, see: https://gcc.gnu.org/gcc-4.9/changes.html
|
||||||
|
|
||||||
|
It also changes 'atom' to 'bonnell' in accordance with the gcc v4.9 changes.
|
||||||
|
Note that upstream is using the deprecated 'match=atom' flags when I believe it
|
||||||
|
should use the newer 'march=bonnell' flag for atom processors.
|
||||||
|
|
||||||
|
I have made that change to this patch set as well. See the following kernel
|
||||||
|
bug report to see if I'm right: https://bugzilla.kernel.org/show_bug.cgi?id=77461
|
||||||
|
|
||||||
|
This patch will expand the number of microarchitectures to include newer
|
||||||
|
processors including: AMD K10-family, AMD Family 10h (Barcelona), AMD Family
|
||||||
|
14h (Bobcat), AMD Family 15h (Bulldozer), AMD Family 15h (Piledriver), AMD
|
||||||
|
Family 15h (Steamroller), Family 16h (Jaguar), Intel 1st Gen Core i3/i5/i7
|
||||||
|
(Nehalem), Intel 1.5 Gen Core i3/i5/i7 (Westmere), Intel 2nd Gen Core i3/i5/i7
|
||||||
|
(Sandybridge), Intel 3rd Gen Core i3/i5/i7 (Ivybridge), Intel 4th Gen Core
|
||||||
|
i3/i5/i7 (Haswell), Intel 5th Gen Core i3/i5/i7 (Broadwell), and the low power
|
||||||
|
Silvermont series of Atom processors (Silvermont). It also offers the compiler
|
||||||
|
the 'native' flag.
|
||||||
|
|
||||||
|
Small but real speed increases are measurable using a make endpoint comparing
|
||||||
|
a generic kernel to one built with one of the respective microarchs.
|
||||||
|
|
||||||
|
See the following experimental evidence supporting this statement:
|
||||||
|
https://github.com/graysky2/kernel_gcc_patch
|
||||||
|
|
||||||
|
REQUIREMENTS
|
||||||
|
linux version >=3.15
|
||||||
|
gcc version >=4.9
|
||||||
|
|
||||||
|
--- a/arch/x86/include/asm/module.h 2015-08-30 14:34:09.000000000 -0400
|
||||||
|
+++ b/arch/x86/include/asm/module.h 2015-11-06 14:18:24.234941036 -0500
|
||||||
|
@@ -15,6 +15,24 @@
|
||||||
|
#define MODULE_PROC_FAMILY "586MMX "
|
||||||
|
#elif defined CONFIG_MCORE2
|
||||||
|
#define MODULE_PROC_FAMILY "CORE2 "
|
||||||
|
+#elif defined CONFIG_MNATIVE
|
||||||
|
+#define MODULE_PROC_FAMILY "NATIVE "
|
||||||
|
+#elif defined CONFIG_MNEHALEM
|
||||||
|
+#define MODULE_PROC_FAMILY "NEHALEM "
|
||||||
|
+#elif defined CONFIG_MWESTMERE
|
||||||
|
+#define MODULE_PROC_FAMILY "WESTMERE "
|
||||||
|
+#elif defined CONFIG_MSILVERMONT
|
||||||
|
+#define MODULE_PROC_FAMILY "SILVERMONT "
|
||||||
|
+#elif defined CONFIG_MSANDYBRIDGE
|
||||||
|
+#define MODULE_PROC_FAMILY "SANDYBRIDGE "
|
||||||
|
+#elif defined CONFIG_MIVYBRIDGE
|
||||||
|
+#define MODULE_PROC_FAMILY "IVYBRIDGE "
|
||||||
|
+#elif defined CONFIG_MHASWELL
|
||||||
|
+#define MODULE_PROC_FAMILY "HASWELL "
|
||||||
|
+#elif defined CONFIG_MBROADWELL
|
||||||
|
+#define MODULE_PROC_FAMILY "BROADWELL "
|
||||||
|
+#elif defined CONFIG_MSKYLAKE
|
||||||
|
+#define MODULE_PROC_FAMILY "SKYLAKE "
|
||||||
|
#elif defined CONFIG_MATOM
|
||||||
|
#define MODULE_PROC_FAMILY "ATOM "
|
||||||
|
#elif defined CONFIG_M686
|
||||||
|
@@ -33,6 +51,22 @@
|
||||||
|
#define MODULE_PROC_FAMILY "K7 "
|
||||||
|
#elif defined CONFIG_MK8
|
||||||
|
#define MODULE_PROC_FAMILY "K8 "
|
||||||
|
+#elif defined CONFIG_MK8SSE3
|
||||||
|
+#define MODULE_PROC_FAMILY "K8SSE3 "
|
||||||
|
+#elif defined CONFIG_MK10
|
||||||
|
+#define MODULE_PROC_FAMILY "K10 "
|
||||||
|
+#elif defined CONFIG_MBARCELONA
|
||||||
|
+#define MODULE_PROC_FAMILY "BARCELONA "
|
||||||
|
+#elif defined CONFIG_MBOBCAT
|
||||||
|
+#define MODULE_PROC_FAMILY "BOBCAT "
|
||||||
|
+#elif defined CONFIG_MBULLDOZER
|
||||||
|
+#define MODULE_PROC_FAMILY "BULLDOZER "
|
||||||
|
+#elif defined CONFIG_MPILEDRIVER
|
||||||
|
+#define MODULE_PROC_FAMILY "STEAMROLLER "
|
||||||
|
+#elif defined CONFIG_MSTEAMROLLER
|
||||||
|
+#define MODULE_PROC_FAMILY "PILEDRIVER "
|
||||||
|
+#elif defined CONFIG_MJAGUAR
|
||||||
|
+#define MODULE_PROC_FAMILY "JAGUAR "
|
||||||
|
#elif defined CONFIG_MELAN
|
||||||
|
#define MODULE_PROC_FAMILY "ELAN "
|
||||||
|
#elif defined CONFIG_MCRUSOE
|
||||||
|
--- a/arch/x86/Kconfig.cpu 2015-08-30 14:34:09.000000000 -0400
|
||||||
|
+++ b/arch/x86/Kconfig.cpu 2015-11-06 14:20:14.948369244 -0500
|
||||||
|
@@ -137,9 +137,8 @@ config MPENTIUM4
|
||||||
|
-Paxville
|
||||||
|
-Dempsey
|
||||||
|
|
||||||
|
-
|
||||||
|
config MK6
|
||||||
|
- bool "K6/K6-II/K6-III"
|
||||||
|
+ bool "AMD K6/K6-II/K6-III"
|
||||||
|
depends on X86_32
|
||||||
|
---help---
|
||||||
|
Select this for an AMD K6-family processor. Enables use of
|
||||||
|
@@ -147,7 +146,7 @@ config MK6
|
||||||
|
flags to GCC.
|
||||||
|
|
||||||
|
config MK7
|
||||||
|
- bool "Athlon/Duron/K7"
|
||||||
|
+ bool "AMD Athlon/Duron/K7"
|
||||||
|
depends on X86_32
|
||||||
|
---help---
|
||||||
|
Select this for an AMD Athlon K7-family processor. Enables use of
|
||||||
|
@@ -155,12 +154,69 @@ config MK7
|
||||||
|
flags to GCC.
|
||||||
|
|
||||||
|
config MK8
|
||||||
|
- bool "Opteron/Athlon64/Hammer/K8"
|
||||||
|
+ bool "AMD Opteron/Athlon64/Hammer/K8"
|
||||||
|
---help---
|
||||||
|
Select this for an AMD Opteron or Athlon64 Hammer-family processor.
|
||||||
|
Enables use of some extended instructions, and passes appropriate
|
||||||
|
optimization flags to GCC.
|
||||||
|
|
||||||
|
+config MK8SSE3
|
||||||
|
+ bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3"
|
||||||
|
+ ---help---
|
||||||
|
+ Select this for improved AMD Opteron or Athlon64 Hammer-family processors.
|
||||||
|
+ Enables use of some extended instructions, and passes appropriate
|
||||||
|
+ optimization flags to GCC.
|
||||||
|
+
|
||||||
|
+config MK10
|
||||||
|
+ bool "AMD 61xx/7x50/PhenomX3/X4/II/K10"
|
||||||
|
+ ---help---
|
||||||
|
+ Select this for an AMD 61xx Eight-Core Magny-Cours, Athlon X2 7x50,
|
||||||
|
+ Phenom X3/X4/II, Athlon II X2/X3/X4, or Turion II-family processor.
|
||||||
|
+ Enables use of some extended instructions, and passes appropriate
|
||||||
|
+ optimization flags to GCC.
|
||||||
|
+
|
||||||
|
+config MBARCELONA
|
||||||
|
+ bool "AMD Barcelona"
|
||||||
|
+ ---help---
|
||||||
|
+ Select this for AMD Barcelona and newer processors.
|
||||||
|
+
|
||||||
|
+ Enables -march=barcelona
|
||||||
|
+
|
||||||
|
+config MBOBCAT
|
||||||
|
+ bool "AMD Bobcat"
|
||||||
|
+ ---help---
|
||||||
|
+ Select this for AMD Bobcat processors.
|
||||||
|
+
|
||||||
|
+ Enables -march=btver1
|
||||||
|
+
|
||||||
|
+config MBULLDOZER
|
||||||
|
+ bool "AMD Bulldozer"
|
||||||
|
+ ---help---
|
||||||
|
+ Select this for AMD Bulldozer processors.
|
||||||
|
+
|
||||||
|
+ Enables -march=bdver1
|
||||||
|
+
|
||||||
|
+config MPILEDRIVER
|
||||||
|
+ bool "AMD Piledriver"
|
||||||
|
+ ---help---
|
||||||
|
+ Select this for AMD Piledriver processors.
|
||||||
|
+
|
||||||
|
+ Enables -march=bdver2
|
||||||
|
+
|
||||||
|
+config MSTEAMROLLER
|
||||||
|
+ bool "AMD Steamroller"
|
||||||
|
+ ---help---
|
||||||
|
+ Select this for AMD Steamroller processors.
|
||||||
|
+
|
||||||
|
+ Enables -march=bdver3
|
||||||
|
+
|
||||||
|
+config MJAGUAR
|
||||||
|
+ bool "AMD Jaguar"
|
||||||
|
+ ---help---
|
||||||
|
+ Select this for AMD Jaguar processors.
|
||||||
|
+
|
||||||
|
+ Enables -march=btver2
|
||||||
|
+
|
||||||
|
config MCRUSOE
|
||||||
|
bool "Crusoe"
|
||||||
|
depends on X86_32
|
||||||
|
@@ -251,8 +307,17 @@ config MPSC
|
||||||
|
using the cpu family field
|
||||||
|
in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.
|
||||||
|
|
||||||
|
+config MATOM
|
||||||
|
+ bool "Intel Atom"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ Select this for the Intel Atom platform. Intel Atom CPUs have an
|
||||||
|
+ in-order pipelining architecture and thus can benefit from
|
||||||
|
+ accordingly optimized code. Use a recent GCC with specific Atom
|
||||||
|
+ support in order to fully benefit from selecting this option.
|
||||||
|
+
|
||||||
|
config MCORE2
|
||||||
|
- bool "Core 2/newer Xeon"
|
||||||
|
+ bool "Intel Core 2"
|
||||||
|
---help---
|
||||||
|
|
||||||
|
Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
|
||||||
|
@@ -260,14 +325,71 @@ config MCORE2
|
||||||
|
family in /proc/cpuinfo. Newer ones have 6 and older ones 15
|
||||||
|
(not a typo)
|
||||||
|
|
||||||
|
-config MATOM
|
||||||
|
- bool "Intel Atom"
|
||||||
|
+ Enables -march=core2
|
||||||
|
+
|
||||||
|
+config MNEHALEM
|
||||||
|
+ bool "Intel Nehalem"
|
||||||
|
---help---
|
||||||
|
|
||||||
|
- Select this for the Intel Atom platform. Intel Atom CPUs have an
|
||||||
|
- in-order pipelining architecture and thus can benefit from
|
||||||
|
- accordingly optimized code. Use a recent GCC with specific Atom
|
||||||
|
- support in order to fully benefit from selecting this option.
|
||||||
|
+ Select this for 1st Gen Core processors in the Nehalem family.
|
||||||
|
+
|
||||||
|
+ Enables -march=nehalem
|
||||||
|
+
|
||||||
|
+config MWESTMERE
|
||||||
|
+ bool "Intel Westmere"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ Select this for the Intel Westmere formerly Nehalem-C family.
|
||||||
|
+
|
||||||
|
+ Enables -march=westmere
|
||||||
|
+
|
||||||
|
+config MSILVERMONT
|
||||||
|
+ bool "Intel Silvermont"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ Select this for the Intel Silvermont platform.
|
||||||
|
+
|
||||||
|
+ Enables -march=silvermont
|
||||||
|
+
|
||||||
|
+config MSANDYBRIDGE
|
||||||
|
+ bool "Intel Sandy Bridge"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ Select this for 2nd Gen Core processors in the Sandy Bridge family.
|
||||||
|
+
|
||||||
|
+ Enables -march=sandybridge
|
||||||
|
+
|
||||||
|
+config MIVYBRIDGE
|
||||||
|
+ bool "Intel Ivy Bridge"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ Select this for 3rd Gen Core processors in the Ivy Bridge family.
|
||||||
|
+
|
||||||
|
+ Enables -march=ivybridge
|
||||||
|
+
|
||||||
|
+config MHASWELL
|
||||||
|
+ bool "Intel Haswell"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ Select this for 4th Gen Core processors in the Haswell family.
|
||||||
|
+
|
||||||
|
+ Enables -march=haswell
|
||||||
|
+
|
||||||
|
+config MBROADWELL
|
||||||
|
+ bool "Intel Broadwell"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ Select this for 5th Gen Core processors in the Broadwell family.
|
||||||
|
+
|
||||||
|
+ Enables -march=broadwell
|
||||||
|
+
|
||||||
|
+config MSKYLAKE
|
||||||
|
+ bool "Intel Skylake"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ Select this for 6th Gen Core processors in the Skylake family.
|
||||||
|
+
|
||||||
|
+ Enables -march=skylake
|
||||||
|
|
||||||
|
config GENERIC_CPU
|
||||||
|
bool "Generic-x86-64"
|
||||||
|
@@ -276,6 +398,19 @@ config GENERIC_CPU
|
||||||
|
Generic x86-64 CPU.
|
||||||
|
Run equally well on all x86-64 CPUs.
|
||||||
|
|
||||||
|
+config MNATIVE
|
||||||
|
+ bool "Native optimizations autodetected by GCC"
|
||||||
|
+ ---help---
|
||||||
|
+
|
||||||
|
+ GCC 4.2 and above support -march=native, which automatically detects
|
||||||
|
+ the optimum settings to use based on your processor. -march=native
|
||||||
|
+ also detects and applies additional settings beyond -march specific
|
||||||
|
+ to your CPU, (eg. -msse4). Unless you have a specific reason not to
|
||||||
|
+ (e.g. distcc cross-compiling), you should probably be using
|
||||||
|
+ -march=native rather than anything listed below.
|
||||||
|
+
|
||||||
|
+ Enables -march=native
|
||||||
|
+
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config X86_GENERIC
|
||||||
|
@@ -300,7 +435,7 @@ config X86_INTERNODE_CACHE_SHIFT
|
||||||
|
config X86_L1_CACHE_SHIFT
|
||||||
|
int
|
||||||
|
default "7" if MPENTIUM4 || MPSC
|
||||||
|
- default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
|
||||||
|
+ default "6" if MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MJAGUAR || MPENTIUMM || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MNATIVE || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
|
||||||
|
default "4" if MELAN || M486 || MGEODEGX1
|
||||||
|
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
|
||||||
|
|
||||||
|
@@ -331,11 +466,11 @@ config X86_ALIGNMENT_16
|
||||||
|
|
||||||
|
config X86_INTEL_USERCOPY
|
||||||
|
def_bool y
|
||||||
|
- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
|
||||||
|
+ depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK8SSE3 || MK7 || MEFFICEON || MCORE2 || MK10 || MBARCELONA || MNEHALEM || MWESTMERE || MSILVERMONT || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MNATIVE
|
||||||
|
|
||||||
|
config X86_USE_PPRO_CHECKSUM
|
||||||
|
def_bool y
|
||||||
|
- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM
|
||||||
|
+ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MK10 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MK8SSE3 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MATOM || MNATIVE
|
||||||
|
|
||||||
|
config X86_USE_3DNOW
|
||||||
|
def_bool y
|
||||||
|
@@ -359,17 +494,17 @@ config X86_P6_NOP
|
||||||
|
|
||||||
|
config X86_TSC
|
||||||
|
def_bool y
|
||||||
|
- depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) || X86_64
|
||||||
|
+ depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MK8SSE3 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MNATIVE || MATOM) || X86_64
|
||||||
|
|
||||||
|
config X86_CMPXCHG64
|
||||||
|
def_bool y
|
||||||
|
- depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM
|
||||||
|
+ depends on X86_PAE || X86_64 || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM || MNATIVE
|
||||||
|
|
||||||
|
# this should be set for all -march=.. options where the compiler
|
||||||
|
# generates cmov.
|
||||||
|
config X86_CMOV
|
||||||
|
def_bool y
|
||||||
|
- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
|
||||||
|
+ depends on (MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MJAGUAR || MK7 || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MNATIVE || MATOM || MGEODE_LX)
|
||||||
|
|
||||||
|
config X86_MINIMUM_CPU_FAMILY
|
||||||
|
int
|
||||||
|
--- a/arch/x86/Makefile 2015-08-30 14:34:09.000000000 -0400
|
||||||
|
+++ b/arch/x86/Makefile 2015-11-06 14:21:05.708983344 -0500
|
||||||
|
@@ -94,13 +94,38 @@ else
|
||||||
|
KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
|
||||||
|
|
||||||
|
# FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
|
||||||
|
+ cflags-$(CONFIG_MNATIVE) += $(call cc-option,-march=native)
|
||||||
|
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
|
||||||
|
+ cflags-$(CONFIG_MK8SSE3) += $(call cc-option,-march=k8-sse3,-mtune=k8)
|
||||||
|
+ cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10)
|
||||||
|
+ cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona)
|
||||||
|
+ cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1)
|
||||||
|
+ cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1)
|
||||||
|
+ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2)
|
||||||
|
+ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3)
|
||||||
|
+ cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2)
|
||||||
|
cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
|
||||||
|
|
||||||
|
cflags-$(CONFIG_MCORE2) += \
|
||||||
|
- $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
|
||||||
|
- cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
|
||||||
|
- $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
|
||||||
|
+ $(call cc-option,-march=core2,$(call cc-option,-mtune=core2))
|
||||||
|
+ cflags-$(CONFIG_MNEHALEM) += \
|
||||||
|
+ $(call cc-option,-march=nehalem,$(call cc-option,-mtune=nehalem))
|
||||||
|
+ cflags-$(CONFIG_MWESTMERE) += \
|
||||||
|
+ $(call cc-option,-march=westmere,$(call cc-option,-mtune=westmere))
|
||||||
|
+ cflags-$(CONFIG_MSILVERMONT) += \
|
||||||
|
+ $(call cc-option,-march=silvermont,$(call cc-option,-mtune=silvermont))
|
||||||
|
+ cflags-$(CONFIG_MSANDYBRIDGE) += \
|
||||||
|
+ $(call cc-option,-march=sandybridge,$(call cc-option,-mtune=sandybridge))
|
||||||
|
+ cflags-$(CONFIG_MIVYBRIDGE) += \
|
||||||
|
+ $(call cc-option,-march=ivybridge,$(call cc-option,-mtune=ivybridge))
|
||||||
|
+ cflags-$(CONFIG_MHASWELL) += \
|
||||||
|
+ $(call cc-option,-march=haswell,$(call cc-option,-mtune=haswell))
|
||||||
|
+ cflags-$(CONFIG_MBROADWELL) += \
|
||||||
|
+ $(call cc-option,-march=broadwell,$(call cc-option,-mtune=broadwell))
|
||||||
|
+ cflags-$(CONFIG_MSKYLAKE) += \
|
||||||
|
+ $(call cc-option,-march=skylake,$(call cc-option,-mtune=skylake))
|
||||||
|
+ cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) \
|
||||||
|
+ $(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
|
||||||
|
cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
|
||||||
|
KBUILD_CFLAGS += $(cflags-y)
|
||||||
|
|
||||||
|
--- a/arch/x86/Makefile_32.cpu 2015-08-30 14:34:09.000000000 -0400
|
||||||
|
+++ b/arch/x86/Makefile_32.cpu 2015-11-06 14:21:43.604429077 -0500
|
||||||
|
@@ -23,7 +23,16 @@ cflags-$(CONFIG_MK6) += -march=k6
|
||||||
|
# Please note, that patches that add -march=athlon-xp and friends are pointless.
|
||||||
|
# They make zero difference whatsosever to performance at this time.
|
||||||
|
cflags-$(CONFIG_MK7) += -march=athlon
|
||||||
|
+cflags-$(CONFIG_MNATIVE) += $(call cc-option,-march=native)
|
||||||
|
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
|
||||||
|
+cflags-$(CONFIG_MK8SSE3) += $(call cc-option,-march=k8-sse3,-march=athlon)
|
||||||
|
+cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10,-march=athlon)
|
||||||
|
+cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona,-march=athlon)
|
||||||
|
+cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1,-march=athlon)
|
||||||
|
+cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1,-march=athlon)
|
||||||
|
+cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2,-march=athlon)
|
||||||
|
+cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3,-march=athlon)
|
||||||
|
+cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2,-march=athlon)
|
||||||
|
cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
|
||||||
|
cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
|
||||||
|
cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
|
||||||
|
@@ -32,8 +41,16 @@ cflags-$(CONFIG_MCYRIXIII) += $(call cc-
|
||||||
|
cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
|
||||||
|
cflags-$(CONFIG_MVIAC7) += -march=i686
|
||||||
|
cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
|
||||||
|
-cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom,$(call cc-option,-march=core2,-march=i686)) \
|
||||||
|
- $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
|
||||||
|
+cflags-$(CONFIG_MNEHALEM) += -march=i686 $(call tune,nehalem)
|
||||||
|
+cflags-$(CONFIG_MWESTMERE) += -march=i686 $(call tune,westmere)
|
||||||
|
+cflags-$(CONFIG_MSILVERMONT) += -march=i686 $(call tune,silvermont)
|
||||||
|
+cflags-$(CONFIG_MSANDYBRIDGE) += -march=i686 $(call tune,sandybridge)
|
||||||
|
+cflags-$(CONFIG_MIVYBRIDGE) += -march=i686 $(call tune,ivybridge)
|
||||||
|
+cflags-$(CONFIG_MHASWELL) += -march=i686 $(call tune,haswell)
|
||||||
|
+cflags-$(CONFIG_MBROADWELL) += -march=i686 $(call tune,broadwell)
|
||||||
|
+cflags-$(CONFIG_MSKYLAKE) += -march=i686 $(call tune,skylake)
|
||||||
|
+cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell,$(call cc-option,-march=core2,-march=i686)) \
|
||||||
|
+ $(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
|
||||||
|
|
||||||
|
# AMD Elan support
|
||||||
|
cflags-$(CONFIG_MELAN) += -march=i486
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,24 @@
|
||||||
|
Add -ck version in inconspicuous place where it will merge relatively easily
|
||||||
|
with later kernel versions.
|
||||||
|
|
||||||
|
-ck
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
Index: linux-3.12-ck2/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- linux-3.12-ck2.orig/Makefile 2013-12-03 20:12:24.295109675 +1100
|
||||||
|
+++ linux-3.12-ck2/Makefile 2013-12-03 20:12:24.285109800 +1100
|
||||||
|
@@ -10,6 +10,10 @@ NAME = One Giant Leap for Frogkind
|
||||||
|
# Comments in this file are targeted only to the developer, do not
|
||||||
|
# expect to learn how to build the kernel reading this file.
|
||||||
|
|
||||||
|
+CKVERSION = -ck2
|
||||||
|
+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);
|
|
@ -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.12-ck2/kernel/Kconfig.hz
|
||||||
|
===================================================================
|
||||||
|
--- linux-3.12-ck2.orig/kernel/Kconfig.hz 2013-12-03 20:12:23.401120851 +1100
|
||||||
|
+++ linux-3.12-ck2/kernel/Kconfig.hz 2013-12-03 20:12:23.390120989 +1100
|
||||||
|
@@ -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
|
|
@ -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.12-ck2/kernel/Kconfig.hz
|
||||||
|
===================================================================
|
||||||
|
--- linux-3.12-ck2.orig/kernel/Kconfig.hz 2013-12-03 20:12:22.956126414 +1100
|
||||||
|
+++ linux-3.12-ck2/kernel/Kconfig.hz 2013-12-03 20:12:22.946126539 +1100
|
||||||
|
@@ -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
|
||||||
|
|
|
@ -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.12-ck2/arch/x86/Kconfig
|
||||||
|
===================================================================
|
||||||
|
--- linux-3.12-ck2.orig/arch/x86/Kconfig 2013-12-03 20:12:23.848115263 +1100
|
||||||
|
+++ linux-3.12-ck2/arch/x86/Kconfig 2013-12-03 20:12:23.838115388 +1100
|
||||||
|
@@ -1175,7 +1175,7 @@ config HIGHMEM64G
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
choice
|
||||||
|
- prompt "Memory split" if EXPERT
|
||||||
|
+ prompt "Memory split"
|
||||||
|
default VMSPLIT_3G
|
||||||
|
depends on X86_32
|
||||||
|
---help---
|
||||||
|
@@ -1195,17 +1195,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
|
|
@ -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.12-ck2/kernel/Kconfig.preempt
|
||||||
|
===================================================================
|
||||||
|
--- linux-3.12-ck2.orig/kernel/Kconfig.preempt 2013-12-03 20:12:22.511131977 +1100
|
||||||
|
+++ linux-3.12-ck2/kernel/Kconfig.preempt 2013-12-03 20:12:22.500132115 +1100
|
||||||
|
@@ -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)"
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue