linux-elaina/6.8.8_xanmod1-3: update

This commit is contained in:
Puqns67 2024-04-30 19:53:50 +08:00
parent ba4f3c3ca3
commit 69caafe97d
Signed by: Puqns67
GPG Key ID: 9669DF042554F536
4 changed files with 38 additions and 58 deletions

View File

@ -1,7 +1,7 @@
pkgbase = linux-elaina
pkgdesc = Linux kernel for Elaina, based on Xanmod stable and edited some config
pkgver = 6.8.8_xanmod1
pkgrel = 2
pkgrel = 3
url = https://www.xanmod.org/
arch = x86_64
license = GPL-2.0-only
@ -18,7 +18,7 @@ pkgbase = linux-elaina
options = !strip
source = linux-6.8.tar.xz::https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.8.tar.xz
source = linux-6.8.tar.sign::https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.8.tar.sign
source = patch-6.8.8_xanmod1.xz::https://sourceforge.net/projects/xanmod/files/releases/main/6.8.8-xanmod1/patch-6.8.8-xanmod1.xz/download
source = xanmod-patch-6.8.8_xanmod1.xz::https://sourceforge.net/projects/xanmod/files/releases/main/6.8.8-xanmod1/patch-6.8.8-xanmod1.xz/download
source = choose-gcc-optimization.bash
source = config.bash
source = elaina.bash
@ -28,14 +28,14 @@ pkgbase = linux-elaina
sha512sums = SKIP
sha512sums = 171cb8eeebb1e4173b1914e7dded9f00377965526f40f126bc2e88e62763da47302f2121e27d94fab6f6c11390c8cfc06d0990256c2d0c1fb834476e8ec651f7
sha512sums = 225017227219809ec19458f3c4a9def7d22c2a6cead53f3b10d7e8e6722ec49ab5905576bffd0c50784dee99648815f5bbc65146c5d2d7bcd82b72b52f498aa7
sha512sums = b08209c8f186ee95ea70213932fdcb94bdd135350087c9721bf7c823e95b5db95b42b7f4cbe035c6d107207acedf4a40198053e856b78c3ae772cecf65b5ba95
sha512sums = a26360fe6c458e83a2f1b3a4861e09b0f66d341b0aba97147ae54cd840e3ca174804470b38ad06298860373e52fddb5748bc30b1961486330f792ed2a366c42e
sha512sums = d9130cfa01319836bb5d506a7a9abc818f49b988705eb2697c36424182fd52c2caa868052c43be0d2aff211d99128c45b199f4f2531e8772a28746d7de3f3dc3
sha512sums = 9ee451f4f7312385aa57f87f4924b6e370e120e483ddfe91bc780981183a0f603f3b62e1bf2fda8ec39df429cad6ef34c5d928c736c418024605bf1293b94466
b2sums = c6f17f816cea16e629f63e9379b98888713f57b2c5173306926471f139a9d612a0c74e119341f8075390e55e203d787d9edeb4ad5a064b18870f6f0f7ffaafb2
b2sums = SKIP
b2sums = 8185e4346aef07318657cab688577bf6f23ee00d27157cf22244ad150c0b60931f30ccd123abad200b3f746a782d0fb9baf583daedb7c9db242ab47b9aae02df
b2sums = 72b9fa70c5e3ce27ecc6a5790cd76c0a5b646248e43e990d1df2e43215adfb9d9fb8cce01adef700e39bef8300af367fc0381ab5d0c774f014351d333a11a5db
b2sums = 0340eac720488e3703056ba0408600f5786461c4f42f78093ce4f2a90edb1a61b1278f0ab05d633c57483122613b573520ac5e6b96eb8ed9f7b23c88c3008f19
b2sums = 6eff62b73f360e6dee4924a511998b504e62039efa3b9bdf280905517912fef0513da26b794805980d1f6956e10a9a49e7fdca3b15252b891eee9466d3c41f6b
b2sums = 32187bdf99e86a7758b65110cd20830d65937dab09c0d32982b6d0c8bfabdf0aa453730e17042590f421d608687b38ed230100ad880d53e2833e54199321455b
b2sums = 8d194de80707ea208c43a7728737259a4424bfc9f424e6564393908bb5ec05b449bd30d6edb9aaa853a059dfb82306ae9ad800134d174a9a5156f60c9d876b53
pkgname = linux-elaina
pkgdesc = The Elaina kernel and modules

View File

@ -14,27 +14,17 @@ _srcname="linux-${_to_minor}"
pkgbase='linux-elaina'
pkgver="${_to_xanmod}"
pkgrel=2
pkgrel=3
pkgdesc='Linux kernel for Elaina, based on Xanmod stable and edited some config'
url='https://www.xanmod.org/'
arch=('x86_64')
license=('GPL-2.0-only')
makedepends=(
bc
cpio
gettext
libelf
pahole
perl
python
tar
xz
)
makedepends=('bc' 'cpio' 'gettext' 'libelf' 'pahole' 'perl' 'python' 'tar' 'xz')
options=('!debug' '!strip')
source=("linux-${_to_minor}.tar.xz"::"https://cdn.kernel.org/pub/linux/kernel/v${_major}.x/linux-${_to_minor}.tar.xz"
"linux-${_to_minor}.tar.sign"::"https://cdn.kernel.org/pub/linux/kernel/v${_major}.x/linux-${_to_minor}.tar.sign"
"patch-${_to_xanmod}.xz"::"https://sourceforge.net/projects/xanmod/files/releases/main/${_to_xanmod//_/-}/patch-${_to_xanmod//_/-}.xz/download"
"xanmod-patch-${_to_xanmod}.xz"::"https://sourceforge.net/projects/xanmod/files/releases/main/${_to_xanmod//_/-}/patch-${_to_xanmod//_/-}.xz/download"
'choose-gcc-optimization.bash'
'config.bash'
'elaina.bash')
@ -46,16 +36,16 @@ sha512sums=('5c4eb4aa1d3f7d1ea01c0f7ddeadacdece6e144fd4bdfc16b2b925d3e10dc04de3a
'SKIP'
'171cb8eeebb1e4173b1914e7dded9f00377965526f40f126bc2e88e62763da47302f2121e27d94fab6f6c11390c8cfc06d0990256c2d0c1fb834476e8ec651f7'
'225017227219809ec19458f3c4a9def7d22c2a6cead53f3b10d7e8e6722ec49ab5905576bffd0c50784dee99648815f5bbc65146c5d2d7bcd82b72b52f498aa7'
'b08209c8f186ee95ea70213932fdcb94bdd135350087c9721bf7c823e95b5db95b42b7f4cbe035c6d107207acedf4a40198053e856b78c3ae772cecf65b5ba95'
'a26360fe6c458e83a2f1b3a4861e09b0f66d341b0aba97147ae54cd840e3ca174804470b38ad06298860373e52fddb5748bc30b1961486330f792ed2a366c42e')
'd9130cfa01319836bb5d506a7a9abc818f49b988705eb2697c36424182fd52c2caa868052c43be0d2aff211d99128c45b199f4f2531e8772a28746d7de3f3dc3'
'9ee451f4f7312385aa57f87f4924b6e370e120e483ddfe91bc780981183a0f603f3b62e1bf2fda8ec39df429cad6ef34c5d928c736c418024605bf1293b94466')
b2sums=('c6f17f816cea16e629f63e9379b98888713f57b2c5173306926471f139a9d612a0c74e119341f8075390e55e203d787d9edeb4ad5a064b18870f6f0f7ffaafb2'
'SKIP'
'8185e4346aef07318657cab688577bf6f23ee00d27157cf22244ad150c0b60931f30ccd123abad200b3f746a782d0fb9baf583daedb7c9db242ab47b9aae02df'
'72b9fa70c5e3ce27ecc6a5790cd76c0a5b646248e43e990d1df2e43215adfb9d9fb8cce01adef700e39bef8300af367fc0381ab5d0c774f014351d333a11a5db'
'0340eac720488e3703056ba0408600f5786461c4f42f78093ce4f2a90edb1a61b1278f0ab05d633c57483122613b573520ac5e6b96eb8ed9f7b23c88c3008f19'
'6eff62b73f360e6dee4924a511998b504e62039efa3b9bdf280905517912fef0513da26b794805980d1f6956e10a9a49e7fdca3b15252b891eee9466d3c41f6b')
'32187bdf99e86a7758b65110cd20830d65937dab09c0d32982b6d0c8bfabdf0aa453730e17042590f421d608687b38ed230100ad880d53e2833e54199321455b'
'8d194de80707ea208c43a7728737259a4424bfc9f424e6564393908bb5ec05b449bd30d6edb9aaa853a059dfb82306ae9ad800134d174a9a5156f60c9d876b53')
export KBUILD_BUILD_HOST="archlinux"
export KBUILD_BUILD_HOST='archlinux'
export KBUILD_BUILD_USER="${pkgbase}"
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
@ -67,10 +57,10 @@ prepare() {
echo "${pkgbase#linux-elaina}" > localversion.20-pkgname
msg 'Applying xanmod patch..'
patch -Np1 -i "${srcdir}/patch-${_to_xanmod}"
patch -Np1 -i "${srcdir}/xanmod-patch-${_to_xanmod}"
msg 'Applying config for elaina kernel...'
SRCDIR="${srcdir}" bash "${srcdir}/elaina.bash"
source "${srcdir}/elaina.bash"
msg 'make olddefconfig'
make olddefconfig
@ -90,23 +80,14 @@ build() {
_package() {
pkgdesc="The $_name kernel and modules"
depends=(
coreutils
initramfs
kmod
)
optdepends=(
'linux-firmware: firmware images needed for some devices'
)
provides=(
VIRTUALBOX-GUEST-MODULES
WIREGUARD-MODULE
)
depends=('coreutils' 'initramfs' 'kmod')
optdepends=('linux-firmware: firmware images needed for some devices')
provides=('VIRTUALBOX-GUEST-MODULES' 'WIREGUARD-MODULE')
cd $_srcname
local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
msg2 "Installing boot image..."
msg '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"
@ -114,7 +95,7 @@ _package() {
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
msg2 "Installing modules..."
msg 'Installing modules...'
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
@ -124,12 +105,12 @@ _package() {
_package-headers() {
pkgdesc="Headers and scripts for building modules for the $_name kernel"
depends=(pahole)
depends=('pahole')
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
msg2 "Installing build files..."
msg 'Installing build files...'
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux tools/bpf/bpftool/vmlinux.h
install -Dt "$builddir/kernel" -m644 kernel/Makefile
@ -142,7 +123,7 @@ _package-headers() {
# required when DEBUG_INFO_BTF_MODULES is enabled
install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
msg2 "Installing headers..."
msg '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
@ -161,27 +142,27 @@ _package-headers() {
# https://bugs.archlinux.org/task/71392
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
msg2 "Installing KConfig files..."
msg 'Installing KConfig files...'
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
msg2 "Removing unneeded architectures..."
msg 'Removing unneeded architectures...'
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
echo "Removing $(basename "$arch")"
msg2 'Removing %s' $(basename $arch)
rm -r "$arch"
done
msg2 "Removing documentation..."
msg 'Removing documentation...'
rm -r "$builddir/Documentation"
msg2 "Removing broken symlinks..."
msg 'Removing broken symlinks...'
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
msg2 "Removing loose objects..."
msg 'Removing loose objects...'
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
msg2 "Stripping build tools..."
msg 'Stripping build tools...'
local file
while read -rd '' file; do
case "$(file -Sib "$file")" in
@ -196,10 +177,10 @@ _package-headers() {
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
msg2 "Stripping vmlinux..."
msg 'Stripping vmlinux...'
strip -v $STRIP_STATIC "$builddir/vmlinux"
msg2 "Adding symlink..."
msg 'Adding symlink...'
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
}

View File

@ -1,8 +1,5 @@
#!/usr/bin/bash
source /usr/share/makepkg/util/message.sh
colorize
disable() {
msg2 'disable: %s' $1
scripts/config --disable $1
@ -48,5 +45,5 @@ setConfig() {
setOptimization() {
msg2 'setOptimization: %s' $1
bash "${SRCDIR}/choose-gcc-optimization.bash" $1
source "${srcdir}/choose-gcc-optimization.bash" $1
}

View File

@ -1,6 +1,6 @@
#!/usr/bin/bash
source "${SRCDIR}/config.bash"
source "${srcdir}/config.bash"
# Set config as x86-64_v2
setConfig config_x86-64-v2
@ -36,7 +36,8 @@ disableAll \
CONFIG_USB_APPLEDISPLAY \
CONFIG_SAMSUNG_Q10 \
CONFIG_ACPI_CMPC \
CONFIG_SOUND
CONFIG_SOUND \
CONFIG_MEDIA_SUPPORT
# Disable noneeded filesystems
disableAll \
@ -106,6 +107,7 @@ disableAll \
CONFIG_WLAN \
CONFIG_WWAN \
CONFIG_WIRELESS \
CONFIG_RFKILL \
CONFIG_NET_9P \
CONFIG_NFC \
CONFIG_INPUT_JOYSTICK \