linux-lqxcjk-headers

LOW
maintainer eeeeei 1 votes base linux-lqxcjk scanned 2026-09-02 19:51:22.089411
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: Piotr Gorski <lucjan.lucjanov@gmail.com> PGP-Key: BDB26C5A
2# Contributor: shivik <> PGP-Key: 761E423C
3# Contributor: Michael Duell <mail@akurei.me> PGP-Key: 6EE23EBE
4# A special thanks to Steven Barrett for very important suggestions
5# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
6# Contributor: Tobias Powalowski <tpowa@archlinux.org>
7# Contributor: Thomas Baechler <thomas@archlinux.org>
8
9### BUILD OPTIONS
10# Set these variables to ANYTHING that is not null to enable them
11
12### Tweak kernel options prior to a build via nconfig
13_makenconfig=
14
15### Tweak kernel options prior to a build via menuconfig
16_makemenuconfig=
17
18### Tweak kernel options prior to a build via xconfig
19_makexconfig=
20
21### Tweak kernel options prior to a build via gconfig
22_makegconfig=
23
24# Compile ONLY used modules to VASTLY reduce the number of modules built
25# and the build time.
26#
27# To keep track of which modules are needed for your specific system/hardware,
28# give module_db script a try: https://aur.archlinux.org/packages/modprobed-db
29# This PKGBUILD read the database kept if it exists
30#
31# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db
32_localmodcfg=
33
34# Use the current kernel's .config file
35# Enabling this option will use the .config of the RUNNING kernel rather than
36# the ARCH defaults. Useful when the package gets updated and you already went
37# through the trouble of customizing your config options. NOT recommended when
38# a new kernel is released, but again, convenient for package bumps.
39_use_current=
40
41### Selecting the CPU scheduler
42# ATTENTION - one of three predefined values should be selected!
43# 'bmq' - select 'BitMap Queue CPU scheduler'
44# 'pds' - select 'Priority and Deadline based Skip list multiple queue CPU scheduler'
45# 'none' - select 'Completely Fair Scheduler'
46_projectc='pds'
47
48### Enable htmldocs (increases compile time)
49_htmldocs_enable=
50
51### Do not edit below this line unless you know what you're doing
52
53# pkgname=('linux-lqxcjk' 'linux-lqxcjk-headers' 'linux-lqxcjk-docs')
54_major=7.2
55_srcname=linux-${_major}
56_lqxpatchname=liquorix-package
57_lqxpatchrel=2
58_lqxpatchver=${_lqxpatchname}-${_major}-${_lqxpatchrel}
59pkgbase=linux-lqxcjk
60pkgver=7.2.2.lqx2
61pkgrel=1
62pkgdesc='Linux Liquorix (with cjktty patch)'
63url='https://liquorix.net/'
64arch=(x86_64)
65license=(GPL-2.0-only)
66makedepends=(
67 bc
68 cpio
69 gettext
70 git
71 libelf
72 pahole
73 perl
74 python
75 rust
76 rust-src
77 rust-bindgen
78 tar
79 xz
80 zstd
81)
82
83if [ -n "$_htmldocs_enable" ]; then
84 makedepends+=(
85 graphviz
86 imagemagick
87 python-sphinx
88 texlive-latexextra
89 xmlto
90 )
91fi
92
93options=(
94 !debug
95 !strip
96)
97#_lucjanpath="https://raw.githubusercontent.com/sirlucjan/kernel-patches/master/${_major}"
98_lucjanpath="https://gitlab.com/sirlucjan/kernel-patches/raw/master/${_major}"
99
100source=("https://cdn.kernel.org/pub/linux/kernel/v7.x/${_srcname}.tar.xz"
101 "https://cdn.kernel.org/pub/linux/kernel/v7.x/${_srcname}.tar.sign"
102 "https://github.com/damentz/${_lqxpatchname}/archive/${_major}-${_lqxpatchrel}.tar.gz"
103 "0001-cjktty.patch::https://github.com/bigshans/cjktty-patches/raw/master/v7.x/cjktty-7.2.patch"
104 "0002-cjktty-32.patch::https://github.com/bigshans/cjktty-patches/raw/master/cjktty-add-cjk32x32-font-data.patch")
105validpgpkeys=(
106 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
107 '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
108)
109sha512sums=('47e63679363261a864d271277340a6f2d45f544e1a056be4159df081f4f6537d0efa865c4af26611ab33a3079ee65db88ec2f6bc0e5fff43e0c043cde0cd91e1'
110 'SKIP'
111 '540efb9756fbe8717fc7712ed4f81d708fdefb32aeca7f25b97bc8272011cdaa4ab873346d585bf4b0cb917914bfc99e3d9777609d6c72446dcb828a8a095d92'
112 '770b55f7a84455f2c1b61837c2e4fcda77808f0b5a9614f8621991d6f7884c67225a268fa88dd8ce9908e55a2c8f20e605f64c05b5074854a39ec130e7e8d59d'
113 'c4a443b901030097623d191731a56c87cff2ba3422385d6d7b624387ffa4f659abde07c8360f07e099cd678f8c9b542d7199e3a05febc4c7deaba9e950012cb5')
114
115
116
117export KBUILD_BUILD_HOST=archlinux
118export KBUILD_BUILD_USER=$pkgbase
119export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
120
121prepare() {
122 cd $_srcname
123
124 ### Set package version variables
125 _abiname="$(cat ${srcdir}/${_lqxpatchver}/linux-liquorix/debian/config/defines | grep 'abiname:' | sed -r 's/abiname:\s*//')"
126 _minor="$(echo "$_abiname" | cut -f1 -d -)"
127 _patchrel="$(echo "$_abiname" | cut -f2 -d -)"
128
129 ### Add Liquorix patches
130 local _patchfolder="${srcdir}/${_lqxpatchver}/linux-liquorix/debian/patches"
131 grep -P '^(zen|lqx)/' "$_patchfolder/series" | while IFS= read -r line
132 do
133 echo "Patching sources with $line"
134 patch -Np1 -i "$_patchfolder/$line"
135 done
136
137 ### Setting version
138 echo "Setting version..."
139 echo "-$pkgrel" > localversion.10-pkgrel
140 echo "${pkgbase#linux}" > localversion.20-pkgname
141
142 ### Patching sources
143 for p in $(find ../../ -maxdepth 1 -name '*.patch' | sort); do
144 echo "Applying patch $p..."
145 patch -Np1 -i "$p"
146 done
147
148 ### Setting config
149 echo "Setting config..."
150 cat ${srcdir}/${_lqxpatchver}/linux-liquorix/debian/config/kernelarch-x86/config-arch-64 >./.config
151 make olddefconfig
152 diff -u ${srcdir}/${_lqxpatchver}/linux-liquorix/debian/config/kernelarch-x86/config-arch-64 .config || :
153
154 ### Prepared version
155 make -s kernelrelease > version
156 echo "Prepared $pkgbase version $(<version)"
157
158 ### Optionally use running kernel's config
159 # code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
160 if [ -n "$_use_current" ]; then
161 if [[ -s /proc/config.gz ]]; then
162 echo "Extracting config from /proc/config.gz..."
163 # modprobe configs
164 zcat /proc/config.gz > ./.config
165 else
166 warning "Your kernel was not compiled with IKCONFIG_PROC!"
167 warning "You cannot read the current config!"
168 warning "Aborting!"
169 exit
170 fi
171 fi
172
173 ### Selecting the CPU scheduler
174 if [ "$_projectc" = "bmq" ]; then
175 echo "Selecting BMQ CPU scheduler..."
176 scripts/config -e CONFIG_SCHED_BMQ
177 scripts/config -d CONFIG_SCHED_PDS
178 elif [ "$_projectc" = "pds" ]; then
179 echo "Selecting PDS CPU scheduler..."
180 scripts/config -d CONFIG_SCHED_BMQ
181 scripts/config -e CONFIG_SCHED_PDS
182 elif [ "$_projectc" = "none" ]; then
183 echo "Selecting Completely Fair Scheduler..."
184 scripts/config -d CONFIG_SCHED_ALT
185 else
186 if [ -n "$_projectc" ]; then
187 error "The value $_projectc is invalid. Choose the correct one again."
188 else
189 error "The value is empty. Choose the correct one again."
190 fi
191 error "Selecting the CPU scheduler failed!"
192 exit
193 fi
194
195 ### Optionally load needed modules for the make localmodconfig
196 # See https://aur.archlinux.org/packages/modprobed-db
197 if [ -n "$_localmodcfg" ]; then
198 if [ -f $HOME/.local/share/modprobed-db/modprobed.db ]; then
199 echo "Running Steven Rostedt's make localmodconfig now"
200 make LSMOD=$HOME/.local/share/modprobed-db/modprobed.db localmodconfig
201 else
202 echo "No modprobed.db data found"
203 exit
204 fi
205 fi
206
207 ## Use DWARF5 debug info for Arch
208 echo "Upgrading debug info from toolchain default to DWARF v5..."
209 scripts/config -e CONFIG_DEBUG_INFO_DWARF5
210
211 ## Use Arch Wiki TOMOYO configuration: https://wiki.archlinux.org/title/TOMOYO_Linux#Installation_2
212 echo "Replacing Debian TOMOYO configuration with upstream Arch Linux..."
213 scripts/config --set-str CONFIG_SECURITY_TOMOYO_POLICY_LOADER "/usr/bin/tomoyo-init"
214 scripts/config --set-str CONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER "/usr/lib/systemd/systemd"
215
216 ## Add landlock for pacman sandbox support
217 echo "Adding 'landlock' to CONFIG_LSM for pacman sandbox support"
218 scripts/config --set-str CONFIG_LSM "landlock,lockdown,yama,bpf"
219
220 ### Running make nconfig
221 [[ -z "$_makenconfig" ]] || make nconfig
222
223 ### Running make menuconfig
224 [[ -z "$_makemenuconfig" ]] || make menuconfig
225
226 ### Running make xconfig
227 [[ -z "$_makexconfig" ]] || make xconfig
228
229 ### Running make gconfig
230 [[ -z "$_makegconfig" ]] || make gconfig
231
232 ### Save configuration for later reuse
233 cat .config > "${startdir}/config.last"
234}
235
236build() {
237 cd $_srcname
238
239 make all
240 if [ -n "$_htmldocs_enable" ]; then
241 make htmldocs
242 fi
243 make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1
244}
245
246_package() {
247 pkgdesc="The $pkgdesc kernel and modules"
248 depends=(coreutils kmod initramfs)
249 optdepends=('wireless-regdb: to set the correct wireless channels of your country'
250 'linux-firmware: firmware images needed for some devices'
251 'sof-firmware: firmware images needed for Sound Open Firmware capable devices'
252 'modprobed-db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
253 provides=(KSMBD-MODULE NTSYNC-MODULE VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE VHBA-MODULE)
254 install=linux-lqx.install
255
256 cd $_srcname
257 local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
258
259 echo "Installing boot image..."
260 # systemd expects to find the kernel here to allow hibernation
261 # https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
262 install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
263
264 # Used by mkinitcpio to name the kernel
265 echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
266
267 echo "Installing modules..."
268 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
269 DEPMOD=/doesnt/exist modules_install # Suppress depmod
270
271 # remove build link
272 rm "$modulesdir"/build
273}
274
275_package-headers() {
276 pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
277 depends=("$pkgbase" 'pahole')
278 provides=(LINUX-HEADERS)
279
280 cd $_srcname
281 local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
282
283 echo "Installing build files..."
284 install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
285 localversion.* version vmlinux tools/bpf/bpftool/vmlinux.h
286 install -Dt "$builddir/kernel" -m644 kernel/Makefile
287 install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
288 cp -t "$builddir" -a scripts
289 ln -srt "$builddir" "$builddir/scripts/gdb/vmlinux-gdb.py"
290
291 # required when STACK_VALIDATION is enabled
292 install -Dt "$builddir/tools/objtool" tools/objtool/objtool
293
294 # required when DEBUG_INFO_BTF_MODULES is enabled
295 install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids \
296 || true
297
298 echo "Installing headers..."
299 cp -t "$builddir" -a include
300 cp -t "$builddir/arch/x86" -a arch/x86/include
301 install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
302
303 install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
304 install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
305
306 # https://bugs.archlinux.org/task/13146
307 install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
308
309 # https://bugs.archlinux.org/task/20402
310 install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
311 install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
312 install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
313
314 # https://bugs.archlinux.org/task/71392
315 install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
316
317 echo "Installing KConfig files..."
318 find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
319
320 echo "Installing Rust files... (if they exist)"
321 install -Dt "$builddir/rust" -m644 rust/*.rmeta || true
322 install -Dt "$builddir/rust" rust/*.so || true
323
324 echo "Installing unstripped VDSO..."
325 make INSTALL_MOD_PATH="$pkgdir/usr" vdso_install \
326 link= # Suppress build-id symlinks
327
328 echo "Removing unneeded architectures..."
329 local arch
330 for arch in "$builddir"/arch/*/; do
331 [[ $arch = */x86/ ]] && continue
332 echo "Removing $(basename "$arch")"
333 rm -r "$arch"
334 done
335
336 echo "Removing documentation..."
337 rm -r "$builddir/Documentation"
338
339 echo "Removing broken symlinks..."
340 find -L "$builddir" -type l -printf 'Removing %P\n' -delete
341
342 echo "Removing loose objects..."
343 find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
344
345 echo "Stripping build tools..."
346 local file
347 while read -rd '' file; do
348 case "$(file -Sib "$file")" in
349 application/x-sharedlib\;*) # Libraries (.so)
350 strip -v $STRIP_SHARED "$file" ;;
351 application/x-archive\;*) # Libraries (.a)
352 strip -v $STRIP_STATIC "$file" ;;
353 application/x-executable\;*) # Binaries
354 strip -v $STRIP_BINARIES "$file" ;;
355 application/x-pie-executable\;*) # Relocatable binaries
356 strip -v $STRIP_SHARED "$file" ;;
357 esac
358 done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
359
360 echo "Stripping vmlinux..."
361 strip -v $STRIP_STATIC "$builddir/vmlinux"
362
363 echo "Adding symlink..."
364 mkdir -p "$pkgdir/usr/src"
365 ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
366}
367
368_package-docs() {
369 pkgdesc="Documentation for the $pkgdesc kernel"
370 depends=("$pkgbase")
371
372 cd $_srcname
373 local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
374
375 echo "Installing documentation..."
376 local src dst
377 while read -rd '' src; do
378 dst="${src#Documentation/}"
379 dst="$builddir/Documentation/${dst#output/}"
380 install -Dm644 "$src" "$dst"
381 done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
382
383 echo "Adding symlink..."
384 mkdir -p "$pkgdir/usr/share/doc"
385 ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
386}
387
388pkgname=(
389 "$pkgbase"
390 "$pkgbase-headers"
391 "$pkgbase-docs"
392)
393for _p in "${pkgname[@]}"; do
394 eval "package_$_p() {
395 $(declare -f "_package${_p#$pkgbase}")
396 _package${_p#$pkgbase}
397 }"
398done
399
400# vim:set ts=8 sts=2 sw=2 et:
401

Scan history

Scanned at (UTC)SeverityRules
2026-09-02 19:51:22 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion