Compare commits
20 Commits
f12e83c077
...
a3f0c4283c
Author | SHA1 | Date | |
---|---|---|---|
leo | a3f0c4283c | ||
xtellaris | b18ae0f457 | ||
Joan Figueras | f0f75acbe8 | ||
xtellaris | dd982d61e8 | ||
Joan Figueras | 6d8d697b7b | ||
Joan Figueras | 69af7d4742 | ||
xtellaris | 38688b755f | ||
xtellaris | ea7d5c5f0c | ||
Joan Figueras | e25d609f94 | ||
Joan Figueras | 4152372924 | ||
xtellaris | cf54510daa | ||
xtellaris | 51900db618 | ||
xtellaris | 6b4e70c140 | ||
xtellaris | 40edcd5d2e | ||
xtellaris | 243b0465ae | ||
xtellaris | 286ad5df4f | ||
xtellaris | b27c3e01bb | ||
xtellaris | d44e0f1fe9 | ||
xtellaris | 4ae886bb0b | ||
xtellaris | 570bb80d20 |
6
.SRCINFO
6
.SRCINFO
|
@ -1,6 +1,6 @@
|
|||
pkgbase = linux-xanmod
|
||||
pkgdesc = Linux Xanmod - Current Stable (CURRENT)
|
||||
pkgver = 6.2.3
|
||||
pkgver = 6.2.10
|
||||
pkgrel = 1
|
||||
url = http://www.xanmod.org/
|
||||
arch = x86_64
|
||||
|
@ -15,13 +15,13 @@ pkgbase = linux-xanmod
|
|||
options = !strip
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.2.tar.xz
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.2.tar.sign
|
||||
source = https://github.com/xanmod/linux/releases/download/6.2.3-xanmod1/patch-6.2.3-xanmod1.xz
|
||||
source = https://github.com/xanmod/linux/releases/download/6.2.10-xanmod1/patch-6.2.10-xanmod1.xz
|
||||
source = choose-gcc-optimization.sh
|
||||
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
|
||||
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
|
||||
sha256sums = 74862fa8ab40edae85bb3385c0b71fe103288bce518526d63197800b3cbdecb1
|
||||
sha256sums = SKIP
|
||||
sha256sums = 557ea9735dbb68c83b4684fd42b465b2cd12445519469c091b9bed926e37810a
|
||||
sha256sums = 30d69962510bb3eb630c2f0c590a0e3187739b82e4d7835c59ab061355c20019
|
||||
sha256sums = 5c84bfe7c1971354cff3f6b3f52bf33e7bbeec22f85d5e7bfde383b54c679d30
|
||||
|
||||
pkgname = linux-xanmod
|
||||
|
|
108
PKGBUILD
108
PKGBUILD
|
@ -1,6 +1,7 @@
|
|||
# Maintainer: Joan Figueras <ffigue at gmail dot com>
|
||||
# Contributor: Torge Matthies <openglfreak at googlemail dot com>
|
||||
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
||||
# Contributor: Adam Mirre (wanderer) <wanderer at dotya dot ml>
|
||||
|
||||
##
|
||||
## The following variables can be customized at build time. Use env or export to change at your wish
|
||||
|
@ -39,6 +40,11 @@ if [ "${_compiler}" = "clang" ]; then
|
|||
_compiler_flags="CC=clang HOSTCC=clang LLVM=1 LLVM_IAS=1"
|
||||
fi
|
||||
|
||||
# Build the zfs module in to the kernel
|
||||
if [ -z ${_build_zfs+x} ]; then
|
||||
_build_zfs=n
|
||||
fi
|
||||
|
||||
# Choose between the 4 main configs for stable branch. Default x86-64-v1 which use CONFIG_GENERIC_CPU2:
|
||||
# Possible values: config_x86-64-v1 (default) / config_x86-64-v2 / config_x86-64-v3 / config_x86-64-v4
|
||||
# This will be overwritten by selecting any option in microarchitecture script
|
||||
|
@ -72,15 +78,14 @@ fi
|
|||
### IMPORTANT: Do no edit below this line unless you know what you're doing
|
||||
|
||||
pkgbase=linux-xanmod
|
||||
_major=6.2
|
||||
pkgver=${_major}.3
|
||||
_major=6.3
|
||||
pkgver=${_major}.9
|
||||
_branch=6.x
|
||||
xanmod=1
|
||||
pkgrel=${xanmod}
|
||||
pkgdesc='Linux Xanmod - Current Stable (CURRENT)'
|
||||
url="http://www.xanmod.org/"
|
||||
arch=(x86_64)
|
||||
|
||||
license=(GPL2)
|
||||
makedepends=(
|
||||
bc cpio kmod libelf perl tar xz
|
||||
|
@ -92,27 +97,49 @@ options=('!strip')
|
|||
_srcname="linux-${pkgver}-xanmod${xanmod}"
|
||||
|
||||
source=("https://cdn.kernel.org/pub/linux/kernel/v${_branch}/linux-${_major}.tar."{xz,sign}
|
||||
"https://github.com/xanmod/linux/releases/download/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz"
|
||||
choose-gcc-optimization.sh)
|
||||
#"patch-${pkgver}-xanmod${xanmod}.xz::https://sourceforge.net/projects/xanmod/files/releases/stable/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz/download"
|
||||
"https://github.com/xanmod/linux/releases/download/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz"
|
||||
choose-gcc-optimization.sh)
|
||||
#"patch-${pkgver}-xanmod${xanmod}.xz::https://sourceforge.net/projects/xanmod/files/releases/stable/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz/download"
|
||||
validpgpkeys=(
|
||||
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linux Torvalds
|
||||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linux Torvalds
|
||||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||
)
|
||||
|
||||
# Archlinux patches
|
||||
_commit="ec9e9a4219fe221dec93fa16fddbe44a34933d8d"
|
||||
_patches=()
|
||||
for _patch in ${_patches[@]}; do
|
||||
#source+=("${_patch}::https://git.archlinux.org/svntogit/packages.git/plain/trunk/${_patch}?h=packages/linux&id=${_commit}")
|
||||
source+=("${_patch}::https://raw.githubusercontent.com/archlinux/svntogit-packages/${_commit}/trunk/${_patch}")
|
||||
#source+=("${_patch}::https://git.archlinux.org/svntogit/packages.git/plain/trunk/${_patch}?h=packages/linux&id=${_commit}")
|
||||
source+=("${_patch}::https://raw.githubusercontent.com/archlinux/svntogit-packages/${_commit}/trunk/${_patch}")
|
||||
done
|
||||
|
||||
sha256sums=('74862fa8ab40edae85bb3385c0b71fe103288bce518526d63197800b3cbdecb1'
|
||||
sha256sums=('ba3491f5ed6bd270a370c440434e3d69085fcdd528922fa01e73d7657db73b1e'
|
||||
'SKIP'
|
||||
'557ea9735dbb68c83b4684fd42b465b2cd12445519469c091b9bed926e37810a'
|
||||
'f6010d895c549ba8fc7e4728208c04de988486de0c30a1cdf50e04855d37675d'
|
||||
'5c84bfe7c1971354cff3f6b3f52bf33e7bbeec22f85d5e7bfde383b54c679d30')
|
||||
|
||||
## ZFS makedepends, source and checksums
|
||||
if [ "$_build_zfs" = "y" ]; then
|
||||
# zfsver="2.1.9"
|
||||
# source_url="https://github.com/openzfs/zfs/releases/download/zfs-${zfsver}/zfs-${zfsver}.tar.gz"
|
||||
# source+=("$source_url"
|
||||
# "${source_url}.asc"
|
||||
# )
|
||||
# sha256sums+=('6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6'
|
||||
# 'SKIP'
|
||||
# )
|
||||
# validpgpkeys+=(
|
||||
# '4F3BA9AB6D1F8D683DC2DFB56AD860EED4598027' # Tony Hutter
|
||||
# '29D5610EAE2941E355A2FE8AB97467AAC77B9667' # Ned Bass
|
||||
# )
|
||||
|
||||
# ZFS branch zfs-2.1.10-staging
|
||||
makedepends+=(git)
|
||||
source_url="https://github.com/openzfs/zfs.git#commit=8e8acabdcaeb831c777f71361722f4235b698a8d"
|
||||
source+=("git+$source_url")
|
||||
sha256sums+=('SKIP')
|
||||
fi
|
||||
|
||||
export KBUILD_BUILD_HOST=${KBUILD_BUILD_HOST:-archlinux}
|
||||
export KBUILD_BUILD_USER=${KBUILD_BUILD_USER:-makepkg}
|
||||
export KBUILD_BUILD_TIMESTAMP=${KBUILD_BUILD_TIMESTAMP:-$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})}
|
||||
|
@ -121,10 +148,10 @@ prepare() {
|
|||
cd linux-${_major}
|
||||
|
||||
# Apply Xanmod patch
|
||||
patch -Np1 -i ../patch-${pkgver}-xanmod${xanmod}
|
||||
patch -Np1 -i ../patch-${pkgver}-xanmod${xanmod} || true
|
||||
|
||||
msg2 "Setting version..."
|
||||
scripts/setlocalversion --save-scmversion
|
||||
# scripts/setlocalversion --save-scmversion
|
||||
echo "-$pkgrel" > localversion.10-pkgrel
|
||||
echo "${pkgbase#linux-xanmod}" > localversion.20-pkgname
|
||||
|
||||
|
@ -151,7 +178,7 @@ prepare() {
|
|||
|
||||
# Enable IKCONFIG following Arch's philosophy
|
||||
scripts/config --enable CONFIG_IKCONFIG \
|
||||
--enable CONFIG_IKCONFIG_PROC
|
||||
--enable CONFIG_IKCONFIG_PROC
|
||||
|
||||
# User set. See at the top of this file
|
||||
if [ "$use_tracers" = "y" ]; then
|
||||
|
@ -227,17 +254,30 @@ prepare() {
|
|||
build() {
|
||||
cd linux-${_major}
|
||||
make ${_compiler_flags} all
|
||||
|
||||
if [ "$_build_zfs" = "y" ]; then
|
||||
cd ${srcdir}/"zfs"
|
||||
|
||||
./autogen.sh
|
||||
sed -i "s|\$(uname -r)|$(<${srcdir}/linux-${_major}/version)|g" configure
|
||||
./configure KERNEL_LLVM=1 --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --libdir=/usr/lib \
|
||||
--datadir=/usr/share --includedir=/usr/include --with-udevdir=/lib/udev \
|
||||
--libexecdir=/usr/lib/zfs --with-config=kernel \
|
||||
--with-linux=${srcdir}/linux-${_major}
|
||||
make ${_compiler_flags}
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
_package() {
|
||||
pkgdesc="The Linux kernel and modules with Xanmod patches"
|
||||
depends=(coreutils kmod initramfs)
|
||||
optdepends=('crda: to set the correct wireless channels of your country'
|
||||
'linux-firmware: firmware images needed for some devices')
|
||||
'linux-firmware: firmware images needed for some devices')
|
||||
provides=(VIRTUALBOX-GUEST-MODULES
|
||||
WIREGUARD-MODULE
|
||||
KSMBD-MODULE
|
||||
NTFS3-MODULE)
|
||||
WIREGUARD-MODULE
|
||||
KSMBD-MODULE
|
||||
NTFS3-MODULE)
|
||||
|
||||
cd linux-${_major}
|
||||
local kernver="$(<version)"
|
||||
|
@ -322,25 +362,43 @@ _package-headers() {
|
|||
while read -rd '' file; do
|
||||
case "$(file -bi "$file")" in
|
||||
application/x-sharedlib\;*) # Libraries (.so)
|
||||
strip -v $STRIP_SHARED "$file" ;;
|
||||
strip -v $STRIP_SHARED "$file" ;;
|
||||
application/x-archive\;*) # Libraries (.a)
|
||||
strip -v $STRIP_STATIC "$file" ;;
|
||||
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" ;;
|
||||
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 "Stripping vmlinux..."
|
||||
strip -v $STRIP_STATIC "$builddir/vmlinux"
|
||||
|
||||
|
||||
msg2 "Adding symlink..."
|
||||
mkdir -p "$pkgdir/usr/src"
|
||||
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
|
||||
}
|
||||
|
||||
_package-zfs() {
|
||||
pkgdesc="zfs module for the $pkgdesc kernel"
|
||||
depends=('pahole' "linux-xanmod=$pkgver-$pkgrel")
|
||||
provides=('ZFS-MODULE')
|
||||
|
||||
local kernver="$(<${srcdir}/linux-${_major}/version)"
|
||||
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
|
||||
|
||||
cd ${srcdir}/"zfs"
|
||||
install -dm755 "$modulesdir"
|
||||
install -m644 module/*/*.ko "$modulesdir"
|
||||
find "$pkgdir" -name '*.ko' -exec zstd --rm -10 {} +
|
||||
# sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${pkgver}-${pkgbase}'/" "$startdir/zfs.install"
|
||||
}
|
||||
|
||||
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
||||
if [ "$_build_zfs" = "y" ]; then
|
||||
pkgname+=("$pkgbase-zfs")
|
||||
fi
|
||||
for _p in "${pkgname[@]}"; do
|
||||
eval "package_$_p() {
|
||||
$(declare -f "_package${_p#$pkgbase}")
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# linux-xanmod-zfs
|
||||
ArchLinux Kernel PKGBUILD with Xanmod patches and ZFS support. This simple package build is a modified version of the popular AUR project linux-xanmod, inspired by CachyOS kernel PKGBUILD. But I switch the ZFS branch to stable release instead the latest git preferred by CachyOS.
|
Loading…
Reference in New Issue