generated from archlinux/template
4.14-1
This commit is contained in:
75
PKGBUILD
75
PKGBUILD
@@ -3,37 +3,34 @@
|
||||
|
||||
pkgbase=linux # Build stock -ARCH kernel
|
||||
#pkgbase=linux-custom # Build kernel with a different name
|
||||
_srcname=linux-4.13
|
||||
pkgver=4.13.13
|
||||
_srcname=linux-4.14
|
||||
pkgver=4.14
|
||||
pkgrel=1
|
||||
arch=('x86_64')
|
||||
url="https://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf')
|
||||
options=('!strip')
|
||||
source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
|
||||
"https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign"
|
||||
"https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
|
||||
"https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign"
|
||||
# the main kernel config files
|
||||
'config.i686' 'config.x86_64'
|
||||
# pacman hook for initramfs regeneration
|
||||
'90-linux.hook'
|
||||
# standard config files for mkinitcpio ramdisk
|
||||
'linux.preset')
|
||||
|
||||
sha256sums=('2db3d6066c3ad93eb25b973a3d2951e022a7e975ee2fa7cbe5bddf84d9a49a2c'
|
||||
'SKIP'
|
||||
'7414baa3aa0037ee370aaad4998f88f583cf5badb3be9b17016a529eee8e2a24'
|
||||
'SKIP'
|
||||
'9b1d9fcb55782e6149aca4dc2d3b250dd4cedf1bf4bd8c6f0968acab0e2e0ee4'
|
||||
'9c6c4d27d59638d0569ea09a97138bfcfb219f17cdf1138be141380e6654f302'
|
||||
'834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
|
||||
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
|
||||
source=(
|
||||
"https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
|
||||
"https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign"
|
||||
#"https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
|
||||
#"https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign"
|
||||
'config' # the main kernel config file
|
||||
'90-linux.hook' # pacman hook for initramfs regeneration
|
||||
'linux.preset' # standard config files for mkinitcpio ramdisk
|
||||
'0001-platform-x86-hp-wmi-Fix-tablet-mode-detection-for-co.patch'
|
||||
)
|
||||
validpgpkeys=(
|
||||
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
||||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||
)
|
||||
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
||||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||
)
|
||||
sha256sums=('f81d59477e90a130857ce18dc02f4fbe5725854911db1e7ba770c7cd350f96a7'
|
||||
'SKIP'
|
||||
'a68e94064f040d60e8e4c3380efeee085b54d252d527e960dd17ac688505d5b6'
|
||||
'834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
|
||||
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
|
||||
'6f1d9b6a119bfab150a0bc1f550609dd9290328df709b67c984f0a6b0abe8afd')
|
||||
|
||||
_kernelname=${pkgbase#linux}
|
||||
|
||||
@@ -41,14 +38,17 @@ prepare() {
|
||||
cd ${_srcname}
|
||||
|
||||
# add upstream patch
|
||||
patch -p1 -i ../patch-${pkgver}
|
||||
#patch -p1 -i ../patch-${pkgver}
|
||||
|
||||
# security patches
|
||||
|
||||
# add latest fixes from stable queue, if needed
|
||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||
|
||||
cp -Tf ../config.${CARCH} .config
|
||||
# https://bugs.archlinux.org/task/56207
|
||||
patch -Np1 -i ../0001-platform-x86-hp-wmi-Fix-tablet-mode-detection-for-co.patch
|
||||
|
||||
cp -Tf ../config .config
|
||||
|
||||
if [ "${_kernelname}" != "" ]; then
|
||||
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
|
||||
@@ -92,8 +92,6 @@ _package() {
|
||||
|
||||
cd ${_srcname}
|
||||
|
||||
KARCH=x86
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make LOCALVERSION= kernelrelease)"
|
||||
_basekernel=${_kernver%%-*}
|
||||
@@ -101,7 +99,7 @@ _package() {
|
||||
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
|
||||
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
||||
cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
||||
|
||||
# set correct depmod command for install
|
||||
sed -e "s|%PKGBASE%|${pkgbase}|g;s|%KERNVER%|${_kernver}|g" \
|
||||
@@ -152,14 +150,10 @@ _package-headers() {
|
||||
|
||||
cp -t "${_builddir}" -a include scripts
|
||||
|
||||
install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
|
||||
install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
|
||||
install -Dt "${_builddir}/arch/x86" -m644 arch/x86/Makefile
|
||||
install -Dt "${_builddir}/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
|
||||
|
||||
if [[ ${CARCH} = i686 ]]; then
|
||||
install -t "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile_32.cpu
|
||||
fi
|
||||
|
||||
cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
|
||||
cp -t "${_builddir}/arch/x86" -a arch/x86/include
|
||||
|
||||
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
|
||||
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
|
||||
@@ -183,16 +177,13 @@ _package-headers() {
|
||||
find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
|
||||
|
||||
# add objtool for external module building and enabled VALIDATION_STACK option
|
||||
if [[ -e tools/objtool/objtool ]]; then
|
||||
install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
|
||||
fi
|
||||
install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
|
||||
|
||||
# remove unneeded architectures
|
||||
local _arch
|
||||
for _arch in "${_builddir}"/arch/*/; do
|
||||
if [[ ${_arch} != */${KARCH}/ ]]; then
|
||||
rm -r "${_arch}"
|
||||
fi
|
||||
[[ ${_arch} == */x86/ ]] && continue
|
||||
rm -r "${_arch}"
|
||||
done
|
||||
|
||||
# remove files already in linux-docs package
|
||||
|
||||
Reference in New Issue
Block a user