You are not logged in.

#3501 2019-09-14 11:25:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

5.2.15 is due out within 24 hours.  I would be nice is someone could test this and report back prior.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3502 2019-09-15 08:43:12

glitsj16
Member
Registered: 2015-04-26
Posts: 126

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

@graysky I've been trying to do a test build but I'm having some difficulties changing CONFIG_SCHED_DEBUG=y to a value suitable to test the systemd-detect-virt issue. Here's what I added to the linux-ck PKGBUILD for 5.2.14-2 from AUR:

sed -i -e 's/CONFIG_SCHED_DEBUG=y/# CONFIG_SCHED_DEBUG is not set/' ./.config

I added that just above the line where another sed is used to deal with this. After building (which happens smooth and clean) and installing, /usr/lib/modules/5.2.14-2-ck-core2/build/.config still shows CONFIG_SCHED_DEBUG=y, so I must be doing something wrong. The same is in /proc/config.gz. If you (or anyone else) have any insights to share on this, I would be happy to test things thoroughly.

PS: According to CONFIG_SCHED_DEBUG depends on CONFIG_DEBUG_KERNEL and CONFIG_PROC_FS. I've tried disabling CONFIG_DEBUG_KERNEL too, but to no avail. Just to show my kernel building skills are wide-open for improvement...

Offline

#3503 2019-09-15 09:42:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

Directly editing the config can be risky as you can miss dependencies ... best to disable it in nconfig.

EDIT: Ah, proving more difficult since "kernel debugging" is not able to be toggled in nconfig.  It seems one has to disable "EXPERT" to be able to do this...

CONFIG_DEBUG_KERNEL:
Say Y here if you are developing drivers or trying to debug and identify kernel problems.
Symbol: DEBUG_KERNEL [=y] 
Type  : bool 
Prompt: Kernel debugging
Location: -> Kernel hacking
Defined at lib/Kconfig.debug:458
Selected by [y]:
- EXPERT [=y] 

Which is under general:

Configure standard kernel features (expert users)

Then you can deselect kernel debugging it which leads to a shitload of config changes.

@loqs - Check my math on this please.

Example config after switching these 2 off: https://gist.github.com/graysky2/d3a1ca … 0fc81e3373

Last edited by graysky (2019-09-15 10:04:41)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3504 2019-09-15 11:10:01

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

@graysky I missed CONFIG_LATENCYTOP=y is selecting CONFIG_SCHED_DEBUG.

diff --git a/config b/config
index 6d90e34..f191667 100644
--- a/config
+++ b/config
@@ -10214,7 +10214,7 @@ CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
 # CONFIG_PANIC_ON_OOPS is not set
 CONFIG_PANIC_ON_OOPS_VALUE=0
 CONFIG_PANIC_TIMEOUT=0
-CONFIG_SCHED_DEBUG=y
+CONFIG_SCHED_DEBUG=n
 CONFIG_SCHED_INFO=y
 CONFIG_SCHEDSTATS=y
 CONFIG_SCHED_STACK_END_CHECK=y
@@ -10265,7 +10265,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
 # CONFIG_NOTIFIER_ERROR_INJECTION is not set
 CONFIG_FUNCTION_ERROR_INJECTION=y
 # CONFIG_FAULT_INJECTION is not set
-CONFIG_LATENCYTOP=y
+CONFIG_LATENCYTOP=n
 CONFIG_USER_STACKTRACE_SUPPORT=y
 CONFIG_NOP_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y

Offline

#3505 2019-09-15 11:18:22

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

@loqs - There are many more changes doing it in the nconfig... you're sure setting just those two is sane?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3506 2019-09-15 11:43:40

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

kbuild accepted the config.

Offline

#3507 2019-09-15 11:51:13

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

loqs wrote:

@graysky I missed CONFIG_LATENCYTOP=y is selecting CONFIG_SCHED_DEBUG.

diff --git a/config b/config
index 6d90e34..f191667 100644
--- a/config
+++ b/config
@@ -10214,7 +10214,7 @@ CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
 # CONFIG_PANIC_ON_OOPS is not set
 CONFIG_PANIC_ON_OOPS_VALUE=0
 CONFIG_PANIC_TIMEOUT=0
-CONFIG_SCHED_DEBUG=y
+CONFIG_SCHED_DEBUG=n
 CONFIG_SCHED_INFO=y
 CONFIG_SCHEDSTATS=y
 CONFIG_SCHED_STACK_END_CHECK=y
@@ -10265,7 +10265,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
 # CONFIG_NOTIFIER_ERROR_INJECTION is not set
 CONFIG_FUNCTION_ERROR_INJECTION=y
 # CONFIG_FAULT_INJECTION is not set
-CONFIG_LATENCYTOP=y
+CONFIG_LATENCYTOP=n
 CONFIG_USER_STACKTRACE_SUPPORT=y
 CONFIG_NOP_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y

@arun_kpm or @glitsj16 - Care to build with loqs' suggested config and report back?  Fixes issue?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3508 2019-09-15 13:35:34

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

systemd-detect-virt --container works correctly with both of the following:

linux-ck 5.2.14-2 with patched config

diff --git a/config b/config
index 6d90e34..f191667 100644
--- a/config
+++ b/config
@@ -10214,7 +10214,7 @@ CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
 # CONFIG_PANIC_ON_OOPS is not set
 CONFIG_PANIC_ON_OOPS_VALUE=0
 CONFIG_PANIC_TIMEOUT=0
-CONFIG_SCHED_DEBUG=y
+CONFIG_SCHED_DEBUG=n
 CONFIG_SCHED_INFO=y
 CONFIG_SCHEDSTATS=y
 CONFIG_SCHED_STACK_END_CHECK=y
@@ -10265,7 +10265,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
 # CONFIG_NOTIFIER_ERROR_INJECTION is not set
 CONFIG_FUNCTION_ERROR_INJECTION=y
 # CONFIG_FAULT_INJECTION is not set
-CONFIG_LATENCYTOP=y
+CONFIG_LATENCYTOP=n
 CONFIG_USER_STACKTRACE_SUPPORT=y
 CONFIG_NOP_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y

linux-ck 5.2.14-2 with unpatched config MuQSS patched with

diff --git a/kernel/sched/MuQSS.c b/kernel/sched/MuQSS.c
index 9e0dc715646c..fc794680641c 100644
--- a/kernel/sched/MuQSS.c
+++ b/kernel/sched/MuQSS.c
@@ -7296,7 +7296,10 @@ __read_mostly bool sched_debug_enabled;
 
 void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
 			  struct seq_file *m)
-{}
+{
+	seq_printf(m, "%s (%d, #threads: %d)\n", p->comm, task_pid_nr_ns(p, ns),
+						get_nr_threads(p));
+}
 
 void proc_sched_set_task(struct task_struct *p)
 {}

Offline

#3509 2019-09-15 14:11:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

@loqs - Thanks for the clear reply.  I pushed e2553b68 just now which I believe incorporates these changes.  Please give it a look-see.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3510 2019-09-15 15:04:18

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

You applied both fixes which will work but either one on its own will also work.

Offline

#3511 2019-09-15 17:20:28

madlotus
Member
Registered: 2019-08-27
Posts: 1

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

@graysky first of all thanks for your awesome work on linux-ck

i'm using your kernel since a month ago with sandy bridge optimization

i tried to update to the last version but it fails on the build

this is the log of yay:

kernel/sched/MuQSS.c:7310: error: unterminated #ifdef
 7310 | #ifdef CONFIG_CGROUP_SCHED
      | 
make[2]: *** [scripts/Makefile.build:279: kernel/sched/MuQSS.o] Error 1
make[1]: *** [scripts/Makefile.build:489: kernel/sched] Error 2
make: *** [Makefile:1077: kernel] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
Error making: linux-ck (linux-ck linux-ck-headers)

i don't know how to do now to try to compile it well

thanks for your time

Last edited by madlotus (2019-09-15 17:22:20)

Offline

#3512 2019-09-15 18:06:28

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

Applying the fix to the ck patch then applying the ck patch somehow causes the end of MuQSS.c to be missing.
fix for PKGBUILD

diff --git a/PKGBUILD b/PKGBUILD
index 3431cb9..f6e001f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -99,7 +99,7 @@ sha256sums=('c64d36477fee6a864a734ec417407768e60040a13f144c33208fa9622fd0ce8c'
             'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
             '8c11086809864b5cef7d079f930bd40da8d0869c091965fa62e95de9a0fe13b5'
             'f1abc13a8d859fbf6350040e45d7f04ad551a6d39f113ba96fbbd820118c0e36'
-            'c3215b4eaf707d1a7d783b1661e9df038f93605ad2ae7936238a8e2ed109ea75'
+            '89c826f790fd56b8a667279e812f315ed9fef812f9294a92d8d0f56d49fa7432'
             '91fafa76bf9cb32159ac7f22191b3589278b91e65bc4505cf2fc6013b8037bf3'
             '63e4378e69e2f23ed87af32a4951477a6d82d4ac0de2295db46502c8120da9d9'
             'f45f8695a7fe308b7aaef874df0a51ce91ac47ef180adf0cc507b482aad2459f')
@@ -108,10 +108,6 @@ _kernelname=${pkgbase#linux}
 : ${_kernelname:=-ARCH}
 
 prepare() {
-  # fix for systemd-detect-virt containers
-  # https://bbs.archlinux.org/viewtopic.php?pid=1863567#p1863567
-  patch -i fix_patch-5.2-ck1_for_systemd-detect-virt_containers.patch
-
   cd linux-${pkgver}
 
   msg2 "Setting version..."
@@ -143,6 +139,10 @@ prepare() {
 
   msg2 "Patching with ck patchset..."
   patch -Np1 -i ../"${_ckpatch}"
+
+  # fix for systemd-detect-virt containers
+  # https://bbs.archlinux.org/viewtopic.php?pid=1863567#p1863567
+  patch -Np1 -i ../fix_patch-5.2-ck1_for_systemd-detect-virt_containers.patch
   
   # https://github.com/graysky2/kernel_gcc_patch
   msg2 "Applying enable_additional_cpu_optimizations_for_gcc_v9.1+_kernel_v4.13+.patch ..."
diff --git a/fix_patch-5.2-ck1_for_systemd-detect-virt_containers.patch b/fix_patch-5.2-ck1_for_systemd-detect-virt_containers.patch
index a865e34..0f9629f 100644
--- a/fix_patch-5.2-ck1_for_systemd-detect-virt_containers.patch
+++ b/fix_patch-5.2-ck1_for_systemd-detect-virt_containers.patch
@@ -1,14 +1,16 @@
---- a/patch-5.2-ck1	2019-09-15 09:50:19.754754121 -0400
-+++ b/patch-5.2-ck1	2019-09-15 09:51:08.842070790 -0400
-@@ -14886,7 +14886,10 @@ index 000000000000..ab972d0af7b5
- +
- +void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
- +			  struct seq_file *m)
--+{}
-++{
-++ seq_printf(m, "%s (%d, #threads: %d)\n", p->comm, task_pid_nr_ns(p, ns),
-++           get_nr_threads(p));
-++}
- +
- +void proc_sched_set_task(struct task_struct *p)
- +{}
+diff --git a/kernel/sched/MuQSS.c b/kernel/sched/MuQSS.c
+index 9e0dc715646c..fc794680641c 100644
+--- a/kernel/sched/MuQSS.c
++++ b/kernel/sched/MuQSS.c
+@@ -7296,7 +7296,10 @@ __read_mostly bool sched_debug_enabled;
+ 
+ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
+ 			  struct seq_file *m)
+-{}
++{
++	seq_printf(m, "%s (%d, #threads: %d)\n", p->comm, task_pid_nr_ns(p, ns),
++						get_nr_threads(p));
++}
+ 
+ void proc_sched_set_task(struct task_struct *p)
+ {}

PKGBUILD with fix applied

# Maintainer: graysky <graysky AT archlinux DOT us>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>

### BUILD OPTIONS
# Set these variables to ANYTHING that is not null to enable them

# Tweak kernel options prior to a build via nconfig
_makenconfig=

# Optionally select a sub architecture by number if building in a clean chroot
# Leaving this entry blank will require user interaction during the build
# which will cause a failure to build if using makechrootpkg. Note that the
# generic (default) option is 27.
#
# Note - the march=native option is unavailable by this method, use the nconfig
# and manually select it.
#
#  1. AMD Opteron/Athlon64/Hammer/K8 (MK8)
#  2. AMD Opteron/Athlon64/Hammer/K8 with SSE3 (MK8SSE3)
#  3. AMD 61xx/7x50/PhenomX3/X4/II/K10 (MK10)
#  4. AMD Barcelona (MBARCELONA)
#  5. AMD Bobcat (MBOBCAT)
#  6. AMD Jaguar (MJAGUAR)
#  7. AMD Bulldozer (MBULLDOZER)
#  8. AMD Piledriver (MPILEDRIVER)
#  9. AMD Steamroller (MSTEAMROLLER)
#  10. AMD Excavator (MEXCAVATOR)
#  11. AMD Zen (MZEN)
#  12. AMD Zen 2 (MZEN2)
#  13. Intel P4 / older Netburst based Xeon (MPSC)
#  14. Intel Atom (MATOM)
#  15. Intel Core 2 (MCORE2)
#  16. Intel Nehalem (MNEHALEM)
#  17. Intel Westmere (MWESTMERE)
#  18. Intel Silvermont (MSILVERMONT)
#  19. Intel Goldmont (MGOLDMONT)
#  20. Intel Goldmont Plus (MGOLDMONTPLUS)
#  21. Intel Sandy Bridge (MSANDYBRIDGE)
#  22. Intel Ivy Bridge (MIVYBRIDGE)
#  23. Intel Haswell (MHASWELL)
#  24. Intel Broadwell (MBROADWELL)
#  25. Intel Skylake (MSKYLAKE)
#  26. Intel Skylake X (MSKYLAKEX)
#  27. Intel Cannon Lake (MCANNONLAKE)
#  28. Intel Ice Lake (MICELAKE)
#  29. Intel Cascade Lake (MCASCADELAKE)
#  30. Generic-x86-64 (GENERIC_CPU)
#  31. Native optimizations autodetected by GCC (MNATIVE)
_subarch=

# Compile ONLY used modules to VASTLYreduce the number of modules built
# and the build time.
#
# To keep track of which modules are needed for your specific system/hardware,
# give module_db script a try: https://aur.archlinux.org/packages/modprobed-db
# This PKGBUILD read the database kept if it exists
#
# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db
_localmodcfg=

### IMPORTANT: Do no edit below this line unless you know what you're doing

pkgbase=linux-ck
_srcver=5.2.14-arch1
pkgver=${_srcver%-*}
pkgrel=3
_ckpatchversion=1
arch=(x86_64)
url="https://wiki.archlinux.org/index.php/Linux-ck"
license=(GPL2)
makedepends=(kmod inetutils bc libelf)
options=('!strip')
_ckpatch="patch-5.2-ck${_ckpatchversion}"
_gcc_more_v='20190822'
source=(
  "https://www.kernel.org/pub/linux/kernel/v5.x/linux-$pkgver.tar".{xz,sign}
  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
  "enable_additional_cpu_optimizations-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/$_gcc_more_v.tar.gz"
  "http://ck.kolivas.org/patches/5.0/5.2/5.2-ck${_ckpatchversion}/$_ckpatch.xz"
  fix_patch-5.2-ck1_for_systemd-detect-virt_containers.patch
  0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
  0002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch
  0003-Btrfs-fix-unwritten-extent-buffers-and-hangs-on-futu.patch
)
validpgpkeys=(
  'ABAF11C65A2970B130ABE3C479BE3E4300411886'  # Linus Torvalds
  '647F28654894E3BD457199BE38DBBDC86092693E'  # Greg Kroah-Hartman
)
sha256sums=('c64d36477fee6a864a734ec417407768e60040a13f144c33208fa9622fd0ce8c'
            'SKIP'
            '42e2bc6a7d8439b3a6fe4084d1349077472e0a6831d8a39edda46824a5f0987b'
            'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
            'c043f3033bb781e2688794a59f6d1f7ed49ef9b13eb77ff9a425df33a244a636'
            'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
            '8c11086809864b5cef7d079f930bd40da8d0869c091965fa62e95de9a0fe13b5'
            'f1abc13a8d859fbf6350040e45d7f04ad551a6d39f113ba96fbbd820118c0e36'
            '89c826f790fd56b8a667279e812f315ed9fef812f9294a92d8d0f56d49fa7432'
            '91fafa76bf9cb32159ac7f22191b3589278b91e65bc4505cf2fc6013b8037bf3'
            '63e4378e69e2f23ed87af32a4951477a6d82d4ac0de2295db46502c8120da9d9'
            'f45f8695a7fe308b7aaef874df0a51ce91ac47ef180adf0cc507b482aad2459f')

_kernelname=${pkgbase#linux}
: ${_kernelname:=-ARCH}

prepare() {
  cd linux-${pkgver}

  msg2 "Setting version..."
  scripts/setlocalversion --save-scmversion
  echo "-$pkgrel" > localversion.10-pkgrel
  echo "$_kernelname" > localversion.20-pkgname

  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = 00*.patch ]] || continue
    msg2 "Applying patch $src..."
    patch -Np1 < "../$src"
  done

  msg2 "Setting config..."
  cp ../config .config

  # https://bbs.archlinux.org/viewtopic.php?pid=1824594#p1824594
  sed -i -e 's/# CONFIG_PSI_DEFAULT_DISABLED is not set/CONFIG_PSI_DEFAULT_DISABLED=y/' ./.config

  # https://bbs.archlinux.org/viewtopic.php?pid=1863567#p1863567
  sed -i -e '/CONFIG_LATENCYTOP=/ s,y,n,' \
      -i -e '/CONFIG_SCHED_DEBUG=/ s,y,n,' ./.config

  # fix naming schema in EXTRAVERSION of ck patch set
  sed -i -re "s/^(.EXTRAVERSION).*$/\1 = /" "../${_ckpatch}"

  msg2 "Patching with ck patchset..."
  patch -Np1 -i ../"${_ckpatch}"

  # fix for systemd-detect-virt containers
  # https://bbs.archlinux.org/viewtopic.php?pid=1863567#p1863567
  patch -Np1 -i ../fix_patch-5.2-ck1_for_systemd-detect-virt_containers.patch
  
  # https://github.com/graysky2/kernel_gcc_patch
  msg2 "Applying enable_additional_cpu_optimizations_for_gcc_v9.1+_kernel_v4.13+.patch ..."
  patch -Np1 -i "$srcdir/kernel_gcc_patch-$_gcc_more_v/enable_additional_cpu_optimizations_for_gcc_v9.1+_kernel_v4.13+.patch"

  if [ -n "$_subarch" ]; then
    yes "$_subarch" | make oldconfig
  else
    make prepare
  fi

  ### Optionally load needed modules for the make localmodconfig
  # See https://aur.archlinux.org/packages/modprobed-db
    if [ -n "$_localmodcfg" ]; then
      if [ -f $HOME/.config/modprobed.db ]; then
        msg2 "Running Steven Rostedt's make localmodconfig now"
        make LSMOD=$HOME/.config/modprobed.db localmodconfig
      else
        msg2 "No modprobed.db data found"
        exit
      fi
    fi

  # do not run `make olddefconfig` as it sets default options
  yes "" | make config >/dev/null

  make -s kernelrelease > ../version
  msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)"

  [[ -z "$_makenconfig" ]] || make nconfig

  # save configuration for later reuse
  cat .config > "${startdir}/config.last"
}

build() {
  cd linux-${pkgver}
  make bzImage modules
}

_package() {
  pkgdesc="The ${pkgbase/linux/Linux} kernel and modules with the ck1 patchset featuring MuQSS CPU scheduler v0.192"
  #_Kpkgdesc="The ${pkgbase/linux/Linux} kernel and modules with the ck1 patchset featuring MuQSS CPU scheduler v0.192"
  #pkgdesc="${_Kpkgdesc}"
  depends=(coreutils linux-firmware kmod mkinitcpio)
  optdepends=('crda: to set the correct wireless channels of your country')
  provides=("linux-ck=${pkgver}")
  backup=("etc/mkinitcpio.d/$pkgbase.preset")
  install=linux.install
  #groups=('ck-generic')

  local kernver="$(<version)"
  local modulesdir="$pkgdir/usr/lib/modules/$kernver"

  cd linux-${pkgver}

  msg2 "Installing boot image..."
  # 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"
  install -Dm644 "$modulesdir/vmlinuz" "$pkgdir/boot/vmlinuz-$pkgbase"

  msg2 "Installing modules..."
  make INSTALL_MOD_PATH="$pkgdir/usr" modules_install

  # a place for external modules,
  # with version file for building modules and running depmod from hook
  local extramodules="extramodules$_kernelname"
  local extradir="$pkgdir/usr/lib/modules/$extramodules"
  install -Dt "$extradir" -m644 ../version
  ln -sr "$extradir" "$modulesdir/extramodules"

  # remove build and source links
  rm "$modulesdir"/{source,build}

  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

  # fill in mkinitcpio preset 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"
}

_package-headers() {
  pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
  #_Hpkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
  #pkgdesc="${_Hpkgdesc}"
  depends=('linux-ck') # added to keep kernel and headers packages matched
  provides=("linux-ck-headers=${pkgver}" "linux-headers=${pkgver}")
  #groups=('ck-generic')

  local builddir="$pkgdir/usr/lib/modules/$(<version)/build"

  cd linux-${pkgver}

  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

  # add objtool for external module building and enabled VALIDATION_STACK option
  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"

  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

  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

  # 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

  msg2 "Installing KConfig files..."
  find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;

  msg2 "Removing unneeded architectures..."
  local arch
  for arch in "$builddir"/arch/*/; do
    [[ $arch = */x86/ ]] && continue
    echo "Removing $(basename "$arch")"
    rm -r "$arch"
  done

  msg2 "Removing documentation..."
  rm -r "$builddir/Documentation"

  msg2 "Removing broken symlinks..."
  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

  msg2 "Stripping build tools..."
  local file
  while read -rd '' file; do
    case "$(file -bi "$file")" in
      application/x-sharedlib\;*)      # Libraries (.so)
        strip -v $STRIP_SHARED "$file" ;;
      application/x-archive\;*)        # Libraries (.a)
        strip -v $STRIP_STATIC "$file" ;;
      application/x-executable\;*)     # Binaries
        strip -v $STRIP_BINARIES "$file" ;;
      application/x-pie-executable\;*) # Relocatable binaries
        strip -v $STRIP_SHARED "$file" ;;
    esac
  done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)

  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"
}

pkgname=("$pkgbase" "$pkgbase-headers")
for _p in "${pkgname[@]}"; do
  eval "package_$_p() {
    $(declare -f "_package${_p#$pkgbase}")
    _package${_p#$pkgbase}
  }"
done

# vim:set ts=8 sts=2 sw=2 et:

Note this still applies both fixes but will test this builds first.

Offline

#3513 2019-09-15 18:37:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

loqs wrote:

You applied both fixes which will work but either one on its own will also work.

I misread your post above as both are needed.  a24f91cc drops the patch and just modifies the config.

I haven't been following the discussion, has anyone informed CK?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3514 2019-09-15 18:45:56

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

I do not know of anyone informing CK.

Offline

#3515 2019-09-15 19:30:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

To those affected users, would one of you please post to ck's blog or privately email him about this (a few sentences and a link to the discussion).


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3516 2019-09-15 20:15:08

glitsj16
Member
Registered: 2015-04-26
Posts: 126

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

@graysky Confirming 5.2.14-4 fixes the issues I had with systemd units using 'ConditionVirtualization'. All back to normal. A big thank you to all involved! Just one more side-note. I saw the insides of the PKGBUILD so often today that I noticed a few things are off, all nitpicks:

- potential confusion in 'sub architecture' section, '... generic (default) option is 27.' --> shouldn't that be 30?);
- the newly introduced sed only needs one '-i' instead of two; and
- MuQSS is still tagged as v0.192 instead of v0.193 in {_K}pkgdesc vars.

Here's a diff against 5.2.14-4. Thanks again for all your efforts.

PS: I'll inform CK via his blog.

Offline

#3517 2019-09-15 21:10:25

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

@glitsj16 - Thanks for confirmation.  I fixed 2/3 of the nitpicks.  I have always included -i in sed with multiple calls, superfluous or not tongue


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3518 2019-10-12 14:57:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

With the recent update removing extramodules, I don't have the time/resources to keep providing the broadcom and nvidia* packages.  With the release of 5.2.21 today, I will point users of broadcom-wl-ck, nvidia-ck, and nvidia-390xx-ck to install the official dkms package(s) which so long as you have the linux-ck-flavor-headers installed, will get build automatically for you.  Since nvidia-340xx-dkms has been removed from [extra], please use the nvidia-340xx-dkms package from the AUR.

Last edited by graysky (2019-10-19 13:25:17)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3519 2019-10-13 15:39:31

almindor
Member
Registered: 2015-10-10
Posts: 33

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

I'm getting 404s on the ck-zen repo now: linux-ck-zen-* packages all 404.

Is this a known issue?

Offline

#3520 2019-10-13 16:58:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

almindor wrote:

I'm getting 404s on the ck-zen repo now: linux-ck-zen-* packages all 404.

Is this a known issue?

Not sure what happened... both zen and p4 did not get transferred.  Will fix in several hours, thanks for letting me know.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3521 2019-10-13 17:09:27

txtsd
Member
Registered: 2014-10-02
Posts: 96
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

graysky wrote:
almindor wrote:

I'm getting 404s on the ck-zen repo now: linux-ck-zen-* packages all 404.

Is this a known issue?

Not sure what happened... both zen and p4 did not get transferred.  Will fix in several hours, thanks for letting me know.

Thanks. I was trying to get the ck-zen packages too.


[CPU] AMD Ryzen 5 2400G
[iGPU] AMD RX Vega 11
[Kernel] linux-zen
[sway] [zsh] Arch user since [2014-09-01 02:09]

Offline

#3522 2019-10-13 18:46:39

Tharbad
Member
Registered: 2016-02-27
Posts: 270

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

graysky wrote:

With the recent update removing extramodules, I don't have the time/resources to keep providing the broadcom and nvidia* packages.  With the release of 5.2.21 today, I will point users of broadcom-wl-ck, nvidia-ck, nvidia-340xx-ck, and nvidia-390xx-ck to the respective dkms packages which are now live in the AUR and will build these for you automatically.

I'll attempt to create a PKGBUILD that gets the right ck version by itself so you don't need to edit the PKGBUILD each time (like I did with the virtualbox host dkms).

This line will give you the kernel name (in my case linux-ck-ivybridge):
pacman -Q linux-ck | awk '{print $1}'

Just exchange the line 22:
_kernelname=linux-ck 

with
_kernelname="$(pacman -Q linux-ck | awk '{print $1}')"

Last edited by Tharbad (2019-10-13 18:55:47)

Offline

#3523 2019-10-13 19:00:00

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,083

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

-Qq is a far, far better way than piping to awk. Even if you had to pipe to something, awk would be severe overkill when cut would do it.

Offline

#3524 2019-10-13 20:26:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

OK... zen and p4 packages are there now.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3525 2019-10-13 21:06:19

Tharbad
Member
Registered: 2016-02-27
Posts: 270

Re: unofficial linux-ck repo with cpu optimized packages is ONLINE

Scimmia wrote:

-Qq is a far, far better way than piping to awk. Even if you had to pipe to something, awk would be severe overkill when cut would do it.

Thanks.

Offline

Board footer

Powered by FluxBB