diff options
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 124 | ||||
-rw-r--r-- | cacule_config | 153 |
3 files changed, 131 insertions, 149 deletions
@@ -1,7 +1,7 @@ pkgbase = linux-cacule pkgdesc = Linux-CacULE Kernel by Hamad Marri and with some other patchsets pkgver = 5.11.15 - pkgrel = 7 + pkgrel = 8 url = http://www.kernel.org/ arch = x86_64 license = GPL2 @@ -62,4 +62,3 @@ pkgname = linux-cacule pkgname = linux-cacule-headers pkgdesc = Headers and scripts for building modules for the Linux-CacULE Kernel by Hamad Marri and with some other patchsets kernel depends = pahole - @@ -23,19 +23,27 @@ fi if [ -z ${use_tracers+x} ]; then use_tracers=n fi - +# +# If you want to use modeprobed-db sothat only the active modules will be compiled +# if [ -z ${_localmodcfg} ]; then _localmodcfg=n fi - - +# +# fsync +# if [ -z ${fsync+x} ]; then fsync=y fi - +# +# Futex2 +# if [ -z ${futex2+x} ]; then futex2=y fi +# +# Winesync +# if [ -z ${winesync+x} ]; then winesync=y fi @@ -46,7 +54,7 @@ fi pkgbase=linux-cacule pkgver=5.11.15 -pkgrel=7 +pkgrel=8 pkgdesc='Linux-CacULE Kernel by Hamad Marri and with some other patchsets' url="http://www.kernel.org/" arch=(x86_64) @@ -123,81 +131,81 @@ prepare() { # Copy "${srcdir}"/config to linux-${pkgver}/.config # msg2 "Copy "${srcdir}"/config to linux-5.11.14/.config" # cp "${srcdir}"/config-5.11 .config - echo "Setting config..." - cp ../config .config + echo "Setting config..." + cp ../config .config # disable CONFIG_DEBUG_INFO=y at build time otherwise memory usage blows up # and can easily overwhelm a system with 32 GB of memory using a tmpfs build # partition ... this was introduced by FS#66260, see: # https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux&id=663b08666b269eeeeaafbafaee07fd03389ac8d7 - scripts/config --disable CONFIG_DEBUG_INFO - scripts/config --disable CONFIG_CGROUP_BPF - scripts/config --disable CONFIG_BPF_LSM - scripts/config --disable CONFIG_BPF_PRELOAD - scripts/config --disable CONFIG_BPF_LIRC_MODE2 - scripts/config --disable CONFIG_BPF_KPROBE_OVERRIDE + scripts/config --disable CONFIG_DEBUG_INFO + scripts/config --disable CONFIG_CGROUP_BPF + scripts/config --disable CONFIG_BPF_LSM + scripts/config --disable CONFIG_BPF_PRELOAD + scripts/config --disable CONFIG_BPF_LIRC_MODE2 + scripts/config --disable CONFIG_BPF_KPROBE_OVERRIDE # https://bbs.archlinux.org/viewtopic.php?pid=1824594#p1824594 - scripts/config --enable CONFIG_PSI_DEFAULT_DISABLED + scripts/config --enable CONFIG_PSI_DEFAULT_DISABLED # https://bbs.archlinux.org/viewtopic.php?pid=1863567#p1863567 - scripts/config --disable CONFIG_LATENCYTOP - scripts/config --disable CONFIG_SCHED_DEBUG + scripts/config --disable CONFIG_LATENCYTOP + scripts/config --disable CONFIG_SCHED_DEBUG # FS#66613 # https://bugzilla.kernel.org/show_bug.cgi?id=207173#c6 - scripts/config --disable CONFIG_KVM_WERROR + scripts/config --disable CONFIG_KVM_WERROR # Customize the kernel - source "${startdir}"/cacule_config + source "${startdir}"/cacule_config - configure + configure - cpu_arch + cpu_arch # User set. See at the top of this file - if [ "$use_tracers" = "n" ]; then - msg2 "Disabling FUNCTION_TRACER/GRAPH_TRACER..." - scripts/config --disable CONFIG_FUNCTION_TRACER \ - --disable CONFIG_STACK_TRACER - fi - - if [ "$use_numa" = "n" ]; then - echo "Disable NUMA" - scripts/config --disable CONFIG_NUMA - scripts/config --disable CONFIG_AMD_NUMA - scripts/config --disable CONFIG_X86_64_ACPI_NUMA - scripts/config --disable CONFIG_NODES_SPAN_OTHER_NODES - scripts/config --disable CONFIG_NUMA_EMU - scripts/config --disable CONFIG_NEED_MULTIPLE_NODES - scripts/config --disable CONFIG_USE_PERCPU_NUMA_NODE_ID - scripts/config --disable CONFIG_ACPI_NUMA - scripts/config --disable CONFIG_ARCH_SUPPORTS_NUMA_BALANCING - scripts/config --disable CONFIG_NODES_SHIFT - scripts/config --undefine CONFIG_NODES_SHIFT - scripts/config --disable CONFIG_NEED_MULTIPLE_NODES + if [ "$use_tracers" = "n" ]; then + echo "Disabling FUNCTION_TRACER/GRAPH_TRACER..." + scripts/config --disable CONFIG_FUNCTION_TRACER \ + --disable CONFIG_STACK_TRACER fi - if [ "$fsync" = "y" ]; then - echo "Enable Fsync support" - scripts/config --enable CONFIG_FUTEX - scripts/config --enable CONFIG_FUTEX_PI - fi - - if [ "$futex2" = "y" ]; then - echo "Enable Futex2 support" - scripts/config --enable CONFIG_FUTEX2 - fi - - if [ "$winesync" = "y" ]; then - echo "Enable winesync support" - scripts/config --module CONFIG_WINESYNC - fi + if [ "$use_numa" = "n" ]; then + echo "Disable NUMA" + scripts/config --disable CONFIG_NUMA + scripts/config --disable CONFIG_AMD_NUMA + scripts/config --disable CONFIG_X86_64_ACPI_NUMA + scripts/config --disable CONFIG_NODES_SPAN_OTHER_NODES + scripts/config --disable CONFIG_NUMA_EMU + scripts/config --disable CONFIG_NEED_MULTIPLE_NODES + scripts/config --disable CONFIG_USE_PERCPU_NUMA_NODE_ID + scripts/config --disable CONFIG_ACPI_NUMA + scripts/config --disable CONFIG_ARCH_SUPPORTS_NUMA_BALANCING + scripts/config --disable CONFIG_NODES_SHIFT + scripts/config --undefine CONFIG_NODES_SHIFT + scripts/config --disable CONFIG_NEED_MULTIPLE_NODES + fi + + if [ "$fsync" = "y" ]; then + echo "Enable Fsync support" + scripts/config --enable CONFIG_FUTEX + scripts/config --enable CONFIG_FUTEX_PI + fi + + if [ "$futex2" = "y" ]; then + echo "Enable Futex2 support" + scripts/config --enable CONFIG_FUTEX2 + fi + + if [ "$winesync" = "y" ]; then + echo "Enable winesync support" + scripts/config --module CONFIG_WINESYNC + fi # Setting localversion - msg2 "Setting localversion..." - scripts/setlocalversion --save-scmversion - echo "-${pkgbase}" > localversion + echo "Setting localversion..." + scripts/setlocalversion --save-scmversion + echo "-${pkgbase}" > localversion make olddefconfig diff --git a/cacule_config b/cacule_config index fc2997890f2c..0495d12c4cdc 100644 --- a/cacule_config +++ b/cacule_config @@ -3,7 +3,24 @@ configure() { echo "Enable CacULE CPU scheduler..." scripts/config --enable CONFIG_CACULE_SCHED -#scripts/config --set-val CONFIG_NR_CPUS "12" +scripts/config --set-val CONFIG_NR_CPUS "12" +echo "General Setup" +scripts/config --disable CONFIG_SECURITY +scripts/config --disable CONFIG_HARDENED_USERCOPY +scripts/config --disable CONFIG_EXPERT +scripts/config --disable CONFIG_BSD_PROCESS_ACCT +scripts/config --disable CONFIG_TASK_XACCT +scripts/config --disable CONFIG_PSI +scripts/config --disable CONFIG_AUDIT +scripts/config --disable CONFIG_VIRT_CPU_ACCOUNTING_GEN +scripts/config --enable CONFIG_TICK_CPU_ACCOUNTING +scripts/config --disable CONFIG_CGROUP_CPUACCT +scripts/config --disable CONFIG_CGROUP_DEBUG +scripts/config --disable CONFIG_CHECKPOINT_RESTORE +scripts/config --disable CONFIG_SLAB_MERGE_DEFAULT +scripts/config --disable CONFIG_SLAB_FREELIST_HARDENED +scripts/config --disable CONFIG_SLUB_CPU_PARTIAL +scripts/config --disable CONFIG_PROFILING echo "Processor type and features Cacule" scripts/config --disable CONFIG_RETPOLINE scripts/config --disable CONFIG_X86_5LEVEL @@ -17,13 +34,58 @@ scripts/config --disable CONFIG_PREEMPT_VOLUNTARY scripts/config --enable CONFIG_PREEMPT scripts/config --enable CONFIG_PREEMPT_COUNT scripts/config --enable CONFIG_PREEMPTION -msg2 "Set CPU DEVFREQ GOV CONFIG_DEVFREQ_GOV for performance" +echo "Set CPU DEVFREQ GOV CONFIG_DEVFREQ_GOV for performance" scripts/config --disable CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND scripts/config --undefine CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND scripts/config --disable CONFIG_DEVFREQ_GOV_POWERSAVE scripts/config --disable CONFIG_DEVFREQ_GOV_USERSPACE scripts/config --disable CONFIG_DEVFREQ_GOV_PASSIVE scripts/config --enable CONFIG_DEVFREQ_GOV_PERFORMANCE +echo "General architecture-dependent options Cacule" +scripts/config --disable CONFIG_KPROBES +scripts/config --disable CONFIG_STACKPROTECTOR +scripts/config --disable CONFIG_VMAP_STACK +echo "Kernel hacking Cacule" + scripts/config --disable CONFIG_FTRACE +scripts/config --disable CONFIG_DEBUG_KERNEL +scripts/config --disable CONFIG_PAGE_EXTENSION +scripts/config --disable CONFIG_PRINTK_TIME +scripts/config --disable CONFIG_DEBUG_INFO +scripts/config --set-val CONFIG_RCU_CPU_STALL_TIMEOUT 4 +scripts/config --disable CONFIG_ENABLE_MUST_CHECK +scripts/config --disable CONFIG_STRIP_ASM_SYMS +scripts/config --disable CONFIG_UNUSED_SYMBOLS +scripts/config --disable CONFIG_DEBUG_FS +scripts/config --disable CONFIG_OPTIMIZE_INLINING +scripts/config --disable CONFIG_DEBUG_SECTION_MISMATCH +scripts/config --disable CONFIG_SECTION_MISMATCH_WARN_ONLY +scripts/config --disable CONFIG_STACK_VALIDATION +scripts/config --disable CONFIG_DEBUG_FORCE_WEAK_PER_CPU +scripts/config --disable CONFIG_MAGIC_SYSRQ +scripts/config --disable CONFIG_MAGIC_SYSRQ_SERIAL +scripts/config --disable CONFIG_PAGE_EXTENSION +scripts/config --disable CONFIG_DEBUG_PAGEALLOC +scripts/config --disable CONFIG_PAGE_OWNER +scripts/config --disable CONFIG_DEBUG_MEMORY_INIT +scripts/config --disable CONFIG_HARDLOCKUP_DETECTOR +scripts/config --disable CONFIG_SOFTLOCKUP_DETECTOR +scripts/config --disable CONFIG_DETECT_HUNG_TASK +scripts/config --disable CONFIG_WQ_WATCHDOG +scripts/config --disable CONFIG_SCHED_DEBUG +scripts/config --disable CONFIG_SCHEDSTATS +scripts/config --set-val CONFIG_PANIC_TIMEOUT 10 +scripts/config --disable CONFIG_SCHED_STACK_END_CHECK +scripts/config --disable CONFIG_DEBUG_BUGVERBOSE +scripts/config --disable CONFIG_RCU_TRACE +scripts/config --set-val CONFIG_RCU_CPU_STALL_TIMEOUT 4 +scripts/config --disable CONFIG_FAULT_INJECTION +scripts/config --disable CONFIG_LATENCYTOP +scripts/config --disable CONFIG_PROVIDE_OHCI1394_DMA_INIT +scripts/config --disable RUNTIME_TESTING_MENU +scripts/config --disable CONFIG_MEMTEST +scripts/config --disable CONFIG_KGDB +scripts/config --disable CONFIG_EARLY_PRINTK +scripts/config --disable CONFIG_DOUBLEFAULT echo "Set PCIEASPM DRIVER to performance" scripts/config --enable CONFIG_PCIEASPM scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE @@ -343,93 +405,6 @@ sleep 2 #scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE fi - sleep 2s - - plain "" - plain "#########################################" - plain "Apply suggested config by Hamad Al Marri" - read -rp "`echo $' > 1.Yes\n > 2.No\n > Default (No)\nchoice[1-2]: '`" _suggest_cacule - if [[ $_suggest_cacule = "1" ]]; then - msg2 "Apply suggested config" - msg2 "Security Cacule" - scripts/config --disable CONFIG_SECURITY - scripts/config --disable CONFIG_HARDENED_USERCOPY - msg2 "General Setup Cacule" - scripts/config --disable CONFIG_EXPERT - scripts/config --disable CONFIG_BSD_PROCESS_ACCT - scripts/config --disable CONFIG_TASK_XACCT - scripts/config --disable CONFIG_PSI - scripts/config --disable CONFIG_AUDIT - scripts/config --disable CONFIG_VIRT_CPU_ACCOUNTING_GEN - scripts/config --enable CONFIG_TICK_CPU_ACCOUNTING - scripts/config --disable CONFIG_CGROUP_CPUACCT - scripts/config --disable CONFIG_CGROUP_DEBUG - scripts/config --disable CONFIG_CHECKPOINT_RESTORE - scripts/config --disable CONFIG_SLAB_MERGE_DEFAULT - scripts/config --disable CONFIG_SLAB_FREELIST_HARDENED - scripts/config --disable CONFIG_SLUB_CPU_PARTIAL - scripts/config --disable CONFIG_PROFILING - msg2 "Processor type and features Cacule" - scripts/config --disable CONFIG_RETPOLINE - scripts/config --disable CONFIG_X86_5LEVEL - scripts/config --disable CONFIG_KEXEC - scripts/config --disable CONFIG_KEXEC_FILE - scripts/config --disable CONFIG_CRASH_DUMP - #scripts/config --set-val CONFIG_NR_CPUS "12" - msg2 "Power Cacule" - scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE - scripts/config --enable CONFIG_CPU_FREQ_GOV_PERFORMANCE - scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND - msg2 "General architecture-dependent options Cacule" - scripts/config --disable CONFIG_KPROBES - scripts/config --disable CONFIG_STACKPROTECTOR - scripts/config --disable CONFIG_VMAP_STACK - msg2 "Kernel hacking Cacule" - scripts/config --disable CONFIG_FTRACE - scripts/config --disable CONFIG_DEBUG_KERNEL - scripts/config --disable CONFIG_PAGE_EXTENSION - scripts/config --disable CONFIG_PRINTK_TIME - scripts/config --disable CONFIG_DEBUG_INFO - scripts/config --set-val CONFIG_RCU_CPU_STALL_TIMEOUT 4 - scripts/config --disable CONFIG_ENABLE_MUST_CHECK - scripts/config --disable CONFIG_STRIP_ASM_SYMS - scripts/config --disable CONFIG_UNUSED_SYMBOLS - scripts/config --disable CONFIG_DEBUG_FS - scripts/config --disable CONFIG_OPTIMIZE_INLINING - scripts/config --disable CONFIG_DEBUG_SECTION_MISMATCH - scripts/config --disable CONFIG_SECTION_MISMATCH_WARN_ONLY - scripts/config --disable CONFIG_STACK_VALIDATION - scripts/config --disable CONFIG_DEBUG_FORCE_WEAK_PER_CPU - scripts/config --disable CONFIG_MAGIC_SYSRQ - scripts/config --disable CONFIG_MAGIC_SYSRQ_SERIAL - scripts/config --disable CONFIG_PAGE_EXTENSION - scripts/config --disable CONFIG_DEBUG_PAGEALLOC - scripts/config --disable CONFIG_PAGE_OWNER - scripts/config --disable CONFIG_DEBUG_MEMORY_INIT - scripts/config --disable CONFIG_HARDLOCKUP_DETECTOR - scripts/config --disable CONFIG_SOFTLOCKUP_DETECTOR - scripts/config --disable CONFIG_DETECT_HUNG_TASK - scripts/config --disable CONFIG_WQ_WATCHDOG - scripts/config --disable CONFIG_SCHED_DEBUG - scripts/config --disable CONFIG_SCHEDSTATS - scripts/config --set-val CONFIG_PANIC_TIMEOUT 10 - scripts/config --disable CONFIG_SCHED_STACK_END_CHECK - scripts/config --disable CONFIG_DEBUG_BUGVERBOSE - scripts/config --disable CONFIG_RCU_TRACE - scripts/config --set-val CONFIG_RCU_CPU_STALL_TIMEOUT 4 - scripts/config --disable CONFIG_FAULT_INJECTION - scripts/config --disable CONFIG_LATENCYTOP - scripts/config --disable CONFIG_PROVIDE_OHCI1394_DMA_INIT - scripts/config --disable RUNTIME_TESTING_MENU - scripts/config --disable CONFIG_MEMTEST - scripts/config --disable CONFIG_KGDB - scripts/config --disable CONFIG_EARLY_PRINTK - scripts/config --disable CONFIG_DOUBLEFAULT - elif [[ $_suggest_cacule = "2" ]]; then - msg2 "Skip suggested config" - else - msg2 "Skip suggested config" - fi } cpu_arch(){ plain "" |