Created
October 17, 2022 14:11
-
-
Save FiestaLake/003ef1495a7e2759ae5d7b183ab7f1c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From f9dc18e3f50a17210d9f19743bbd560677cedddf Mon Sep 17 00:00:00 2001 | |
From: Mingi Sung <FiestaLake@protonmail.com> | |
Date: Tue, 11 Oct 2022 23:25:21 +0900 | |
Subject: [PATCH 1/2] Enable NTFS3 & SMB configs | |
* From the linux-clear (mainline) AUR package. | |
Signed-off-by: Mingi Sung <FiestaLake@protonmail.com> | |
--- | |
.SRCINFO | 1 + | |
PKGBUILD | 12 +++++++++++- | |
2 files changed, 12 insertions(+), 1 deletion(-) | |
diff --git a/.SRCINFO b/.SRCINFO | |
index 2456010..20c4c10 100644 | |
--- a/.SRCINFO | |
+++ b/.SRCINFO | |
@@ -34,6 +34,7 @@ pkgname = linux-clear-lts2021 | |
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 = KSMBD-MODULE | |
provides = VIRTUALBOX-GUEST-MODULES | |
provides = WIREGUARD-MODULE | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 9b5775e..37b7460 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -161,6 +161,16 @@ prepare() { | |
# Kernel hacking -> Compile-time checks and compiler options -> Make section mismatch errors non-fatal | |
scripts/config --enable SECTION_MISMATCH_WARN_ONLY | |
+ # File systems | |
+ scripts/config --module NTFS3_FS \ | |
+ --enable NTFS3_LZX_XPRESS \ | |
+ --enable NTFS3_FS_POSIX_ACL | |
+ | |
+ scripts/config --module SMB_SERVER \ | |
+ --enable SMB_SERVER_SMBDIRECT \ | |
+ --enable SMB_SERVER_CHECK_CAP_NET_ADMIN \ | |
+ --enable SMB_SERVER_KERBEROS5 | |
+ | |
# Security options | |
scripts/config --enable SECURITY_SELINUX \ | |
--enable SECURITY_SELINUX_BOOTPARAM \ | |
@@ -238,7 +248,7 @@ _package() { | |
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') | |
- provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE) | |
+ provides=(KSMBD-MODULE VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE) | |
install=linux.install | |
cd $_srcname | |
-- | |
2.38.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 4ee64a50e576c4c053ba39e982d7fc0e3fd4c782 Mon Sep 17 00:00:00 2001 | |
From: Mingi Sung <FiestaLake@protonmail.com> | |
Date: Mon, 17 Oct 2022 22:33:25 +0900 | |
Subject: [PATCH 2/2] Add LLVM configs | |
* From the linux-clear (mainline) AUR package. | |
Signed-off-by: Mingi Sung <FiestaLake@protonmail.com> | |
--- | |
PKGBUILD | 38 +++++++++++++++++++++++++++++++------- | |
1 file changed, 31 insertions(+), 7 deletions(-) | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 37b7460..33db4d7 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -71,6 +71,9 @@ | |
# a new kernel is released, but again, convenient for package bumps. | |
: "${_use_current:=""}" | |
+# Enable compiling with LLVM | |
+: "${_use_llvm_lto:=""}" | |
+ | |
### IMPORTANT: Do no edit below this line unless you know what you're doing | |
_major=5.15 | |
@@ -85,6 +88,9 @@ arch=('x86_64') | |
url="https://github.com/clearlinux-pkgs/linux-lts2021" | |
license=('GPL2') | |
makedepends=('bc' 'cpio' 'git' 'libelf' 'pahole' 'xmlto') | |
+if [ -n "$_use_llvm_lto" ]; then | |
+ makedepends+=(clang llvm lld python) | |
+fi | |
options=('!strip') | |
_gcc_more_v='20220315' | |
source=( | |
@@ -95,6 +101,13 @@ source=( | |
"more-uarches-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/$_gcc_more_v.tar.gz" | |
) | |
+if [ -n "$_use_llvm_lto" ]; then | |
+ BUILD_FLAGS=( | |
+ LLVM=1 | |
+ LLVM_IAS=1 | |
+ ) | |
+fi | |
+ | |
export KBUILD_BUILD_HOST=archlinux | |
export KBUILD_BUILD_USER=$pkgbase | |
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" | |
@@ -185,7 +198,18 @@ prepare() { | |
# Library routines | |
scripts/config --enable FONT_TER16x32 | |
- make olddefconfig | |
+ if [ -n "$_use_llvm_lto" ]; then | |
+ scripts/config --disable LTO_NONE \ | |
+ --enable LTO \ | |
+ --enable LTO_CLANG \ | |
+ --enable ARCH_SUPPORTS_LTO_CLANG \ | |
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \ | |
+ --enable HAS_LTO_CLANG \ | |
+ --enable LTO_CLANG_THIN \ | |
+ --enable HAVE_GCC_PLUGINS | |
+ fi | |
+ | |
+ make ${BUILD_FLAGS[*]} olddefconfig | |
diff -u $srcdir/$pkgbase/config .config || : | |
# https://github.com/graysky2/kernel_compiler_patch | |
@@ -195,10 +219,10 @@ prepare() { | |
if [ -n "$_subarch" ]; then | |
# user wants a subarch so apply choice defined above interactively via 'yes' | |
- yes "$_subarch" | make oldconfig | |
+ yes "$_subarch" | make ${BUILD_FLAGS[*]} oldconfig | |
else | |
# no subarch defined so allow user to pick one | |
- make oldconfig | |
+ make ${BUILD_FLAGS[*]} oldconfig | |
fi | |
### Optionally use running kernel's config | |
@@ -221,17 +245,17 @@ prepare() { | |
if [ -n "$_localmodcfg" ]; then | |
if [ -e $HOME/.config/modprobed.db ]; then | |
echo "Running Steven Rostedt's make localmodconfig now" | |
- make LSMOD=$HOME/.config/modprobed.db localmodconfig | |
+ make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig | |
else | |
echo "No modprobed.db data found" | |
exit | |
fi | |
fi | |
- make -s kernelrelease > version | |
+ make ${BUILD_FLAGS[*]} -s kernelrelease > version | |
echo "Prepared $pkgbase version $(<version)" | |
- [[ -z "$_makenconfig" ]] || make nconfig | |
+ [[ -z "$_makenconfig" ]] || make ${BUILD_FLAGS[*]} nconfig | |
### Save configuration for later reuse | |
cp -Tf ./.config "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" | |
@@ -239,7 +263,7 @@ prepare() { | |
build() { | |
cd ${_srcname} | |
- make all | |
+ make ${BUILD_FLAGS[*]} all | |
} | |
_package() { | |
-- | |
2.38.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment