diff options
-rw-r--r-- | .SRCINFO | 64 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | 60-linux.hook | 12 | ||||
-rw-r--r-- | 90-linux.hook | 11 | ||||
-rw-r--r-- | PKGBUILD | 323 | ||||
-rw-r--r-- | cjktty-11-patch-for-5.4.36+.patch (renamed from linux-cjktty-patch-for-5.4.36+.patch) | 4 | ||||
-rw-r--r-- | cjktty-11-patch-for-5.4.54+.patch (renamed from linux-cjktty-patch-for-5.4.54+.patch) | 4 | ||||
-rw-r--r-- | cjktty-11-patch-for-5.4.62+.patch (renamed from linux-cjktty-patch-for-5.4.62+.patch) | 4 | ||||
-rw-r--r-- | cjktty-12-patch-for-5.4.66+.patch (renamed from linux-cjktty-patch-for-5.4.66+.patch) | 4 | ||||
-rw-r--r-- | ck-fix-broken-sleep2ram-5.4.48+.patch (renamed from fix-ck-broken-sleep2ram-5.4.48+.patch) | 0 | ||||
-rw-r--r-- | linux.install | 10 | ||||
-rw-r--r-- | linux.preset | 14 |
12 files changed, 181 insertions, 278 deletions
@@ -1,75 +1,77 @@ # Generated by makepkg 5.2.2 -# Sun Oct 18 02:03:55 UTC 2020 +# Mon Jan 18 04:53:36 UTC 2021 pkgbase = linux-shmilee - pkgver = 5.4.72 + pkgver = 5.4.90 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.72.xz + source = https://www.kernel.org/pub/linux/kernel/v5.x/patch-5.4.90.xz source = http://ck.kolivas.org/patches/5.0/5.4/5.4-ck1/patch-5.4-ck1.xz - source = https://raw.githubusercontent.com/dolohow/uksm/150e27c4e7f66e4519c89573305eca8c42091f4d/v5.x/uksm-5.4.patch - source = linux-cjktty-5.4.patch::https://github.com/torvalds/linux/compare/v5.4...Gentoo-zh:5.4-utf8.patch - source = sphinx-workaround.patch source = ck-patch-for-5.4.57+.patch source = ck-patch-for-5.4.62+.patch - source = fix-ck-broken-sleep2ram-5.4.48+.patch + source = ck-fix-broken-sleep2ram-5.4.48+.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 = linux-cjktty-patch-for-5.4.36+.patch - source = linux-cjktty-patch-for-5.4.54+.patch - source = linux-cjktty-patch-for-5.4.62+.patch - source = linux-cjktty-patch-for-5.4.66+.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 = bce941bcb6c8148ac19cd2fa4f1e19c6c75f699a3bcdfd452df7484cff2a2353 + sha256sums = 390145e23c45d190b8601a2648ac5562a2dd602629d2030655d55bc9e706617d sha256sums = f445eea4d0ec2015a25f1ad625c848f4f2252099795966fa4105e0aa29674c5c - sha256sums = 81d34bf02e771a126af5cb382d44a86dcc759c88b7c89fc7e5b7737731b9130e - sha256sums = 50213f3270499fceb452946252d61f5471571c77baf3dd510fbb00cfa9831c9a - sha256sums = b7c814c8183e4645947a6dcc3cbf80431de8a8fd4e895b780f9a5fd92f82cb8e sha256sums = a10a4848c7a9842c0c7760b087ea38a4356dc1a2c2e26334cb0106c25785554f sha256sums = 0334391900f31d6aaedaa68e8917f93262ba3e523f2654774b289e9b18c1a923 sha256sums = 961ed94b8d905f1e901cacb08d253c4170af0a25828111b7558d9c874e923558 + sha256sums = 81d34bf02e771a126af5cb382d44a86dcc759c88b7c89fc7e5b7737731b9130e sha256sums = 6826624f65276927de012f040e77b02231fe6345b9da7c702deacd9372ea001e sha256sums = cdcd0e0ebd24d9b66c216df01b02da23760a44fe2a451137190f89d18a4c7f59 - sha256sums = 573f1c40951a6ee4cf6b07a6a8a1123b00fcd8bff29843905cf191e08f1d87f2 - sha256sums = 2c9faabb5e09b1f818b051ced3eb90b6c04aa08616952d99eedf328c7c8dda2f - sha256sums = 4d511fb62966549b9ea4a1d97769f79e4d66fc141cd0b001e7d286367a038a09 - sha256sums = 1f0af2c1044cf177b84fea8bb49aaa5cf9282c5588a7995798d63177565b0727 + 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 7728dcfc84b..418887338e5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,16 +5,15 @@ patch-?.*.*.xz patch-?.*.*.sign patch-?.*-ck?.xz - uksm-?.*.patch - -linux-cjktty-?.*.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 b33873c854f..00000000000 --- 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 be0d886539f..00000000000 --- 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% @@ -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=72 +_LLL_SUBVER=90 # Bisect debug, v5.4.47 -> v5.4.48 _Bisect_debug=off # on, test, off @@ -32,20 +32,34 @@ _NUMA_disable=y # http://ck.kolivas.org/patches/5.0/ # https://wiki.archlinux.org/index.php/Linux-ck _CK_VER=1 -_CK_PATCH="http://ck.kolivas.org/patches/5.0/${_LLL_VER}/${_LLL_VER}-ck${_CK_VER}/patch-${_LLL_VER}-ck${_CK_VER}.xz" +_CK_PATCH_SRC="http://ck.kolivas.org/patches/5.0/${_LLL_VER}/${_LLL_VER}-ck${_CK_VER}/patch-${_LLL_VER}-ck${_CK_VER}.xz" +_CK_PATCH_PATCH=( + 'ck-patch-for-5.4.57+.patch' + 'ck-patch-for-5.4.62+.patch' +) # Ultra Kernel Samepage Merging _UKSM_VER=0.1.2.6 -_UKSM_COMMIT=150e27c4e7f66e4519c89573305eca8c42091f4d -_UKSM_PATCH="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' +) # CJKTTY patch # https://github.com/Gentoo-zh/linux-cjktty -# https://github.com/torvalds/linux/compare/v5.4...Gentoo-zh:5.4-utf8 -_CJKTTY_LLL_VER=5.4 -_CJKTTY_PATCH_FILE=linux-cjktty-${_CJKTTY_LLL_VER} -_CJKTTY_PATCH_URL="https://github.com/torvalds/linux/compare/v${_CJKTTY_LLL_VER}...Gentoo-zh:${_CJKTTY_LLL_VER}-utf8.patch" -_CJKTTY_PATCH="${_CJKTTY_PATCH_FILE}.patch::${_CJKTTY_PATCH_URL}" +_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' + 'cjktty-11-patch-for-5.4.62+.patch' + 'cjktty-12-patch-for-5.4.66+.patch' +) _PATHSET_DESC="ck${_CK_VER} uksm-${_UKSM_VER} and cjktty" @@ -60,30 +74,24 @@ 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" "https://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.sign" "https://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz" #"https://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.sign" - ${_CK_PATCH} - ${_UKSM_PATCH} - ${_CJKTTY_PATCH} + ${_CK_PATCH_SRC} + ${_CK_PATCH_PATCH[@]} + '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_PATCH[@]} 'sphinx-workaround.patch' - 'ck-patch-for-5.4.57+.patch' - 'ck-patch-for-5.4.62+.patch' - 'fix-ck-broken-sleep2ram-5.4.48+.patch' # https://github.com/zen-kernel/zen-kernel/commit/fb7e2cfaf61cf5f9c2336331e73296f455bd2d51.patch - 'uksm-patch-for-5.4.33+.patch' - 'uksm-patch-for-5.4.69+.patch' - 'linux-cjktty-patch-for-5.4.36+.patch' - 'linux-cjktty-patch-for-5.4.54+.patch' - 'linux-cjktty-patch-for-5.4.62+.patch' - 'linux-cjktty-patch-for-5.4.66+.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 @@ -92,24 +100,25 @@ validpgpkeys=( # https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc sha256sums=('bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491' 'SKIP' - 'bce941bcb6c8148ac19cd2fa4f1e19c6c75f699a3bcdfd452df7484cff2a2353' + '390145e23c45d190b8601a2648ac5562a2dd602629d2030655d55bc9e706617d' 'f445eea4d0ec2015a25f1ad625c848f4f2252099795966fa4105e0aa29674c5c' - '81d34bf02e771a126af5cb382d44a86dcc759c88b7c89fc7e5b7737731b9130e' - '50213f3270499fceb452946252d61f5471571c77baf3dd510fbb00cfa9831c9a' - 'b7c814c8183e4645947a6dcc3cbf80431de8a8fd4e895b780f9a5fd92f82cb8e' 'a10a4848c7a9842c0c7760b087ea38a4356dc1a2c2e26334cb0106c25785554f' '0334391900f31d6aaedaa68e8917f93262ba3e523f2654774b289e9b18c1a923' '961ed94b8d905f1e901cacb08d253c4170af0a25828111b7558d9c874e923558' + '81d34bf02e771a126af5cb382d44a86dcc759c88b7c89fc7e5b7737731b9130e' '6826624f65276927de012f040e77b02231fe6345b9da7c702deacd9372ea001e' 'cdcd0e0ebd24d9b66c216df01b02da23760a44fe2a451137190f89d18a4c7f59' - '573f1c40951a6ee4cf6b07a6a8a1123b00fcd8bff29843905cf191e08f1d87f2' - '2c9faabb5e09b1f818b051ced3eb90b6c04aa08616952d99eedf328c7c8dda2f' - '4d511fb62966549b9ea4a1d97769f79e4d66fc141cd0b001e7d286367a038a09' - '1f0af2c1044cf177b84fea8bb49aaa5cf9282c5588a7995798d63177565b0727' - '7ce388e429d8df479a721285e445e116c5ee41e3126a702862e59056460b655e' - 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21' - '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' - 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65') + '50213f3270499fceb452946252d61f5471571c77baf3dd510fbb00cfa9831c9a' + 'fa7950b5763a592ca2a04c423842451ac79633deebf77c730fc8ee35dfac2d45' + '81bb112fed28c8ef22d7e02eb4150a76c8d549c72775e65cd3ecf10fa5fe1b4e' + '7b3eea4462811a26c3c32721009a807dcaee5b8fbf1ad3e0cdad851679c9246e' + '0c6385f8d5a61b09d046babe5351ca638ccb5a263e0f167d2b311f57054bc8d1' + 'b7c814c8183e4645947a6dcc3cbf80431de8a8fd4e895b780f9a5fd92f82cb8e' + '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} @@ -121,65 +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}" - patch -i ../ck-patch-for-5.4.57+.patch "../patch-${_LLL_VER}.${_LLL_SUBVER}-ck${_CK_VER}" - patch -i ../ck-patch-for-5.4.62+.patch "../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 "../fix-ck-broken-sleep2ram-5.4.48+.patch" + 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" - patch -i ../uksm-patch-for-5.4.33+.patch "../uksm-${_LLL_VER}.${_LLL_SUBVER}.patch" - patch -i ../uksm-patch-for-5.4.69+.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" - cp "../${_CJKTTY_PATCH_FILE}.patch" "../${_CJKTTY_PATCH_FILE}.${_LLL_SUBVER}.patch" - patch -i ../linux-cjktty-patch-for-5.4.36+.patch "../${_CJKTTY_PATCH_FILE}.${_LLL_SUBVER}.patch" - patch -i ../linux-cjktty-patch-for-5.4.54+.patch "../${_CJKTTY_PATCH_FILE}.${_LLL_SUBVER}.patch" - patch -i ../linux-cjktty-patch-for-5.4.62+.patch "../${_CJKTTY_PATCH_FILE}.${_LLL_SUBVER}.patch" - patch -i ../linux-cjktty-patch-for-5.4.66+.patch "../${_CJKTTY_PATCH_FILE}.${_LLL_SUBVER}.patch" - patch -Np1 -i "../${_CJKTTY_PATCH_FILE}.${_LLL_SUBVER}.patch" + 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 "../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' \ @@ -189,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}" + # 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" - msg2 "Installing modules..." - make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install - - # 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 @@ -358,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/linux-cjktty-patch-for-5.4.36+.patch b/cjktty-11-patch-for-5.4.36+.patch index 139586c4c54..8e89e73f3fe 100644 --- a/linux-cjktty-patch-for-5.4.36+.patch +++ b/cjktty-11-patch-for-5.4.36+.patch @@ -1,5 +1,5 @@ ---- linux-cjktty-5.4.patch 2020-04-30 11:29:47.000000000 +0800 -+++ linux-cjktty-5.4.36.patch 2020-04-30 11:36:17.000000000 +0800 +--- cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support.patch 2020-04-30 11:29:47.000000000 +0800 ++++ cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support-5.4.36.patch 2020-04-30 11:36:17.000000000 +0800 @@ -137,7 +137,7 @@ if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) return 0; diff --git a/linux-cjktty-patch-for-5.4.54+.patch b/cjktty-11-patch-for-5.4.54+.patch index 91f8d22e644..b4c249f6941 100644 --- a/linux-cjktty-patch-for-5.4.54+.patch +++ b/cjktty-11-patch-for-5.4.54+.patch @@ -1,5 +1,5 @@ ---- linux-cjktty-5.4.53.patch 2020-08-08 17:16:04.000000000 +0800 -+++ linux-cjktty-5.4.54.patch 2020-08-08 23:18:35.000000000 +0800 +--- cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support.patch 2020-08-08 17:16:04.000000000 +0800 ++++ cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support-5.4.54.patch 2020-08-08 23:18:35.000000000 +0800 @@ -111,11 +111,11 @@ notify_update(vc); } diff --git a/linux-cjktty-patch-for-5.4.62+.patch b/cjktty-11-patch-for-5.4.62+.patch index 4f6e7877c5d..3336cba142d 100644 --- a/linux-cjktty-patch-for-5.4.62+.patch +++ b/cjktty-11-patch-for-5.4.62+.patch @@ -1,5 +1,5 @@ ---- linux-cjktty-5.4.61.patch 2020-09-05 10:35:09.000000000 +0800 -+++ linux-cjktty-5.4.62.patch 2020-09-05 20:41:19.000000000 +0800 +--- cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support.patch 2020-09-05 10:35:09.000000000 +0800 ++++ cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support-5.4.62.patch 2020-09-05 20:41:19.000000000 +0800 @@ -169,7 +169,7 @@ + scr_memsetw((void *)new_origin + (new_screen_size), vc->vc_video_erase_char, + new_scr_end - new_origin); diff --git a/linux-cjktty-patch-for-5.4.66+.patch b/cjktty-12-patch-for-5.4.66+.patch index dbceeeae02c..17f35c1a6f7 100644 --- a/linux-cjktty-patch-for-5.4.66+.patch +++ b/cjktty-12-patch-for-5.4.66+.patch @@ -1,5 +1,5 @@ ---- linux-cjktty-5.4.65.patch 2020-09-18 00:19:07.610052000 +0800 -+++ linux-cjktty-5.4.66.patch 2020-09-18 19:03:23.870884705 +0800 +--- cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support.patch 2020-09-18 00:19:07.610052000 +0800 ++++ cjktty-10-fix-255-glyph-limit-prepare-for-CJK-font-support-5.4.66.patch 2020-09-18 19:03:23.870884705 +0800 @@ -284,7 +284,7 @@ #include <linux/module.h> #include <linux/slab.h> diff --git a/fix-ck-broken-sleep2ram-5.4.48+.patch b/ck-fix-broken-sleep2ram-5.4.48+.patch index b43e9db1a56..b43e9db1a56 100644 --- a/fix-ck-broken-sleep2ram-5.4.48+.patch +++ b/ck-fix-broken-sleep2ram-5.4.48+.patch diff --git a/linux.install b/linux.install deleted file mode 100644 index 37ba3749460..00000000000 --- 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 66709a8c153..00000000000 --- 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" |