6.10.2-1 (clr 6.10.2-1454) maintainer switch

metak announced that he had orphaned the package due to time constraints and a new pc. I have now took over the maintainership of the package. Nothing would/should change.
In this commit I added some comments in various places, added a few build options and generally ported some stuff from my (formerly) softfork at https://git.staropensource.de/JeremyStarTM/jstm-optimized.

Enjoy :3
This commit is contained in:
JeremyStar™ 2024-08-06 21:07:57 +02:00
parent e6ad9bba1b
commit 660c2a1864
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
3 changed files with 263 additions and 260 deletions

View file

@ -1,6 +1,6 @@
pkgbase = linux-clear
pkgdesc = Clear Linux
pkgver = 6.9.8
pkgdesc = Linux kernel with patches from Clear Linux to allow for higher performance.
pkgver = 6.10.2+clr6.10.2_1454
pkgrel = 1
url = https://github.com/clearlinux-pkgs/linux
arch = x86_64
@ -16,34 +16,33 @@ pkgbase = linux-clear
makedepends = tar
makedepends = xz
makedepends = zstd
options = !debug
options = !strip
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.9.tar.xz
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.9.tar.sign
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/patch-6.9.8.xz
source = linux-clear::git+https://github.com/clearlinux-pkgs/linux.git#tag=6.9.7-1445
options = !debug
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.tar.xz
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.tar.sign
source = https://cdn.kernel.org/pub/linux/kernel/v6.x/patch-6.10.2.xz
source = cl-linux::git+https://github.com/clearlinux-pkgs/linux.git#tag=6.10.2-1454
source = more-uarches-20240221.2.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20240221.2.tar.gz
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
sha256sums = 24fa01fb989c7a3e28453f117799168713766e119c5381dac30115f18f268149
sha256sums = 774698422ee54c5f1e704456f37c65c06b51b4e9a8b0866f34580d86fef8e226
sha256sums = SKIP
sha256sums = cf7dbb88fa35557195f8cde7fd05ec873db95af91cbcae7472a13d9bc9c5cbaa
sha256sums = f3166b9b9f6a7dbae9ed7e92e373c8ddb672c5bd2da3991207aa30f52ceda7fa
sha256sums = SKIP
sha256sums = 1d3ac3e581cbc5108f882fcdc75d74f7f069654c71bad65febe5ba15a7a3a14f
pkgname = linux-clear
pkgdesc = The Clear Linux kernel and modules
pkgdesc = Linux kernel with patches from Clear Linux to allow for higher performance. This package includes the kernel and compiled modules.
install = linux.install
depends = coreutils
depends = kmod
depends = initramfs
optdepends = wireless-regdb: to set the correct wireless channels of your country
optdepends = linux-firmware: firmware images needed for some devices
optdepends = modprobed-db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig
provides = VIRTUALBOX-GUEST-MODULES
provides = WIREGUARD-MODULE
provides = KSMBD-MODULE
pkgname = linux-clear-headers
pkgdesc = Headers and scripts for building modules for the Clear Linux kernel
pkgdesc = Linux kernel with patches from Clear Linux to allow for higher performance. This package includes header files and scripts for building kernel modules.
depends = pahole

385
PKGBUILD
View file

@ -1,25 +1,56 @@
# Maintainer: JeremyStarTM <jeremystartm@staropensource.de>
# Maintainer: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor:
### BUILD OPTIONS
# Set the next two variables to ANYTHING that is not null to enable them
# You can modify these settings by executing "env _<setting>=<value> makepkg"
# instead of modifying the PKGBUILD file. Here's an example:
# env _makemenuconfig=y _copyfinalconfig=y _subarch=42 makepkg
# Tweak kernel options prior to a build via nconfig
# Tweak kernel options prior to a build via menuconfig.
#
# Set to anything but null to activate.
: "${_makemenuconfig:=""}"
# Tweak kernel options prior to a build via nconfig.
#
# Set to anything but null to activate.
: "${_makenconfig:=""}"
# Only compile active modules to VASTLY reduce the number of modules built and
# the build time.
# Tweak kernel options prior to a build via xconfig.
#
# Set to anything but null to activate.
: "${_makexconfig:=""}"
# Use the current kernel's .config file
# Enabling this option will use the .config of the currently
# running kernel rather than the Arch Linux defaults. Useful
# when the package gets updated and you already went through
# the trouble of customizing your config options. NOT recommended
# when a new kernel is released, but again, convenient
# for package bumps.
#
# Set to anything but null to activate.
: "${_use_current:=""}"
# Determines whether the kernel configuration should be
# copied into the source tree before compilation starts.
#
# Set to anything but null to activate.
: "${_copyfinalconfig:=""}"
# Only compile active modules to VASTLY reduce the number
# of modules built and the build time.
#
# To keep track of which modules are needed for your specific system/hardware,
# give module_db a try: https://aur.archlinux.org/packages/modprobed-db
# This PKGBUILD reads the database kept if it exists
# give modprobed-db a try: https://aur.archlinux.org/packages/modprobed-db
#
# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db
# Set to anything but null to activate.
: "${_localmodcfg:=""}"
# Optionally select a sub architecture by number or leave blank which will
# require user interaction during the build. Note that the generic (default)
# option is 40.
# Optionally select a sub architecture by number or
# leave blank, which will require user interaction during the build.
# Note that the default option is 40.
#
# 1. AMD Opteron/Athlon64/Hammer/K8 (MK8)
# 2. AMD Opteron/Athlon64/Hammer/K8 with SSE3 (MK8SSE3)
@ -68,115 +99,108 @@
# 45. AMD-Native optimizations autodetected by the compiler (MNATIVE_AMD)
: "${_subarch:=""}"
# Use the current kernel's .config file
# Enabling this option will use the .config of the RUNNING kernel rather than
# the ARCH defaults. Useful when the package gets updated and you already went
# through the trouble of customizing your config options. NOT recommended when
# a new kernel is released, but again, convenient for package bumps.
: "${_use_current:=""}"
# Enable compiling with LLVM
# Enable compilation with LLVM
# Be warned, this is largely untested by me (JeremyStarTM). It *should* work,
# but if it doesn't, write a comment and I'll fix it.
#
# Set to anything but null to activate.
: "${_use_llvm_lto:=""}"
# Enable/Disable debug options
# Set 'y' to enable, 'n' to force disable debug options if already enabled in your
# .config file or leave empty to ignore debug options.
# Debug options
# This allows you to enable or disable debug options.
# Set to 'y' to force enable, 'n' to force disable or '' to ignore debug options.
# Leaving the setting empty will use the kernel configuration setting to determine
# if debug options shall be enabled/disabled.
#
# Set to anything but null to activate.
: "${_debug:=""}"
### IMPORTANT: Do no edit below this line unless you know what you're doing
### BUILD OPTIONS END
_major=6.9
_minor=8
_srcname=linux-${_major}
_clr=${_major}.7-1445
_gcc_more_v='20240221.2'
# Kernel version
_kernel_major=6.10
_kernel_minor=2
# Clear Linux patches version
_clr=2-1454
# kernel_compiler_patch version
_kernelcompilerpatch="20240221.2"
# Source directory names
_src_linux=linux-${_kernel_major}
_src_clr=${_kernel_major}.${_clr}
# Package information
pkgbase=linux-clear
pkgver=${_major}.${_minor}
pkgver=${_kernel_major}.${_kernel_minor}+clr${_src_clr//-/_}
pkgrel=1
pkgdesc='Clear Linux'
arch=('x86_64')
pkgdesc="Linux kernel with patches from Clear Linux to allow for higher performance."
arch=("x86_64")
url="https://github.com/clearlinux-pkgs/linux"
license=(GPL-2.0-only)
makedepends=(bc cpio gettext git libelf pahole perl python tar xz zstd)
if [ -n "$_use_llvm_lto" ]; then
makedepends+=(clang llvm lld)
fi
options=(!debug !strip)
if [ "$_debug" == "y" ]; then
options=(!strip)
fi
makedepends=("bc" "cpio" "gettext" "git" "libelf" "pahole" "perl" "python" "tar" "xz" "zstd")
[[ -n "${_use_llvm_to}" ]] && makedepends+=("clang" "llvm" "lld")
options=("!strip" "!debug")
[[ "${_debug}" == "y" ]] && options=("!strip")
source=(
"https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${_major}.tar.xz"
"https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${_major}.tar.sign"
"https://cdn.kernel.org/pub/linux/kernel/v6.x/patch-${pkgver}.xz"
"$pkgbase::git+https://github.com/clearlinux-pkgs/linux.git#tag=${_clr}"
"more-uarches-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/$_gcc_more_v.tar.gz"
"https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${_kernel_major}.tar.xz"
"https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${_kernel_major}.tar.sign"
"https://cdn.kernel.org/pub/linux/kernel/v6.x/patch-${_kernel_major}.${_kernel_minor}.xz"
"cl-linux::git+https://github.com/clearlinux-pkgs/linux.git#tag=${_src_clr}"
"more-uarches-${_kernelcompilerpatch}.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/${_kernelcompilerpatch}.tar.gz"
)
if [ -n "$_use_llvm_lto" ]; then
BUILD_FLAGS=(
LLVM=1
LLVM_IAS=1
)
fi
[[ -n "${_use_llvm_lto}" ]] && BUILD_FLAGS=("LLVM=1" "LLVM_IAS=1")
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_USER=${pkgbase}
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
prepare() {
cd ${_srcname}
cd "${_src_linux}" || exit 1
### Add upstream patches
echo "Add upstream patches"
patch -Np1 -i ../patch-${pkgver}
# Patch with kernel version patches
patch -Np1 -i ../patch-${_kernel_major}.${_kernel_minor} || true
### Setting version
echo "Setting version..."
echo "-$pkgrel" > localversion.10-pkgrel
# Set version
echo "-${pkgrel}" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
### Add Clearlinux patches
for i in $(grep '^Patch' ${srcdir}/$pkgbase/linux.spec |\
grep -Ev '^Patch0132|^Patch0109|^Patch0118|^Patch0113|^Patch0138|^Patch0139|^Patch0147' | sed -n 's/.*: //p'); do
if [ -n "$_use_llvm_lto" ]; then
# Patch with Clear Linux patches
for i in $(grep '^Patch' "${srcdir}"/cl-linux/linux.spec|grep -Ev '^Patch0132|^Patch0109|^Patch0118|^Patch0113|^Patch0138|^Patch0139|^Patch0147' | sed -n 's/.*: //p'); do
if [ -n "${_use_llvm_lto}" ]; then
if [ "${i}" == "0133-novector.patch" ] ; then
continue
fi
fi
echo "Applying patch ${i}..."
patch -Np1 -i "$srcdir/$pkgbase/${i}"
patch -Np1 -i "${srcdir}/cl-linux/${i}" || true
done
### Setting config
echo "Setting config..."
cp -Tf $srcdir/$pkgbase/config ./.config
### Enable extra options
echo "Enable extra options..."
# Copy configuration file (if found)
if [ -f "${startdir}/kconfig" ]; then
echo ":: Using configuration file \"${startdir}/kconfig\""
cp -Tf "${startdir}/kconfig" ./.config
else
echo ":: Using configuration file \"${srcdir}/${pkgbase}/config\""
cp -Tf $srcdir/cl-linux/config ./.config
fi
# Extra configuration
# General setup
scripts/config --set-str DEFAULT_HOSTNAME archlinux \
-e IKCONFIG \
-e IKCONFIG_PROC \
-u RT_GROUP_SCHED
# Power management and ACPI options
scripts/config -e ACPI_REV_OVERRIDE_POSSIBLE \
-e ACPI_TABLE_UPGRADE
# Virtualization
scripts/config -e KVM_SMM
# General architecture-dependent options
scripts/config -e KPROBES
# Enable loadable module support
scripts/config -u MODULE_SIG_FORCE
# Networking support
scripts/config -e NETFILTER_INGRESS
# Device Drivers
scripts/config -e FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER \
-e DELL_SMBIOS_SMM \
@ -187,20 +211,16 @@ prepare() {
-M SND_MIXER_OSS SND_PCM_OSS \
-E SND_PCM_OSS SND_PCM_OSS_PLUGINS \
-m AGP -M AGP AGP_INTEL -M AGP_INTEL AGP_VIA
# Kernel hacking -> Compile-time checks and compiler options -> Make section mismatch errors non-fatal
scripts/config -e SECTION_MISMATCH_WARN_ONLY
# File systems
scripts/config -m NTFS3_FS \
-e NTFS3_LZX_XPRESS \
-e NTFS3_FS_POSIX_ACL
scripts/config -m SMB_SERVER \
-e SMB_SERVER_SMBDIRECT \
-e SMB_SERVER_CHECK_CAP_NET_ADMIN \
-e SMB_SERVER_KERBEROS5
# Security options
scripts/config -e SECURITY_SELINUX \
-e SECURITY_SELINUX_BOOTPARAM \
@ -211,12 +231,11 @@ prepare() {
-e SECURITY_TOMOYO \
-e SECURITY_APPARMOR \
-e SECURITY_YAMA
# Library routines
scripts/config -k -e FONT_TER16x32
if [ -n "$_use_llvm_lto" ]; then
scripts/config -d LTO_NONE \
# Enable LLVM compilation
[[ -n "${_use_llvm_lto}" ]] && scripts/config -d LTO_NONE \
-e LTO \
-e LTO_CLANG \
-e ARCH_SUPPORTS_LTO_CLANG \
@ -224,172 +243,158 @@ prepare() {
-e HAS_LTO_CLANG \
-e LTO_CLANG_THIN \
-e HAVE_GCC_PLUGINS
fi
if [ "$_debug" == "y" ]; then
scripts/config -e DEBUG_INFO \
# Enable or disable debug settings
[[ "${_debug}" == "y" ]] && scripts/config -e DEBUG_INFO \
-e DEBUG_INFO_BTF \
-e DEBUG_INFO_DWARF4 \
-e PAHOLE_HAS_SPLIT_BTF \
-e DEBUG_INFO_BTF_MODULES
elif [ "$_debug" == "n" ]; then
scripts/config -d DEBUG_INFO \
[[ "${_debug}" == "n" ]] && scripts/config -d DEBUG_INFO \
-d DEBUG_INFO_BTF \
-d DEBUG_INFO_DWARF4 \
-d PAHOLE_HAS_SPLIT_BTF \
-d DEBUG_INFO_BTF_MODULES
fi
# Run olddefconfig
make ${BUILD_FLAGS[*]} olddefconfig
diff -u $srcdir/$pkgbase/config .config || :
diff -u $srcdir/cl-linux/config .config || :
# https://github.com/graysky2/kernel_compiler_patch
# make sure to apply after olddefconfig to allow the next section
echo "Patching to enable GCC optimization for other uarchs..."
patch -Np1 -i "$srcdir/kernel_compiler_patch-$_gcc_more_v/more-uarches-for-kernel-6.8-rc4+.patch"
# Patch with kernel_compiler_patch patches
# This must be executed after olddefconfig
# to allow for the next section to run.
patch -Np1 -i "$srcdir/kernel_compiler_patch-$_kernelcompilerpatch/more-uarches-for-kernel-6.8-rc4+.patch"
if [ -n "$_subarch" ]; then
# user wants a subarch so apply choice defined above interactively via 'yes'
yes "$_subarch" | make ${BUILD_FLAGS[*]} oldconfig
else
# no subarch defined so allow user to pick one
make ${BUILD_FLAGS[*]} oldconfig
fi
# Set subarch automatically
[[ -n "${_subarch}" ]] && yes "${_subarch}" | make ${BUILD_FLAGS[*]} oldconfig
# Ask for subarch
[[ -z "${_subarch}" ]] && make ${BUILD_FLAGS[*]} oldconfig
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
# Optionally use the configuration of the running kernel
# Written originally by nous, see
# https://web.archive.org/web/20110711231356/https://aur.archlinux.org/packages.php?ID=40191 (package doesn't exist anymore)
[[ -n "${_use_current}" ]] &&
if [[ -s /proc/config.gz ]]; then
echo "Extracting config from /proc/config.gz..."
# modprobe configs
zcat /proc/config.gz > ./.config
else
warning "Your kernel was not compiled with IKCONFIG_PROC!"
warning "You cannot read the current config!"
warning "Aborting!"
warning "Your kernel was not compiled with IKCONFIG_PROC."
warning "Unable to read kernel configuration, aborting."
exit
fi
fi
### Optionally load needed modules for the make localmodconfig
# Read and apply modprobed database
# See https://aur.archlinux.org/packages/modprobed-db
if [ -n "$_localmodcfg" ]; then
if [ -e $HOME/.config/modprobed.db ]; then
echo "Running Steven Rostedt's make localmodconfig now"
make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig
[[ -n "${_localmodcfg}" ]] &&
if [ -e "${HOME}/.config/modprobed.db" ]; then
make ${BUILD_FLAGS[*]} LSMOD=${HOME}/.config/modprobed.db localmodconfig
else
echo "No modprobed.db data found"
exit
fi
echo ":: No modprobed.db file was found at ${HOME}/.config, skipping"
fi
# Write kernel version
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
[[ -z "$_makenconfig" ]] || make ${BUILD_FLAGS[*]} nconfig
# Open configuration editors
[[ -n "$_makemenuconfig" ]] && make ${BUILD_FLAGS[*]} menuconfig
[[ -n "$_makexconfig" ]] && make ${BUILD_FLAGS[*]} xconfig
[[ -n "$_makenconfig" ]] && make ${BUILD_FLAGS[*]} nconfig
### Save configuration for later reuse
cp -Tf ./.config "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}"
# Save configuration
[[ -n "${_copyfinalconfig}" ]] && cp -Tf ./.config "${startdir}/kconfig-new" || true
}
build() {
cd ${_srcname}
cd "${_src_linux}" || exit 1
make ${BUILD_FLAGS[*]} all
}
_package() {
pkgdesc="The $pkgdesc kernel and modules"
depends=('coreutils' 'kmod' 'initramfs')
optdepends=('wireless-regdb: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices'
'modprobed-db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
pkgdesc="${pkgdesc} This package includes the kernel and compiled modules."
depends=("coreutils" "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)
install=linux.install
cd $_srcname
cd "${_src_linux}" || exit 1
local modulesdir="${pkgdir}/usr/lib/modules/$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# Create boot image
# systemd expects to find the kernel there to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
install -Dm644 "$(make -s image_name)" "${modulesdir}/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "${pkgbase}" | install -Dm644 /dev/stdin "${modulesdir}/pkgbase"
echo "Installing modules..."
ZSTD_CLEVEL=19 make ${BUILD_FLAGS[*]} INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
# Install modules
ZSTD_CLEVEL=19 make ${BUILD_FLAGS[*]} INSTALL_MOD_PATH="${pkgdir}/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
# remove build link
rm "$modulesdir"/build
# Remove build directory
rm "${modulesdir}"/build
}
_package-headers() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
depends=(pahole)
pkgdesc="${pkgdesc} This package includes header files and scripts for building kernel modules."
depends=("pahole")
cd ${_srcname}
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
cd "${_src_linux}" || exit 1
local builddir="${pkgdir}/usr/lib/modules/$(<version)/build"
echo "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
install -Dt "${builddir}" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
install -Dt "${builddir}/kernel" -m644 kernel/Makefile
install -Dt "${builddir}/arch/x86" -m644 arch/x86/Makefile
cp -t "${builddir}" -a scripts
# required when STACK_VALIDATION is enabled
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# Required when STACK_VALIDATION is enabled
install -Dt "${builddir}/tools/objtool" tools/objtool/objtool
# 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
# Required when DEBUG_INFO_BTF_MODULES is enabled
[[ -f tools/bpf/resolve_btfids/resolve_btfids ]] && install -Dt "${builddir}/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
echo "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
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
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
install -Dt "${builddir}/drivers/md" -m644 drivers/md/*.h
install -Dt "${builddir}/net/mac80211" -m644 net/mac80211/*.h
# https://bugs.archlinux.org/task/13146
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
install -Dt "${builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# 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
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
install -Dt "${builddir}/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
echo "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
find . -name 'Kconfig*' -exec install -Dm644 {} "${builddir}/{}" \;
echo "Removing unneeded architectures..."
# Remove redundant architectures
local arch
for arch in "$builddir"/arch/*/; do
for arch in "${builddir}"/arch/*/; do
[[ $arch = */x86/ ]] && continue
echo "Removing $(basename "$arch")"
rm -r "$arch"
echo "Removing $(basename "${arch}")"
rm -r "${arch}"
done
echo "Removing documentation..."
rm -r "$builddir/Documentation"
# Remove documentation
rm -r "${builddir}/Documentation"
echo "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
# Remove broken symlinks
find -L "${builddir}" -type l -printf "Removing %P\n" -delete
echo "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
# Remove loose objects
find "${builddir}" -type f -name '*.o' -printf "Removing %P\n" -delete
echo "Stripping build tools..."
# Strip build tools
local file
while read -rd '' file; do
while read -rd "" file; do
case "$(file -Sib "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
@ -400,14 +405,14 @@ _package-headers() {
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
done < <(find "${builddir}" -type f -perm -u+x ! -name vmlinux -print0)
echo "Stripping vmlinux..."
strip -v $STRIP_STATIC "$builddir/vmlinux"
# Strip vmlinux
strip -v $STRIP_STATIC "${builddir}/vmlinux"
echo "Adding symlink..."
# Add symlink to build directory
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
ln -sr "${builddir}" "$pkgdir/usr/src/$pkgbase"
}
pkgname=("$pkgbase" "$pkgbase-headers")
@ -417,14 +422,12 @@ for _p in "${pkgname[@]}"; do
_package${_p#$pkgbase}
}"
done
sha256sums=('24fa01fb989c7a3e28453f117799168713766e119c5381dac30115f18f268149'
'SKIP'
'cf7dbb88fa35557195f8cde7fd05ec873db95af91cbcae7472a13d9bc9c5cbaa'
'SKIP'
'1d3ac3e581cbc5108f882fcdc75d74f7f069654c71bad65febe5ba15a7a3a14f')
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
"ABAF11C65A2970B130ABE3C479BE3E4300411886" # Linus Torvalds
"647F28654894E3BD457199BE38DBBDC86092693E" # Greg Kroah-Hartman
)
sha256sums=("774698422ee54c5f1e704456f37c65c06b51b4e9a8b0866f34580d86fef8e226"
"SKIP"
"f3166b9b9f6a7dbae9ed7e92e373c8ddb672c5bd2da3991207aa30f52ceda7fa"
"SKIP"
"1d3ac3e581cbc5108f882fcdc75d74f7f069654c71bad65febe5ba15a7a3a14f")

View file

@ -1,15 +1,16 @@
#!/bin/bash
_5_2_2_2_changes() {
echo ':: Kernel command line update: add page_alloc.shuffle=1'
echo ":: A new command line option was added: add page_alloc.shuffle=1"
}
_5_2_9_6_changes() {
echo ':: Microcode is no longer builtin. https://wiki.archlinux.org/index.php/Microcode'
echo ":: Microcode is no longer builtin. See https://wiki.archlinux.org/index.php/Microcode"
}
post_install() {
echo ":: Adjust kernel command line in your bootloader to Clear Linux kernel default:"
echo ":: Clear Linux bundles a custom command line which must be applied manually on other distributions."
echo " This is their default command line:"
echo " quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests initcall_debug"
echo " intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check noreplace-smp"
echo " page_alloc.shuffle=1 rcupdate.rcu_expedited=1"
@ -23,7 +24,7 @@ post_upgrade() {
)
for v in "${upgrades[@]}"; do
if [[ $(vercmp "$v" "$2") -eq 1 ]]; then
if [[ $(vercmp "${v}" "$2") -eq 1 ]]; then
"_${v//[.-]/_}_changes"
fi
done