summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorshmilee2021-01-05 15:24:32 +0800
committershmilee2021-01-09 20:09:48 +0800
commit123e7386447187b4e681df608bc39ed15f7aa0e1 (patch)
tree5b47f1779afa15a47f0152a917bf8673e4388a85
parent622a28637c008c727c5620d5c2b2a5ef2fcc254d (diff)
downloadaur-123e7386447187b4e681df608bc39ed15f7aa0e1.tar.gz
test: LTS 5.4.87
-rw-r--r--.SRCINFO46
-rw-r--r--.gitignore9
-rw-r--r--60-linux.hook12
-rw-r--r--90-linux.hook11
-rw-r--r--PKGBUILD280
-rw-r--r--cjktty-patch_list.txt58
-rw-r--r--linux.install10
-rw-r--r--linux.preset14
8 files changed, 125 insertions, 315 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a2448549f026..908c65eae300 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,47 +1,47 @@
# Generated by makepkg 5.2.2
-# Sun Jan 3 13:04:53 UTC 2021
+# Sat Jan 9 09:40:48 UTC 2021
pkgbase = linux-shmilee
- pkgver = 5.4.86
+ pkgver = 5.4.87
pkgrel = 1
url = https://www.kernel.org/
arch = x86_64
license = GPL2
- makedepends = xmlto
- makedepends = kmod
- makedepends = inetutils
makedepends = bc
+ makedepends = kmod
makedepends = libelf
+ makedepends = pahole
+ makedepends = cpio
+ makedepends = perl
+ makedepends = tar
+ makedepends = xz
+ makedepends = xmlto
makedepends = python-sphinx
+ makedepends = python-sphinx_rtd_theme
makedepends = graphviz
+ makedepends = imagemagick
options = !strip
source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.4.tar.xz
source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.4.tar.sign
- source = https://www.kernel.org/pub/linux/kernel/v5.x/patch-5.4.86.xz
+ source = https://www.kernel.org/pub/linux/kernel/v5.x/patch-5.4.87.xz
source = http://ck.kolivas.org/patches/5.0/5.4/5.4-ck1/patch-5.4-ck1.xz
source = ck-patch-for-5.4.57+.patch
source = ck-patch-for-5.4.62+.patch
source = ck-fix-broken-sleep2ram-5.4.48+.patch
- source = https://raw.githubusercontent.com/dolohow/uksm/150e27c4e7f66e4519c89573305eca8c42091f4d/v5.x/uksm-5.4.patch
+ source = https://github.com/dolohow/uksm/raw/9b68301484619b60af2515f782160cdfe6c168f3/v5.x/uksm-5.4.patch
source = uksm-patch-for-5.4.33+.patch
source = uksm-patch-for-5.4.69+.patch
- source = cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support.patch::https://github.com/Gentoo-zh/linux-cjktty/commit/345872b7b6ef67e59e26d45d2a1c8fda6b88f106.patch
- source = cjktty-20-diable-setfont-if-we-have-cjk-font-in-kernel.patch::https://github.com/Gentoo-zh/linux-cjktty/commit/71ce685ec1f606831b74d7bad8731545a0f37829.patch
- source = cjktty-30-add-cjk-font-that-has-65536-chars.patch::https://github.com/Gentoo-zh/linux-cjktty/commit/531825eef130af268a2b144a70d852cf56de346e.patch
- source = cjktty-40-fix-depend-issue.patch::https://github.com/Gentoo-zh/linux-cjktty/commit/52bee61535169e59522f450201112d2f4fdfbeb5.patch
+ source = cjktty-5.4.patch::https://github.com/torvalds/linux/compare/v5.4...Gentoo-zh:5.4-utf8.patch
source = cjktty-11-patch-for-5.4.36+.patch
source = cjktty-11-patch-for-5.4.54+.patch
source = cjktty-11-patch-for-5.4.62+.patch
source = cjktty-12-patch-for-5.4.66+.patch
source = sphinx-workaround.patch
source = config
- source = 60-linux.hook
- source = 90-linux.hook
- source = linux.preset
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
sha256sums = bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491
sha256sums = SKIP
- sha256sums = 203ac7aee6f196f8a3ae5e98b214baf79d0d7924477cf3b262b6bb6658d68f05
+ sha256sums = cb107fecf0606a87f46694f0afbb80011190b47cd99c9063d98284012811bb83
sha256sums = f445eea4d0ec2015a25f1ad625c848f4f2252099795966fa4105e0aa29674c5c
sha256sums = a10a4848c7a9842c0c7760b087ea38a4356dc1a2c2e26334cb0106c25785554f
sha256sums = 0334391900f31d6aaedaa68e8917f93262ba3e523f2654774b289e9b18c1a923
@@ -49,33 +49,29 @@ pkgbase = linux-shmilee
sha256sums = 81d34bf02e771a126af5cb382d44a86dcc759c88b7c89fc7e5b7737731b9130e
sha256sums = 6826624f65276927de012f040e77b02231fe6345b9da7c702deacd9372ea001e
sha256sums = cdcd0e0ebd24d9b66c216df01b02da23760a44fe2a451137190f89d18a4c7f59
- sha256sums = 1f3c99cfa8c422c11ea139333e4c7da86d994965dee99ae0849e4b85bfd3b269
- sha256sums = 99e90ec64a933f39182d3e6030708b410eb06072c2e69330e9a38868b4073856
- sha256sums = 48c6d877bbe0613d407b3ba069edc26b2447a86ea5b5e79f257087986a3731d5
- sha256sums = 7ec0d906fa5a199cb46e3d6b42b11aca566eb714682e586d3bbf95702f9d9564
+ sha256sums = 50213f3270499fceb452946252d61f5471571c77baf3dd510fbb00cfa9831c9a
sha256sums = fa7950b5763a592ca2a04c423842451ac79633deebf77c730fc8ee35dfac2d45
sha256sums = 81bb112fed28c8ef22d7e02eb4150a76c8d549c72775e65cd3ecf10fa5fe1b4e
sha256sums = 7b3eea4462811a26c3c32721009a807dcaee5b8fbf1ad3e0cdad851679c9246e
sha256sums = 0c6385f8d5a61b09d046babe5351ca638ccb5a263e0f167d2b311f57054bc8d1
sha256sums = b7c814c8183e4645947a6dcc3cbf80431de8a8fd4e895b780f9a5fd92f82cb8e
sha256sums = 7ce388e429d8df479a721285e445e116c5ee41e3126a702862e59056460b655e
- sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21
- sha256sums = 75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919
- sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
pkgname = linux-shmilee
pkgdesc = The Linux-shmilee kernel and modules with the ck1 uksm-0.1.2.6 and cjktty patchsets
- install = linux.install
depends = coreutils
depends = kmod
depends = mkinitcpio
optdepends = crda: to set the correct wireless channels of your country
optdepends = linux-firmware: firmware images needed for some devices
- backup = etc/mkinitcpio.d/linux-shmilee.preset
+ provides = VIRTUALBOX-GUEST-MODULES
+ provides = WIREGUARD-MODULE
+ replaces = virtualbox-guest-modules-arch
+ replaces = wireguard-arch
pkgname = linux-shmilee-headers
pkgdesc = Header files and scripts for building modules for Linux-shmilee kernel
pkgname = linux-shmilee-docs
- pkgdesc = Kernel hackers manual - HTML documentation that comes with the Linux-shmilee kernel
+ pkgdesc = Documentation that comes with the Linux-shmilee kernel
diff --git a/.gitignore b/.gitignore
index f1e8af500544..418887338e56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,16 +5,15 @@ patch-?.*.*.xz
patch-?.*.*.sign
patch-?.*-ck?.xz
-
uksm-?.*.patch
-
-cjktty-?0-*.patch
+cjktty-?.*.patch
pkg/*
src/*
debug-*.*.*
+
linux-shmilee-*.log
+linux-shmilee-*.log.*
linux-shmilee-*.src.tar.gz
-linux-shmilee-*.pkg.tar.xz
linux-shmilee-*.pkg.tar
-linux.install.pkg
+linux-shmilee-*.pkg.tar.*
diff --git a/60-linux.hook b/60-linux.hook
deleted file mode 100644
index b33873c854fb..000000000000
--- a/60-linux.hook
+++ /dev/null
@@ -1,12 +0,0 @@
-[Trigger]
-Type = File
-Operation = Install
-Operation = Upgrade
-Operation = Remove
-Target = usr/lib/modules/%KERNVER%/*
-Target = usr/lib/modules/%EXTRAMODULES%/*
-
-[Action]
-Description = Updating %PKGBASE% module dependencies...
-When = PostTransaction
-Exec = /usr/bin/depmod %KERNVER%
diff --git a/90-linux.hook b/90-linux.hook
deleted file mode 100644
index be0d886539f4..000000000000
--- a/90-linux.hook
+++ /dev/null
@@ -1,11 +0,0 @@
-[Trigger]
-Type = File
-Operation = Install
-Operation = Upgrade
-Target = boot/vmlinuz-%PKGBASE%
-Target = usr/lib/initcpio/*
-
-[Action]
-Description = Updating %PKGBASE% initcpios...
-When = PostTransaction
-Exec = /usr/bin/mkinitcpio -p %PKGBASE%
diff --git a/PKGBUILD b/PKGBUILD
index 043b5488810e..837d6fb3ca38 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,9 +6,9 @@
# last/latest "longterm maintenance" kernel releases
# https://www.kernel.org/category/releases.html
-# 5.4 Greg Kroah-Hartman & Sasha Levin 2019-11-24 Dec, 2021
+# 5.4 Greg Kroah-Hartman & Sasha Levin 2019-11-24 Dec, 2025
_LLL_VER=5.4
-_LLL_SUBVER=86
+_LLL_SUBVER=87
# Bisect debug, v5.4.47 -> v5.4.48
_Bisect_debug=off # on, test, off
@@ -40,8 +40,8 @@ _CK_PATCH_PATCH=(
# Ultra Kernel Samepage Merging
_UKSM_VER=0.1.2.6
-_UKSM_COMMIT=150e27c4e7f66e4519c89573305eca8c42091f4d
-_UKSM_PATCH_SRC="https://raw.githubusercontent.com/dolohow/uksm/${_UKSM_COMMIT}/v5.x/uksm-${_LLL_VER}.patch"
+_UKSM_COMMIT=9b68301484619b60af2515f782160cdfe6c168f3
+_UKSM_PATCH_SRC="https://github.com/dolohow/uksm/raw/${_UKSM_COMMIT}/v5.x/uksm-${_LLL_VER}.patch"
_UKSM_PATCH_PATCH=(
'uksm-patch-for-5.4.33+.patch'
'uksm-patch-for-5.4.69+.patch'
@@ -49,20 +49,11 @@ _UKSM_PATCH_PATCH=(
# CJKTTY patch
# https://github.com/Gentoo-zh/linux-cjktty
-# https://github.com/torvalds/linux/compare/v5.4...Gentoo-zh:5.4-utf8.patch
-_CJKURL_C='https://github.com/Gentoo-zh/linux-cjktty/commit'
-_CJKTTY_PATCH=(
- "cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support.patch"
- "cjktty-20-diable-setfont-if-we-have-cjk-font-in-kernel.patch"
- "cjktty-30-add-cjk-font-that-has-65536-chars.patch"
- "cjktty-40-fix-depend-issue.patch"
-)
-_CJKTTY_PATCH_SRC=(
- "cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support.patch::${_CJKURL_C}/345872b7b6ef67e59e26d45d2a1c8fda6b88f106.patch"
- "cjktty-20-diable-setfont-if-we-have-cjk-font-in-kernel.patch::${_CJKURL_C}/71ce685ec1f606831b74d7bad8731545a0f37829.patch"
- "cjktty-30-add-cjk-font-that-has-65536-chars.patch::${_CJKURL_C}/531825eef130af268a2b144a70d852cf56de346e.patch"
- "cjktty-40-fix-depend-issue.patch::${_CJKURL_C}/52bee61535169e59522f450201112d2f4fdfbeb5.patch"
-)
+_CJKTTY_PATCH_URL="https://github.com/torvalds/linux/compare/v${_LLL_VER}...Gentoo-zh:${_LLL_VER}-utf8.patch"
+_CJKTTY_PATCH_SRC="cjktty-${_LLL_VER}.patch::${_CJKTTY_PATCH_URL}"
+# https://github.com/zhmars/cjktty-patches
+#_CJKTTY_COMMIT=0acfa3fdfe900ad15e56b513be70061f86cfe606
+#_CJKTTY_PATCH_SRC="https://github.com/zhmars/cjktty-patches/raw/${_CJKTTY_COMMIT}/v5.x/cjktty-${_LLL_VER}.patch"
_CJKTTY_PATCH_PATCH=(
'cjktty-11-patch-for-5.4.36+.patch'
'cjktty-11-patch-for-5.4.54+.patch'
@@ -83,7 +74,9 @@ pkgrel=1
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
-makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf' 'python-sphinx' 'graphviz')
+makedepends=(
+ 'bc' 'kmod' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz'
+ 'xmlto' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick')
options=('!strip')
source=(
"https://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz"
@@ -95,13 +88,10 @@ source=(
'ck-fix-broken-sleep2ram-5.4.48+.patch' # https://github.com/zen-kernel/zen-kernel/commit/fb7e2cfaf61cf5f9c2336331e73296f455bd2d51.patch
${_UKSM_PATCH_SRC}
${_UKSM_PATCH_PATCH[@]}
- ${_CJKTTY_PATCH_SRC[@]}
+ ${_CJKTTY_PATCH_SRC}
${_CJKTTY_PATCH_PATCH[@]}
'sphinx-workaround.patch'
'config' # the main kernel config file
- '60-linux.hook' # pacman hook for depmod
- '90-linux.hook' # pacman hook for initramfs regeneration
- 'linux.preset' # standard config files for mkinitcpio ramdisk
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
@@ -110,7 +100,7 @@ validpgpkeys=(
# https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
sha256sums=('bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491'
'SKIP'
- '203ac7aee6f196f8a3ae5e98b214baf79d0d7924477cf3b262b6bb6658d68f05'
+ 'cb107fecf0606a87f46694f0afbb80011190b47cd99c9063d98284012811bb83'
'f445eea4d0ec2015a25f1ad625c848f4f2252099795966fa4105e0aa29674c5c'
'a10a4848c7a9842c0c7760b087ea38a4356dc1a2c2e26334cb0106c25785554f'
'0334391900f31d6aaedaa68e8917f93262ba3e523f2654774b289e9b18c1a923'
@@ -118,19 +108,17 @@ sha256sums=('bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491'
'81d34bf02e771a126af5cb382d44a86dcc759c88b7c89fc7e5b7737731b9130e'
'6826624f65276927de012f040e77b02231fe6345b9da7c702deacd9372ea001e'
'cdcd0e0ebd24d9b66c216df01b02da23760a44fe2a451137190f89d18a4c7f59'
- '1f3c99cfa8c422c11ea139333e4c7da86d994965dee99ae0849e4b85bfd3b269'
- '99e90ec64a933f39182d3e6030708b410eb06072c2e69330e9a38868b4073856'
- '48c6d877bbe0613d407b3ba069edc26b2447a86ea5b5e79f257087986a3731d5'
- '7ec0d906fa5a199cb46e3d6b42b11aca566eb714682e586d3bbf95702f9d9564'
+ '50213f3270499fceb452946252d61f5471571c77baf3dd510fbb00cfa9831c9a'
'fa7950b5763a592ca2a04c423842451ac79633deebf77c730fc8ee35dfac2d45'
'81bb112fed28c8ef22d7e02eb4150a76c8d549c72775e65cd3ecf10fa5fe1b4e'
'7b3eea4462811a26c3c32721009a807dcaee5b8fbf1ad3e0cdad851679c9246e'
'0c6385f8d5a61b09d046babe5351ca638ccb5a263e0f167d2b311f57054bc8d1'
'b7c814c8183e4645947a6dcc3cbf80431de8a8fd4e895b780f9a5fd92f82cb8e'
- '7ce388e429d8df479a721285e445e116c5ee41e3126a702862e59056460b655e'
- 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
- '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
- 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
+ '7ce388e429d8df479a721285e445e116c5ee41e3126a702862e59056460b655e')
+
+export KBUILD_BUILD_HOST=archlinux
+export KBUILD_BUILD_USER=$pkgbase
+export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
_kernelname=${pkgbase#linux}
@@ -142,73 +130,63 @@ fi
prepare() {
cd ${_srcname}
+ msg2 "Setting version..."
+ scripts/setlocalversion --save-scmversion
+ echo "-$pkgrel" > localversion.10-pkgrel
+ echo "${pkgbase#linux}" > localversion.20-pkgname
+
# add upstream patch
patch -p1 -i ../patch-${pkgver}
# Bisect debug
if [ "$_Bisect_debug" == "on" ]; then
- msg "Patching upstream v$pkgver --> $_bcommit"
+ msg2 "Patching upstream v$pkgver --> $_bcommit"
if [ ! -f "${srcdir}/../v${pkgver}-${pkgrel}-$_bcommit" ]; then
wget "$_bpatch" -O "${srcdir}/../v${pkgver}-${pkgrel}-$_bcommit"
fi
patch -p1 -i "${srcdir}/../v${pkgver}-${pkgrel}-$_bcommit"
fi
- # add latest fixes from stable queue, if needed
- # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
-
# fix naming schema in EXTRAVERSION of ck patch set
sed -i -re "s/^(.EXTRAVERSION).*$/\1 = /" "../patch-${_LLL_VER}-ck${_CK_VER}"
# Patch source with ck patch set
- msg "Patching source with ck${_CK_VER} including BFS"
+ msg2 "Patching source with ck${_CK_VER} including BFS MuQSS"
cp "../patch-${_LLL_VER}-ck${_CK_VER}" "../patch-${_LLL_VER}.${_LLL_SUBVER}-ck${_CK_VER}"
for p in ${_CK_PATCH_PATCH[@]}; do
patch -Ni ../$p "../patch-${_LLL_VER}.${_LLL_SUBVER}-ck${_CK_VER}"
done
patch -Np1 -i "../patch-${_LLL_VER}.${_LLL_SUBVER}-ck${_CK_VER}"
- # Bisect debug result about ck
+
+ # Bisect debug result
if [ "$_Bisect_debug" != "on" ]; then
#see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/patch/?id=f7757368e0f0b3e108088ca7b5b8abda6faa7ebc
patch -p1 -i "../ck-fix-broken-sleep2ram-5.4.48+.patch"
+ #:
fi
- msg "Patching source with uksm ${_UKSM_VER} patches"
+ msg2 "Patching source with uksm ${_UKSM_VER} patches"
cp "../uksm-${_LLL_VER}.patch" "../uksm-${_LLL_VER}.${_LLL_SUBVER}.patch"
for p in ${_UKSM_PATCH_PATCH[@]}; do
patch -Ni ../$p "../uksm-${_LLL_VER}.${_LLL_SUBVER}.patch"
done
patch -Np1 -i "../uksm-${_LLL_VER}.${_LLL_SUBVER}.patch"
- msg "Patching source with Gentoo-zh/linux-cjktty patches"
- mkdir ../cjktty-patches
- for p in ${_CJKTTY_PATCH[@]}; do
- cp ../$p ../cjktty-patches/
- done
- cd ../cjktty-patches
+ msg2 "Patching source with Gentoo-zh/linux-cjktty patches"
+ cp "../cjktty-${_LLL_VER}.patch" "../cjktty-${_LLL_VER}.${_LLL_SUBVER}.patch"
for p in ${_CJKTTY_PATCH_PATCH[@]}; do
- patch -Ni ../$p
- done
- cd ../${_srcname}
- for p in ${_CJKTTY_PATCH[@]}; do
- patch -Np1 -i "../cjktty-patches/$p"
+ patch -Ni ../$p "../cjktty-${_LLL_VER}.${_LLL_SUBVER}.patch"
done
+ patch -Np1 -i "../cjktty-${_LLL_VER}.${_LLL_SUBVER}.patch"
- msg "Patching sphinx extensions for htmldocs"
+ msg2 "Patching sphinx extensions for htmldocs"
patch -Np1 -i ../sphinx-workaround.patch
+ echo "Setting config..."
cp -Tf ../config .config
- if [ "${_kernelname}" != "" ]; then
- sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
- sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config
- fi
-
- # set extraversion to pkgrel
- sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
-
# Optionally disable NUMA for 64-bit kernels only
if [ -n "$_NUMA_disable" ] && [ "${CARCH}" = "x86_64" ]; then
- msg "Disabling NUMA from kernel config..."
+ msg2 "Disabling NUMA from kernel config..."
sed -i -e 's/CONFIG_NUMA=y/# CONFIG_NUMA is not set/' \
-i -e '/CONFIG_AMD_NUMA=y/d' \
-i -e '/CONFIG_X86_64_ACPI_NUMA=y/d' \
@@ -218,161 +196,114 @@ prepare() {
-i -e '/CONFIG_NEED_MULTIPLE_NODES=y/d' \
-i -e '/# CONFIG_MOVABLE_NODE is not set/d' \
-i -e '/CONFIG_USE_PERCPU_NUMA_NODE_ID=y/d' \
- -i -e '/CONFIG_ACPI_NUMA=y/d' ./.config
+ -i -e '/CONFIG_ACPI_NUMA=y/d' .config
fi
- # don't run depmod on 'make install'. We'll do this ourselves in packaging
- sed -i '2iexit 0' scripts/depmod.sh
-
- # get kernel version
- make prepare
-
- # load configuration
- # Configure the kernel. Replace the line below with one of your choice.
- #make menuconfig # CLI menu for configuration
- #make nconfig # new CLI menu for configuration
- #make xconfig # X-based configuration
- #make oldconfig # using old config from previous kernel version
- # ... or manually edit .config
-
if [ "$_Bisect_debug" != "off" ]; then
make LSMOD=$HOME/.config/modprobed.db localmodconfig
fi
# rewrite configuration
- yes "" | make config >/dev/null
+ yes "" | make olddefconfig >/dev/null
+
+ # don't run depmod on 'make install'. We'll do this ourselves in packaging
+ #sed -i '2iexit 0' scripts/depmod.sh
+
+ make -s kernelrelease >version
+ msg2 "Prepared $pkgbase version $(<version)"
}
build() {
cd ${_srcname}
if [ "$_Bisect_debug" == "off" ]; then
- make ${MAKEFLAGS} LOCALVERSION= bzImage modules htmldocs
+ make ${MAKEFLAGS} all htmldocs
else
- make ${MAKEFLAGS} LOCALVERSION= bzImage modules
+ make ${MAKEFLAGS} all
fi
}
_package() {
pkgdesc="The ${pkgbase/linux/Linux} kernel and modules with the ${_PATHSET_DESC} patchsets"
- [ "${pkgbase}" = "linux" ] && groups=('base')
depends=('coreutils' 'kmod' 'mkinitcpio')
optdepends=('crda: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices')
- backup=("etc/mkinitcpio.d/${pkgbase}.preset")
- install=linux.install
+ provides=('VIRTUALBOX-GUEST-MODULES' 'WIREGUARD-MODULE')
+ replaces=('virtualbox-guest-modules-arch' 'wireguard-arch')
cd ${_srcname}
-
- # get kernel version
- _kernver="$(make LOCALVERSION= kernelrelease)"
- _basekernel=${_kernver%%-*}
- _basekernel=${_basekernel%.*}
-
- mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
+ local kernver="$(<version)"
+ local modulesdir="$pkgdir/usr/lib/modules/$kernver"
msg2 "Installing boot image..."
- install -Dm644 "$(make -s image_name)" "${pkgdir}/boot/vmlinuz-${pkgbase}"
-
- msg2 "Installing modules..."
- make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
+ # systemd expects to find the kernel here to allow hibernation
+ # https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
+ install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
- # make room for external modules
- local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}"
- ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
+ # Used by mkinitcpio to name the kernel
+ echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
- # add real version for building modules and running depmod from hook
- echo "${_kernver}" |
- install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"
+ msg2 "Installing modules..."
+ make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
# remove build and source links
- rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
-
- # remove the firmware
- rm -rf "${pkgdir}/usr/lib/firmware"
-
- # now we call depmod...
- depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
-
- msg2 "Installing hooks..."
- # sed expression for following substitutions
- local _subst="
- s|%PKGBASE%|${pkgbase}|g
- s|%KERNVER%|${_kernver}|g
- s|%EXTRAMODULES%|${_extramodules}|g
- "
-
- # hack to allow specifying an initially nonexisting install file
- sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
- true && install=${install}.pkg
-
- # install mkinitcpio preset file and pacman hooks
- sed "${_subst}" ../linux.preset | install -Dm644 /dev/stdin \
- "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
- sed "${_subst}" ../60-linux.hook | install -Dm644 /dev/stdin \
- "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
- sed "${_subst}" ../90-linux.hook | install -Dm644 /dev/stdin \
- "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
-
- msg2 "Fixing permissions..."
- chmod -Rc u=rwX,go=rX "$pkgdir"
+ rm "$modulesdir"/{source,build}
}
_package-headers() {
pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
cd ${_srcname}
- local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
msg2 "Installing build files..."
- install -Dt "${_builddir}" -m644 Makefile .config Module.symvers System.map vmlinux
- install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
- install -Dt "${_builddir}/arch/x86" -m644 arch/x86/Makefile
- cp -t "${_builddir}" -a scripts
+ install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
+ localversion.* version vmlinux
+ install -Dt "$builddir/kernel" -m644 kernel/Makefile
+ install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
+ cp -t "$builddir" -a scripts
# add objtool for external module building and enabled VALIDATION_STACK option
- install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
+ install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# add xfs and shmem for aufs building
- mkdir -p "${_builddir}"/{fs/xfs,mm}
-
- # ???
- mkdir "${_builddir}/.tmp_versions"
+ mkdir -p "$builddir"/{fs/xfs,mm}
msg2 "Installing headers..."
- cp -t "${_builddir}" -a include
- cp -t "${_builddir}/arch/x86" -a arch/x86/include
- install -Dt "${_builddir}/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
+ cp -t "$builddir" -a include
+ cp -t "$builddir/arch/x86" -a arch/x86/include
+ install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
- install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
- install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
+ install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
+ install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
# http://bugs.archlinux.org/task/13146
- install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
+ install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# http://bugs.archlinux.org/task/20402
- install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
- install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
- install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
+ install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
+ install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
+ install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
msg2 "Installing KConfig files..."
- find . -name 'Kconfig*' -exec install -Dm644 {} "${_builddir}/{}" \;
+ find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
msg2 "Removing unneeded architectures..."
- local _arch
- for _arch in "${_builddir}"/arch/*/; do
- [[ ${_arch} == */x86/ ]] && continue
- rm -r "${_arch}"
+ local arch
+ for arch in "$builddir"/arch/*/; do
+ [[ $arch = */x86/ ]] && continue
+ msg2 "Removing $(basename "$arch")"
+ rm -r "$arch"
done
- msg2 "Removing files already in linux-docs package..."
- rm -r "${_builddir}/Documentation"
+ msg2 "Removing documentation..."
+ rm -r "$builddir/Documentation"
msg2 "Removing broken symlinks..."
- find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
+ find -L "$builddir" -type l -printf 'Removing %P\n' -delete
msg2 "Removing loose objects..."
- find "${_builddir}" -type f -name '*.o' -printf 'Removing %P\n' -delete
+ find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
msg2 "Stripping build tools..."
local file
@@ -387,44 +318,33 @@ _package-headers() {
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
- done < <(find "${_builddir}" -type f -perm -u+x ! -name vmlinux -print0)
+ done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
+
+ msg2 "Stripping vmlinux..."
+ strip -v $STRIP_STATIC "$builddir/vmlinux"
msg2 "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
- ln -sr "${_builddir}" "$pkgdir/usr/src/$pkgbase-$pkgver"
-
- msg2 "Fixing permissions..."
- chmod -Rc u=rwX,go=rX "$pkgdir"
+ ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
}
_package-docs() {
- pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel"
+ pkgdesc="Documentation that comes with the ${pkgbase/linux/Linux} kernel"
cd ${_srcname}
- local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
msg2 "Installing documentation..."
- mkdir -p "${_builddir}"
- cp -t "${_builddir}" -a Documentation
-
- msg2 "Removing doctrees..."
- rm -r "${_builddir}/Documentation/output/.doctrees"
-
- msg2 "Moving HTML docs..."
local src dst
while read -rd '' src; do
- dst="${_builddir}/Documentation/${src#${_builddir}/Documentation/output/}"
- mkdir -p "${dst%/*}"
- mv "$src" "$dst"
- rmdir -p --ignore-fail-on-non-empty "${src%/*}"
- done < <(find "${_builddir}/Documentation/output" -type f -print0)
+ dst="${src#Documentation/}"
+ dst="$builddir/Documentation/${dst#output/}"
+ install -Dm644 "$src" "$dst"
+ done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
msg2 "Adding symlink..."
- mkdir -p "${pkgdir}/usr/share/doc"
- ln -sr "${_builddir}/Documentation" "${pkgdir}/usr/share/doc/${pkgbase}"
-
- msg2 "Fixing permissions..."
- chmod -Rc u=rwX,go=rX "${pkgdir}"
+ mkdir -p "$pkgdir/usr/share/doc"
+ ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
}
for _p in ${pkgname[@]}; do
diff --git a/cjktty-patch_list.txt b/cjktty-patch_list.txt
deleted file mode 100644
index 16deedd266e7..000000000000
--- a/cjktty-patch_list.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-LTS 5.4.x
----------
-
-
-PATCH 1
--------
-[vt] fix 255 glyph limit, prepare for CJK font support
-
-```
-file='10-fix-255-glyph-limit-prepare-for-CJK-font-support.patch'
-url='https://github.com/Gentoo-zh/linux-cjktty/commit/345872b7b6ef67e59e26d45d2a1c8fda6b88f106.patch'
-wget -c $url -O $file
-```
-
-1.1 [vt]
-patch=(
- '11-patch-for-5.4.36+.patch'
- '11-patch-for-5.4.54+.patch'
- '11-patch-for-5.4.62+.patch'
-)
-
-1.2 [fbdev]
-patch=(
- '12-patch-for-5.4.66+.patch'
-)
-
-1.3 [font]
-
-
-PATCH 2
--------
-[PATCH] [vt] diable setfont if we have cjk font in kernel
-
-```
-file='20-diable-setfont-if-we-have-cjk-font-in-kernel.patch'
-url='https://github.com/Gentoo-zh/linux-cjktty/commit/71ce685ec1f606831b74d7bad8731545a0f37829.patch'
-wget -c $url -O $file
-```
-
-PATCH 3
--------
-[vt] add cjk font that has 65536 chars
-
-```
-file='30-add-cjk-font-that-has-65536-chars.patch'
-url='https://github.com/Gentoo-zh/linux-cjktty/commit/531825eef130af268a2b144a70d852cf56de346e.patch'
-wget -c $url -O $file
-```
-
-PATCH 4
--------
-[vt] fix depend issue. thanks to 金步国
-
-```
-file='40-fix-depend-issue.patch'
-url='https://github.com/Gentoo-zh/linux-cjktty/commit/52bee61535169e59522f450201112d2f4fdfbeb5.patch'
-wget -c $url -O $file
-```
diff --git a/linux.install b/linux.install
deleted file mode 100644
index 37ba37494605..000000000000
--- a/linux.install
+++ /dev/null
@@ -1,10 +0,0 @@
-post_upgrade() {
- if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
- echo "WARNING: /boot appears to be a separate partition but is not mounted."
- fi
-}
-
-post_remove() {
- rm -f boot/initramfs-%PKGBASE%.img
- rm -f boot/initramfs-%PKGBASE%-fallback.img
-}
diff --git a/linux.preset b/linux.preset
deleted file mode 100644
index 66709a8c1537..000000000000
--- a/linux.preset
+++ /dev/null
@@ -1,14 +0,0 @@
-# mkinitcpio preset file for the '%PKGBASE%' package
-
-ALL_config="/etc/mkinitcpio.conf"
-ALL_kver="/boot/vmlinuz-%PKGBASE%"
-
-PRESETS=('default' 'fallback')
-
-#default_config="/etc/mkinitcpio.conf"
-default_image="/boot/initramfs-%PKGBASE%.img"
-#default_options=""
-
-#fallback_config="/etc/mkinitcpio.conf"
-fallback_image="/boot/initramfs-%PKGBASE%-fallback.img"
-fallback_options="-S autodetect"