diff --git a/srcpkgs/linux6.19/files/arm64-dotconfig b/srcpkgs/linux6.19/files/arm64-dotconfig index ba92a742e0bdd9..c17c0bc7836e0d 100644 --- a/srcpkgs/linux6.19/files/arm64-dotconfig +++ b/srcpkgs/linux6.19/files/arm64-dotconfig @@ -124,7 +124,7 @@ CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y -# CONFIG_SCHED_CLASS_EXT is not set +CONFIG_SCHED_CLASS_EXT=y # # CPU/Task time and stats accounting diff --git a/srcpkgs/linux6.19/files/i386-dotconfig b/srcpkgs/linux6.19/files/i386-dotconfig index 1136030d657a68..d4a394aef80ab9 100644 --- a/srcpkgs/linux6.19/files/i386-dotconfig +++ b/srcpkgs/linux6.19/files/i386-dotconfig @@ -118,7 +118,8 @@ CONFIG_HAVE_EBPF_JIT=y # CONFIG_BPF_SYSCALL=y CONFIG_BPF_JIT=y -# CONFIG_BPF_JIT_ALWAYS_ON is not set +CONFIG_BPF_JIT_ALWAYS_ON=y +CONFIG_BPF_JIT_DEFAULT_ON=y CONFIG_BPF_UNPRIV_DEFAULT_OFF=y # CONFIG_BPF_PRELOAD is not set CONFIG_BPF_LSM=y @@ -134,7 +135,7 @@ CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y -# CONFIG_SCHED_CLASS_EXT is not set +CONFIG_SCHED_CLASS_EXT=y # # CPU/Task time and stats accounting diff --git a/srcpkgs/linux6.19/files/x86_64-dotconfig b/srcpkgs/linux6.19/files/x86_64-dotconfig index 6541da01d6e6a4..56f821f2d7912d 100644 --- a/srcpkgs/linux6.19/files/x86_64-dotconfig +++ b/srcpkgs/linux6.19/files/x86_64-dotconfig @@ -140,7 +140,7 @@ CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y -# CONFIG_SCHED_CLASS_EXT is not set +CONFIG_SCHED_CLASS_EXT=y # # CPU/Task time and stats accounting diff --git a/srcpkgs/linux6.19/template b/srcpkgs/linux6.19/template index 74214053fe8019..06ca6d8e02d44c 100644 --- a/srcpkgs/linux6.19/template +++ b/srcpkgs/linux6.19/template @@ -1,7 +1,7 @@ # Template file for 'linux6.19' pkgname=linux6.19 version=6.19.5 -revision=1 +revision=2 short_desc="Linux kernel and modules (${version%.*} series)" maintainer="Duncaen " license="GPL-2.0-only" diff --git a/srcpkgs/scx-loader/files/scx-loader/run b/srcpkgs/scx-loader/files/scx-loader/run new file mode 100755 index 00000000000000..f02ff4a3b31f5f --- /dev/null +++ b/srcpkgs/scx-loader/files/scx-loader/run @@ -0,0 +1,5 @@ +#!/bin/sh +export NO_COLOR=1 +[ -d /sys/kernel/sched_ext ] || exit 1 +[ -d /sys/kernel/debug ] || exit 2 +exec scx_loader 2>&1 diff --git a/srcpkgs/scx-loader/template b/srcpkgs/scx-loader/template new file mode 100644 index 00000000000000..d2c8732b6c5d9e --- /dev/null +++ b/srcpkgs/scx-loader/template @@ -0,0 +1,32 @@ +# Template file for 'scx-loader' +pkgname=scx-loader +version=1.0.20 +revision=1 +archs="x86_64* aarch64*" +conf_files=/etc/scx_loader.toml +build_style=cargo +depends="dbus polkit scx" +short_desc="Dbus loader for sched_ext schedulers" +maintainer="Chloé Vulquin " +license="GPL-2.0-only" +homepage="https://github.com/sched-ext/scx-loader" +distfiles="https://github.com/sched-ext/scx-loader/archive/refs/tags/v${version}.tar.gz" +checksum=24ba8ef16504b74f7d0c0e6d5da21d3dce146ece1e6cf5ba3f6f9085c6c383b3 +nocross="cargo:warning=cc1: error: bad value 'armv8-a' for '-march=' switch" + +vshare() { + vinstall "$1" "$2" /usr/share/"$3" "$4" +} + +do_install() { + vbin target/"$RUST_TARGET"/release/scx_loader + vbin target/"$RUST_TARGET"/release/scxctl + + vshare services/org.scx.Loader.service 644 dbus-1/system-services + vshare configs/org.scx.Loader.conf 644 dbus-1/system.d + vshare configs/org.scx.Loader.xml 644 dbus-1/interfaces + vshare configs/org.scx.Loader.policy 644 polkit-1/actions + + vconf configs/scx_loader.toml + vsv scx-loader +} diff --git a/srcpkgs/scx/files/00-pseudofs-scx.sh b/srcpkgs/scx/files/00-pseudofs-scx.sh new file mode 100644 index 00000000000000..c1076c8ae8bd0c --- /dev/null +++ b/srcpkgs/scx/files/00-pseudofs-scx.sh @@ -0,0 +1,2 @@ +#!/bin/sh +mountpoint -q /sys/kernel/debug || mount -o nosuid,noexec,nodev -t debugfs debugfs /sys/kernel/debug diff --git a/srcpkgs/scx/template b/srcpkgs/scx/template new file mode 100644 index 00000000000000..0f5afaf47b83b7 --- /dev/null +++ b/srcpkgs/scx/template @@ -0,0 +1,35 @@ +# Template file for 'scx' +pkgname=scx +version=1.0.20 +revision=1 +archs="x86_64* aarch64*" +build_style=cargo +# fails because it tries to read procfs dynamically +# with bwrap containment even more fail +make_check_args="-- --skip test_thread_operations" +# based on package documentation +# I suspect clang isn't actually used, and may resolve nocross +makedepends="clang libbpf-devel bpftool elfutils-devel zlib-devel libzstd-devel pkgconf libseccomp-devel" +short_desc="Sched_ext schedulers and tools" +maintainer="Chloé Vulquin " +license="GPL-2.0-only" +homepage="https://github.com/sched-ext/scx" +distfiles="https://github.com/sched-ext/scx/archive/refs/tags/v${version}.tar.gz" +checksum=d9c6b3230915dafe21556da28c6ef2a11f272770f12912842ae1ad23b54d963e +nocross="cargo:warning=cc1: error: bad value 'armv8-a' for '-march=' switch" + +# cargo install does not support workspaces +# alternative: specify the wanted packages only +# requires setting do_* manually, but avoids useless build time +do_install() { + # POSIX for find … -maxdepth 1 -executable + find target/"$RUST_TARGET"/release \ + ! -path target/"$RUST_TARGET"/release -prune \ + -type f -perm -0100 -name 'scx*' \ + ! -name scx_arena_selftests \ + -exec install -Dm755 -t "$PKGDESTDIR"/usr/bin '{}' \+ +} + +post_install() { + vinstall "${FILESDIR}"/00-pseudofs-scx.sh 644 /etc/runit/core-services +}