summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO44
-rw-r--r--PKGBUILD151
-rwxr-xr-xchoose-gcc-optimization.sh191
3 files changed, 197 insertions, 189 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d1bfe7579f6..ac78c418d215 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,47 +1,49 @@
pkgbase = linux-manjaro-xanmod
pkgdesc = Linux Xanmod
- pkgver = 5.15.6
+ pkgver = 6.6.9
pkgrel = 1
url = http://www.xanmod.org/
arch = x86_64
license = GPL2
- makedepends = xmlto
- makedepends = kmod
- makedepends = inetutils
makedepends = bc
- makedepends = libelf
makedepends = cpio
+ makedepends = gettext
+ makedepends = libelf
+ makedepends = pahole
+ makedepends = perl
+ makedepends = python
+ makedepends = tar
+ makedepends = xz
makedepends = python-sphinx
- makedepends = python-sphinx_rtd_theme
- makedepends = graphviz
- makedepends = imagemagick
- makedepends = git
+ makedepends = inetutils
+ makedepends = kmod
+ makedepends = xmlto
options = !strip
- source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.tar.xz
- source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.tar.sign
- source = https://github.com/xanmod/linux/releases/download/5.15.6-xanmod2/patch-5.15.6-xanmod2.xz
+ source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.tar.xz
+ source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.tar.sign
+ source = patch-6.6.9-xanmod1.xz::https://sourceforge.net/projects/xanmod/files/releases/main/6.6.9-xanmod1/patch-6.6.9-xanmod1.xz/download
source = choose-gcc-optimization.sh
- source = https://gitlab.manjaro.org/packages/core/linux515/-/archive/e07c100203a9e1e30ed3dc84d6a14e6e37e72849/linux513-e07c100203a9e1e30ed3dc84d6a14e6e37e72849.tar.gz
+ source = https://gitlab.manjaro.org/packages/core/linux66/-/archive/14b0a9c44b9aafe0efdd16bf79b81ddda1d703da/linux66-14b0a9c44b9aafe0efdd16bf79b81ddda1d703da.tar.gz
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
- sha256sums = 57b2cf6991910e3b67a1b3490022e8a0674b6965c74c12da1e99d138d1991ee8
+ sha256sums = d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0
sha256sums = SKIP
- sha256sums = 8055bcb3765ca7995477db3f5de71d3ce76a232885a8179ff37dda21e0e5a587
- sha256sums = 1ac18cad2578df4a70f9346f7c6fccbb62f042a0ee0594817fdef9f2704904ee
- sha256sums = 0595d4c51f631b2d1ed2424511aab36970043f143e66bcf07fd0274273377060
+ sha256sums = 674be54d39a405cd11d8cbd9c2604f5e6e7fedee6b37d307edbb8ac46bc6a27f
+ sha256sums = a8b38eb482eb685944757182c4886404abc12703e5e56ec39c7d61298d17d71f
+ sha256sums = ac7d476c2a4eff99929909e97263142770923e24decddedf04735867294d6e0e
pkgname = linux-manjaro-xanmod
- pkgdesc = The Linux kernel and modules with Xanmod and Manjaro patches (Bootsplash support). Ashmem and binder are enabled
+ pkgdesc = The Linux kernel and modules with Xanmod and Manjaro patches
depends = coreutils
depends = linux-firmware
depends = kmod
depends = initramfs
- depends = mkinitcpio>=27
- optdepends = crda: to set the correct wireless channels of your country
+ optdepends = wireless-regdb: to set the correct wireless channels of your country
optdepends = linux-firmware: firmware images needed for some devices
- optdepends = bootsplash-systemd: for bootsplash functionality
provides = VIRTUALBOX-GUEST-MODULES
provides = WIREGUARD-MODULE
+ provides = KSMBD-MODULE
+ provides = NTFS3-MODULE
conflicts =
replaces =
diff --git a/PKGBUILD b/PKGBUILD
index af7a92449047..5fecfa8ac889 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
-# Maintainer: ANDRoid7890 <andrey.android7890@gmail.com>
+# Maintainer: parov0z <andrey.android7890@gmail.com>
-# https://gitlab.manjaro.org/packages/core/linux512
+# https://gitlab.manjaro.org/packages/core/linux515
#
# Maintainer: Philip Müller
# Maintainer: Bernhard Landauer
@@ -11,9 +11,6 @@
# Maintainer: Joan Figueras
# Contributor: Torge Matthies
# Contributor: Jan Alexander Steffens (heftig)
-# Contributor: Yoshi2889
-# Contributor: Tobias Powalowski
-# Contributor: Thomas Baechler
##
## The following variables can be customized at build time. Use env or export to change at your wish
@@ -36,17 +33,27 @@ if [ -z ${use_numa+x} ]; then
use_numa=y
fi
-## For performance you can disable FUNCTION_TRACER/GRAPH_TRACER. Limits debugging and analyzing of the kernel.
-## Stock Archlinux and Xanmod have this enabled.
-## Set variable "use_tracers" to: n to disable (possibly increase performance)
-## y to enable (stock default)
+## Since upstream disabled CONFIG_STACK_TRACER (limits debugging and analyzing of the kernel)
+## you can enable them setting this option. Caution, because they have an impact in performance.
+## Stock Archlinux has this enabled.
+## Set variable "use_tracers" to: n to disable (possibly increase performance, XanMod default)
if [ -z ${use_tracers+x} ]; then
- use_tracers=y
+ use_tracers=n
fi
+# Unique compiler supported upstream is GCC
## Choose between GCC and CLANG config (default is GCC)
-if [ -z ${_compiler+x} ]; then
- _compiler=gcc
+## Use the environment variable "_compiler=clang"
+if [ "${_compiler}" = "clang" ]; then
+ _compiler_flags="CC=clang HOSTCC=clang LLVM=1 LLVM_IAS=1"
+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 / config_x86-64-v2 (default) / config_x86-64-v3 / config_x86-64-v4
+# This will be overwritten by selecting any option in microarchitecture script
+# Source files: https://github.com/xanmod/linux/tree/5.17/CONFIGS/xanmod/gcc
+if [ -z ${_config+x} ]; then
+ _config=config_x86-64-v2
fi
# Compress modules with ZSTD (to save disk space)
@@ -67,29 +74,34 @@ if [ -z ${_localmodcfg} ]; then
fi
# Tweak kernel options prior to a build via nconfig
-_makenconfig=
+if [ -z ${_makenconfig} ]; then
+ _makenconfig=n
+fi
### IMPORTANT: Do no edit below this line unless you know what you're doing
pkgbase=linux-manjaro-xanmod
pkgname=("${pkgbase}" "${pkgbase}-headers")
-_major=5.15
-pkgver=${_major}.6
-_branch=5.x
-xanmod=2
+_major=6.6
+pkgver=${_major}.9
+_branch=6.x
+xanmod=1
+_sf_branch=main
pkgrel=1
-pkgdesc='Linux Xanmod'
+pkgdesc='Linux Manjaro Xanmod'
url="http://www.xanmod.org/"
arch=(x86_64)
-__commit="e07c100203a9e1e30ed3dc84d6a14e6e37e72849" # 5.13.6-1
+__commit="14b0a9c44b9aafe0efdd16bf79b81ddda1d703da" # 6.6.9
license=(GPL2)
+
makedepends=(
- xmlto kmod inetutils bc libelf cpio
- python-sphinx python-sphinx_rtd_theme graphviz imagemagick git
+ bc cpio gettext libelf pahole perl python tar xz
+ python-sphinx inetutils kmod xmlto
)
+
if [ "${_compiler}" = "clang" ]; then
makedepends+=(clang llvm lld python)
fi
@@ -97,24 +109,23 @@ 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"
+ "patch-${pkgver}-xanmod${xanmod}${_revision}.xz::https://sourceforge.net/projects/xanmod/files/releases/${_sf_branch}/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz/download"
choose-gcc-optimization.sh
- "https://gitlab.manjaro.org/packages/core/linux515/-/archive/${__commit}/linux513-${__commit}.tar.gz")
+ "https://gitlab.manjaro.org/packages/core/linux${_major//.}/-/archive/${__commit}/linux${_major//.}-${__commit}.tar.gz")
#"patch-${pkgver}-xanmod${xanmod}.xz::https://sourceforge.net/projects/xanmod/files/releases/stable/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz/download"
# 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}")
done
-sha256sums=('57b2cf6991910e3b67a1b3490022e8a0674b6965c74c12da1e99d138d1991ee8' # kernel tar.xz
+sha256sums=('d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0' # kernel tar.xz
'SKIP' # tar.sign
- '8055bcb3765ca7995477db3f5de71d3ce76a232885a8179ff37dda21e0e5a587' # xanmod
- '1ac18cad2578df4a70f9346f7c6fccbb62f042a0ee0594817fdef9f2704904ee' # choose-gcc-optimization.sh
- '0595d4c51f631b2d1ed2424511aab36970043f143e66bcf07fd0274273377060') # manjaro
+ '674be54d39a405cd11d8cbd9c2604f5e6e7fedee6b37d307edbb8ac46bc6a27f' # xanmod
+ 'a8b38eb482eb685944757182c4886404abc12703e5e56ec39c7d61298d17d71f' # choose-gcc-optimization.sh
+ 'ac7d476c2a4eff99929909e97263142770923e24decddedf04735867294d6e0e') # manjaro
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linux Torvalds
@@ -132,7 +143,6 @@ prepare() {
patch -Np1 -i ../patch-${pkgver}-xanmod${xanmod}
msg2 "Setting version..."
- scripts/setlocalversion --save-scmversion
#echo "-$pkgrel" > localversion.10-pkgrel
echo "-MANJARO" > localversion.20-pkgname
@@ -146,32 +156,31 @@ prepare() {
patch -Np1 < "../$src"
done
- # Manjaro patches
- rm ../linux515-$__commit/0103-futex.patch # remove conflicting ones
- rm ../linux515-$__commit/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
- rm ../linux515-$__commit/0101-i2c-nuvoton-nc677x-hwmon-driver.patch
+ # Manjaro patches
+
+ # remove conflicting ones
+ patchdir=../linux${_major//.}-$__commit
+ rm $patchdir/0101-ZEN_Add_sysctl_and_CONFIG_to_disallow_unprivileged_CLONE_NEWUSER.patch
+ # fix patch order
+ mv $patchdir/000{1,0}-ALSA-hda-cs35l41-Support-ASUS-2023-laptops-with-miss.patch
+
+
local _patch
- rm ../linux515-$__commit/0102-iomap-iomap_bmap-should-accept-unwritten-maps.patch
- rm ../linux515-$__commit/0106-Fix_OLED_brightness_control_on_eDP.patch
-
- for _patch in ../linux515-$__commit/*; do
+ for _patch in ../linux${_major//.}-$__commit/*; do
[[ $_patch = *.patch ]] || continue
msg2 "Applying patch: $_patch..."
- patch -Np1 < "../linux515-$__commit/$_patch"
+ patch -Np1 < "../linux${_major//.}-$__commit/$_patch"
done
- git apply -p1 < "../linux515-$__commit/0413-bootsplash.gitpatch"
# Applying configuration
- cp -vf CONFIGS/xanmod/${_compiler}/config .config
+ cp -vf CONFIGS/xanmod/gcc/${_config} .config
# enable LTO_CLANG_THIN
if [ "${_compiler}" = "clang" ]; then
scripts/config --disable LTO_CLANG_FULL
scripts/config --enable LTO_CLANG_THIN
- _LLVM=1
fi
- scripts/config --enable CONFIG_BOOTSPLASH
# CONFIG_STACK_VALIDATION gives better stack traces. Also is enabled in all official kernel packages by Archlinux team
scripts/config --enable CONFIG_STACK_VALIDATION
@@ -183,7 +192,7 @@ prepare() {
# User set. See at the top of this file
if [ "$use_tracers" = "n" ]; then
msg2 "Disabling FUNCTION_TRACER/GRAPH_TRACER only if we are not compiling with clang..."
- if [ "${_compiler}" = "gcc" ]; then
+ if [ "${_compiler}" = "gcc" ] || [ "${_compiler}q" = "q" ]; then
scripts/config --disable CONFIG_FUNCTION_TRACER \
--disable CONFIG_STACK_TRACER
fi
@@ -195,7 +204,6 @@ prepare() {
fi
msg2 "add anbox support"
- scripts/config --enable CONFIG_ASHMEM
# CONFIG_ION is not set
scripts/config --enable CONFIG_ANDROID
scripts/config --enable CONFIG_ANDROID_BINDER_IPC
@@ -211,7 +219,10 @@ prepare() {
fi
# Let's user choose microarchitecture optimization in GCC
- sh ${srcdir}/choose-gcc-optimization.sh $_microarchitecture
+ # Use default microarchitecture only if we have not choosen another microarchitecture
+ if [ "$_microarchitecture" -ne "0" ]; then
+ ../choose-gcc-optimization.sh $_microarchitecture
+ fi
# This is intended for the people that want to build this package with their own config
# Put the file "myconfig" at the package folder (this will take preference) or "${XDG_CONFIG_HOME}/linux-xanmod/myconfig"
@@ -233,25 +244,26 @@ prepare() {
fi
done
-
### Optionally load needed modules for the make localmodconfig
# See https://aur.archlinux.org/packages/modprobed-db
if [ "$_localmodcfg" = "y" ]; then
if [ -f $HOME/.config/modprobed.db ]; then
msg2 "Running Steven Rostedt's make localmodconfig now"
- make LSMOD=$HOME/.config/modprobed.db localmodconfig
+ make ${_compiler_flags} LSMOD=$HOME/.config/modprobed.db localmodconfig
else
msg2 "No modprobed.db data found"
exit 1
fi
fi
- make LLVM=$_LLVM LLVM_IAS=$_LLVM olddefconfig
+ make ${_compiler_flags} olddefconfig
make -s kernelrelease > version
msg2 "Prepared %s version %s" "$pkgbase" "$(<version)"
- [[ -z "$_makenconfig" ]] || make LLVM=$_LLVM LLVM_IAS=$_LLVM nconfig
+ if [ "$_makenconfig" = "y" ]; then
+ make ${_compiler_flags} nconfig
+ fi
# save configuration for later reuse
cat .config > "${SRCDEST}/config.last"
@@ -259,22 +271,23 @@ prepare() {
build() {
cd linux-${_major}
- make LLVM=$_LLVM LLVM_IAS=$_LLVM all
+ make ${_compiler_flags} all
}
_package() {
- pkgdesc="The Linux kernel and modules with Xanmod and Manjaro patches (Bootsplash support). Ashmem and binder are enabled"
- depends=('coreutils' 'linux-firmware' 'kmod' 'initramfs' 'mkinitcpio>=27')
- optdepends=('crda: to set the correct wireless channels of your country'
- 'linux-firmware: firmware images needed for some devices'
- 'bootsplash-systemd: for bootsplash functionality')
- provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE)
+ pkgdesc="The Linux kernel and modules with Xanmod and Manjaro patches"
+ depends=('coreutils' 'linux-firmware' 'kmod' 'initramfs')
+ optdepends=('wireless-regdb: to set the correct wireless channels of your country'
+ 'linux-firmware: firmware images needed for some devices')
+ provides=(VIRTUALBOX-GUEST-MODULES
+ WIREGUARD-MODULE
+ KSMBD-MODULE
+ NTFS3-MODULE)
replaces=()
conflicts=()
cd linux-${_major}
- local kernver="$(<version)"
- local modulesdir="$pkgdir/usr/lib/modules/$kernver"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
msg2 "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
@@ -288,10 +301,11 @@ _package() {
echo "${pkgver}-${pkgrel}-Manjaro-Xanmod x64" | install -Dm644 /dev/stdin "${pkgdir}/boot/${pkgbase}.kver"
msg2 "Installing modules..."
- make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
+ ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
+ DEPMOD=/doesnt/exist modules_install # Suppress depmod
- # remove build and source links
- rm "$modulesdir"/{source,build}
+ # remove build link
+ rm "$modulesdir"/build
}
_package-headers() {
@@ -311,11 +325,11 @@ _package-headers() {
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
+ # required when STACK_VALIDATION is enabled
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
- # add xfs and shmem for aufs building
- mkdir -p "$builddir"/{fs/xfs,mm}
+ # required when DEBUG_INFO_BTF_MODULES is enabled
+ if [ -f "tools/bpf/resolve_btfids/resolve_btfids" ]; then install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids ; fi
msg2 "Installing headers..."
cp -t "$builddir" -a include
@@ -325,13 +339,16 @@ _package-headers() {
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
- # http://bugs.archlinux.org/task/13146
+ # https://bugs.archlinux.org/task/13146
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
- # http://bugs.archlinux.org/task/20402
+ # https://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
+
+ # 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..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
@@ -356,7 +373,7 @@ _package-headers() {
msg2 "Stripping build tools..."
local file
while read -rd '' file; do
- case "$(file -bi "$file")" in
+ case "$(file -Sib "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
diff --git a/choose-gcc-optimization.sh b/choose-gcc-optimization.sh
index f10eec54b81d..38772443028a 100755
--- a/choose-gcc-optimization.sh
+++ b/choose-gcc-optimization.sh
@@ -11,54 +11,44 @@ cat << EOF
Available CPU microarchitectures:
- 1) AMD K6/K6-II/K6-III
- 2) AMD Athlon/Duron/K7
- 3) AMD Opteron/Athlon64/Hammer/K8
- 4) AMD Opteron/Athlon64/Hammer/K8 with SSE3
- 5) AMD 61xx/7x50/PhenomX3/X4/II/K10
- 6) AMD Family 10h (Barcelona)
- 7) AMD Family 14h (Bobcat)
- 8) AMD Family 16h (Jaguar)
- 9) AMD Family 15h (Bulldozer)
- 10) AMD Family 15h (Piledriver)
- 11) AMD Family 15h (Steamroller)
- 12) AMD Family 15h (Excavator)
- 13) AMD Family 17h (Zen)
- 14) AMD Family 17h (Zen 2)
- 15) AMD Family 19h Zen 3 processors (Zen 3)
- 16) Transmeta Crusoe
- 17) Transmeta Efficeon
- 18) IDT Winchip C6
- 19) Winchip-2/Winchip-2A/Winchip-3
- 20) AMD Elan
- 21) Geode GX1 (Cyrix MediaGX)
- 22) AMD Geode GX and LX
- 23) Cyrix III or C3
- 24) VIA C3 "Nehemiah"
- 25) VIA C7
- 26) Intel Pentium 4, Pentium D and older Nocona/Dempsey Xeon CPUs with Intel 64bit
- 27) Intel Atom
- 28) Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx)
- 29) Intel 1st Gen Core i3/i5/i7-family (Nehalem)
- 30) Intel 1.5 Gen Core i3/i5/i7-family (Westmere)
- 31) Intel Silvermont
- 32) Intel Goldmont (Apollo Lake and Denverton)
- 33) Intel Goldmont Plus (Gemini Lake)
- 34) Intel 2nd Gen Core i3/i5/i7-family (Sandybridge)
- 35) Intel 3rd Gen Core i3/i5/i7-family (Ivybridge)
- 36) Intel 4th Gen Core i3/i5/i7-family (Haswell)
- 37) Intel 5th Gen Core i3/i5/i7-family (Broadwell)
- 38) Intel 6th Gen Core i3/i5/i7-family (Skylake)
- 39) Intel 6th Gen Core i7/i9-family (Skylake X)
- 40) Intel 8th Gen Core i3/i5/i7-family (Cannon Lake)
- 41) Intel 8th Gen Core i7/i9-family (Ice Lake)
- 42) Xeon processors in the Cascade Lake family
- 43) Intel Xeon (Cooper Lake)
- 44) Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake)
- 45) Intel Sapphire Rapids
- 46) Intel Rocket Lake
- 47) Intel Alder Lake
+ 1) AMD Opteron/Athlon64/Hammer/K8
+ 2) AMD Opteron/Athlon64/Hammer/K8 with SSE3
+ 3) AMD 61xx/7x50/PhenomX3/X4/II/K10
+ 4) AMD Family 10h (Barcelona)
+ 5) AMD Family 14h (Bobcat)
+ 6) AMD Family 16h (Jaguar)
+ 7) AMD Family 15h (Bulldozer)
+ 8) AMD Family 15h (Piledriver)
+ 9) AMD Family 15h (Steamroller)
+ 10) AMD Family 15h (Excavator)
+ 11) AMD Family 17h (Zen)
+ 12) AMD Family 17h (Zen 2)
+ 13) AMD Family 19h (Zen 3)
+ 14) AMD Family 19h (Zen 4)
+ 15) Intel P4 / older Netburst based Xeon
+ 16) Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx)
+ 17) Intel Atom
+ 18) Intel 1st Gen Core i3/i5/i7-family (Nehalem)
+ 19) Intel 1.5 Gen Core i3/i5/i7-family (Westmere)
+ 20) Intel Silvermont
+ 21) Intel Goldmont (Apollo Lake and Denverton)
+ 22) Intel Goldmont Plus (Gemini Lake)
+ 23) Intel 2nd Gen Core i3/i5/i7-family (Sandybridge)
+ 24) Intel 3rd Gen Core i3/i5/i7-family (Ivybridge)
+ 25) Intel 4th Gen Core i3/i5/i7-family (Haswell)
+ 26) Intel 5th Gen Core i3/i5/i7-family (Broadwell)
+ 27) Intel 6th Gen Core i3/i5/i7-family (Skylake)
+ 28) Intel 6th Gen Core i7/i9-family (Skylake X)
+ 29) Intel 8th Gen Core i3/i5/i7-family (Cannon Lake)
+ 30) Intel 8th Gen Core i7/i9-family (Ice Lake)
+ 31) Xeon processors in the Cascade Lake family
+ 32) Intel Xeon (Cooper Lake)
+ 33) Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake)
+ 34) Intel Sapphire Rapids
+ 35) Intel Rocket Lake
+ 36) Intel Alder Lake
+ 91) Generic-x86-64-v1 (LEGACY < 2003. Not supported by XanMod project)
92) Generic-x86-64-v2 (Nehalem and newer)
93) Generic-x86-64-v3 (Haswell and newer)
94) Generic-x86-64-v4 (AVX512 CPUs)
@@ -66,7 +56,7 @@ cat << EOF
98) Intel-Native optimizations autodetected by GCC
99) AMD-Native optimizations autodetected by GCC
- 0) Generic (default)
+ 0) Generic x64-v2 (default)
EOF
@@ -74,66 +64,65 @@ sleep 1
answer=$1
case $answer in
- 1) Microarchitecture=CONFIG_MK6 ;;
- 2) Microarchitecture=CONFIG_MK7 ;;
- 3) Microarchitecture=CONFIG_MK8 ;;
- 4) Microarchitecture=CONFIG_MK8SSE3 ;;
- 5) Microarchitecture=CONFIG_MK10 ;;
- 6) Microarchitecture=CONFIG_MBARCELONA ;;
- 7) Microarchitecture=CONFIG_MBOBCAT ;;
- 8) Microarchitecture=CONFIG_MJAGUAR ;;
- 9) Microarchitecture=CONFIG_MBULLDOZER ;;
- 10) Microarchitecture=CONFIG_MPILEDRIVER ;;
- 11) Microarchitecture=CONFIG_MSTEAMROLLER ;;
- 12) Microarchitecture=CONFIG_MEXCAVATOR ;;
- 13) Microarchitecture=CONFIG_MZEN ;;
- 14) Microarchitecture=CONFIG_MZEN2 ;;
- 15) Microarchitecture=CONFIG_MZEN3 ;;
- 16) Microarchitecture=CONFIG_MCRUSOE ;;
- 17) Microarchitecture=CONFIG_MEFFICEON ;;
- 18) Microarchitecture=CONFIG_MWINCHIPC6 ;;
- 19) Microarchitecture=CONFIG_MWINCHIP3D ;;
- 20) Microarchitecture=CONFIG_MELAN ;;
- 21) Microarchitecture=CONFIG_MGEODEGX1 ;;
- 22) Microarchitecture=CONFIG_MGEODE_LX ;;
- 23) Microarchitecture=CONFIG_MCYRIXIII ;;
- 24) Microarchitecture=CONFIG_MVIAC3_2 ;;
- 25) Microarchitecture=CONFIG_MVIAC7 ;;
- 26) Microarchitecture=CONFIG_MPSC ;;
- 27) Microarchitecture=CONFIG_MATOM ;;
- 28) Microarchitecture=CONFIG_MCORE2 ;;
- 29) Microarchitecture=CONFIG_MNEHALEM ;;
- 30) Microarchitecture=CONFIG_MWESTMERE ;;
- 31) Microarchitecture=CONFIG_MSILVERMONT ;;
- 32) Microarchitecture=CONFIG_MGOLDMONT ;;
- 33) Microarchitecture=CONFIG_MGOLDMONTPLUS ;;
- 34) Microarchitecture=CONFIG_MSANDYBRIDGE ;;
- 35) Microarchitecture=CONFIG_MIVYBRIDGE ;;
- 36) Microarchitecture=CONFIG_MHASWELL ;;
- 37) Microarchitecture=CONFIG_MBROADWELL ;;
- 38) Microarchitecture=CONFIG_MSKYLAKE ;;
- 39) Microarchitecture=CONFIG_MSKYLAKEX ;;
- 40) Microarchitecture=CONFIG_MCANNONLAKE ;;
- 41) Microarchitecture=CONFIG_MICELAKE ;;
- 42) Microarchitecture=CONFIG_MCASCADELAKE ;;
- 43) Microarchitecture=CONFIG_MCOOPERLAKE ;;
- 44) Microarchitecture=CONFIG_MTIGERLAKE ;;
- 45) Microarchitecture=CONFIG_MSAPPHIRERAPIDS ;;
- 46) Microarchitecture=CONFIG_MROCKETLAKE ;;
- 47) Microarchitecture=CONFIG_MALDERLAKE ;;
- 92) Microarchitecture=CONFIG_GENERIC_CPU2 ;;
- 93) Microarchitecture=CONFIG_GENERIC_CPU3 ;;
- 94) Microarchitecture=CONFIG_GENERIC_CPU4 ;;
- 98) Microarchitecture=CONFIG_MNATIVE_INTEL ;;
- 99) Microarchitecture=CONFIG_MNATIVE_AMD ;;
- *) default=CONFIG_GENERIC_CPU ;;
+ 1) Microarchitecture=CONFIG_MK8 ;;
+ 2) Microarchitecture=CONFIG_MK8SSE3 ;;
+ 3) Microarchitecture=CONFIG_MK10 ;;
+ 4) Microarchitecture=CONFIG_MBARCELONA ;;
+ 5) Microarchitecture=CONFIG_MBOBCAT ;;
+ 6) Microarchitecture=CONFIG_MJAGUAR ;;
+ 7) Microarchitecture=CONFIG_MBULLDOZER ;;
+ 8) Microarchitecture=CONFIG_MPILEDRIVER ;;
+ 9) Microarchitecture=CONFIG_MSTEAMROLLER ;;
+ 10) Microarchitecture=CONFIG_MEXCAVATOR ;;
+ 11) Microarchitecture=CONFIG_MZEN ;;
+ 12) Microarchitecture=CONFIG_MZEN2 ;;
+ 13) Microarchitecture=CONFIG_MZEN3 ;;
+ 14) Microarchitecture=CONFIG_MZEN4 ;;
+ 15) Microarchitecture=CONFIG_MPSC ;;
+ 16) Microarchitecture=CONFIG_MCORE2 ;;
+ 17) Microarchitecture=CONFIG_MATOM ;;
+ 18) Microarchitecture=CONFIG_MNEHALEM ;;
+ 19) Microarchitecture=CONFIG_MWESTMERE ;;
+ 20) Microarchitecture=CONFIG_MSILVERMONT ;;
+ 21) Microarchitecture=CONFIG_MGOLDMONT ;;
+ 22) Microarchitecture=CONFIG_MGOLDMONTPLUS ;;
+ 23) Microarchitecture=CONFIG_MSANDYBRIDGE ;;
+ 24) Microarchitecture=CONFIG_MIVYBRIDGE ;;
+ 25) Microarchitecture=CONFIG_MHASWELL ;;
+ 26) Microarchitecture=CONFIG_MBROADWELL ;;
+ 27) Microarchitecture=CONFIG_MSKYLAKE ;;
+ 28) Microarchitecture=CONFIG_MSKYLAKEX ;;
+ 29) Microarchitecture=CONFIG_MCANNONLAKE ;;
+ 30) Microarchitecture=CONFIG_MICELAKE ;;
+ 31) Microarchitecture=CONFIG_MCASCADELAKE ;;
+ 32) Microarchitecture=CONFIG_MCOOPERLAKE ;;
+ 33) Microarchitecture=CONFIG_MTIGERLAKE ;;
+ 34) Microarchitecture=CONFIG_MSAPPHIRERAPIDS ;;
+ 35) Microarchitecture=CONFIG_MROCKETLAKE ;;
+ 36) Microarchitecture=CONFIG_MALDERLAKE ;;
+ 91) Microarchitecture=CONFIG_GENERIC_CPU ;;
+ 92) Microarchitecture=CONFIG_GENERIC_CPU2 ;;
+ 93) Microarchitecture=CONFIG_GENERIC_CPU3 ;;
+ 94) Microarchitecture=CONFIG_GENERIC_CPU4 ;;
+ 98) Microarchitecture=CONFIG_MNATIVE_INTEL ;;
+ 99) Microarchitecture=CONFIG_MNATIVE_AMD ;;
+ *) default=CONFIG_GENERIC_CPU2 ;;
esac
warning "According to PKGBUILD variable _microarchitecture, your choice is $answer"
msg "Building this package for microarchitecture: $Microarchitecture$default"
sleep 5
+_defaultmicro=$(grep ^CONFIG_LOCALVERSION .config)
+if [ -z "${default}" ]; then
+ _localversion=$(echo ${Microarchitecture,,} | sed -e 's/config_m/-/g' -e 's/config_generic_cpu/-x64v/g')
+ sed -e "s|^$_defaultmicro|CONFIG_LOCALVERSION=\"$_localversion\"|g" -i .config
+fi
+
sed -e 's|^CONFIG_GENERIC_CPU=y|# CONFIG_GENERIC_CPU is not set|g' -i .config
+sed -e 's|^CONFIG_GENERIC_CPU2=y|# CONFIG_GENERIC_CPU2 is not set|g' -i .config
+sed -e 's|^CONFIG_GENERIC_CPU3=y|# CONFIG_GENERIC_CPU3 is not set|g' -i .config
+sed -e 's|^CONFIG_GENERIC_CPU4=y|# CONFIG_GENERIC_CPU4 is not set|g' -i .config
sed -e "s|^# $Microarchitecture is not set|$Microarchitecture=y|g" -i .config
echo