Package Details: linux-clear-headers 6.13.9-1

Git Clone URL: https://aur.archlinux.org/linux-clear.git (read-only, click to copy)
Package Base: linux-clear
Description: Linux kernel with patches from Clear Linux which allow for higher performance. This package includes header files and scripts for building kernel modules.
Upstream URL: https://git.staropensource.de/JeremyStarTM/aur-linux-clear
Keywords: clear clearlinux intel kernel linux
Licenses: GPL-2.0-only
Submitter: metak
Maintainer: JeremyStarTM
Last Packager: JeremyStarTM
Votes: 74
Popularity: 0.50
First Submitted: 2018-01-18 21:47 (UTC)
Last Updated: 2025-04-04 21:08 (UTC)

Pinned Comments

JeremyStarTM commented on 2024-08-06 19:37 (UTC) (edited on 2025-02-03 12:44 (UTC) by JeremyStarTM)

Information comment
This comment provides useful information about this package. Make sure to read it through, you won't regret it.

Repository URL
This package is hosted at sos!git. If you want to contribute to the package, you can do it here: https://git.staropensource.de/JeremyStarTM/aur-linux-clear

Issue handling
Please only submit issues in the package's repository if they aren't bug reports about the package or help requests. Please keep them to the AUR only. This prevents unnecessary signups.

Updates
I usually publish updates 0-3 days after a kernel release, depending on how busy I am.
If I however get wind of security-relevant updates or any vulnerabilities I will try to update the kernel as soon as possible and write a comment about the vulnerability/update. So make sure to subscribe to this package's comment mailing list.

PKGBUILD environment variable customization
The PKGBUILD file supports customization via environment variables. Here's a list of all of them:
- _makemenuconfig: Invokes make menuconfig (ncurses-based default configuration menu) before compilation starts
- _makenconfig: Invokes make nconfig (ncurses-based nicer configuration menu) before compilation starts
- _makexconfig: Invokes make xconfig (X11-based GUI configuration menu) before compilation starts
- _use_current: Will use the configuration of the running kernel, if the running kernel is compiled with IKCONFIG_PROC
- _optimize_defconfig: Applies package maintainer-picked configuration changes to your defconfig. Only takes effect with _use_current being enabled
- _copyfinalconfig: Copies the final kernel configuration into the repository root as kconfig-new before compilation starts
- _localmodcfg: Only compiles modules found in modprobed-db's database (which decreases compilation time and kernel size)
- _use_llvm_lto: Compiles the kernel with LLVM instead of GCC. Should work, if not open an issue
- _subarch: Specifies the subarchitecture to compile for (see the PKGBUILD file for a list of all subarches). Default is 41/MGENERIC_CPU (Generic x86-64), which is compatible with all amd64 processors. Must be a number or subarch name
- _subarch_microarch: Specifies the microarchitecture to compile for. Only applies to and is required by the MGENERIC_CPU subarch. Must be a number between 1 and 4 (click for more information)
- _debug: Force enables debug options when set to y, force disables debug options when set to n or uses the config defaults when unset
- _show_compile: Enables verbose-er compilation output and displays all executing make targets. Enabled by default, unset for 'pv' output

All of these variables just need to be set for them to apply, except for _subarch and _debug. For more information please check their documentation inside the PKGBUILD file

GPG errors
If makepkg complains about invalid PGP keys, try running this command first: gpg --locate-keys torvalds@kernel.org gregkh@kernel.org sashal@kernel.org benh@debian.org. This command only needs to be executed once.

Build tool
If you want a dead simple way to compile this package, you can try out my build tool. It includes a few no nonsense changes to the kernel configuration and allows you to configure the PKGBUILD file in a simple manner and decrease build time. And if you don't want that, using makepkg as-is works fine too.

Latest Comments

« First ‹ Previous 1 .. 8 9 10 11 12 13 14 15 16 17 18 .. 52 Next › Last »

saltyming commented on 2022-03-31 08:21 (UTC) (edited on 2022-03-31 08:23 (UTC) by saltyming)

@metak I think you can just add a _no_debug option that disables debug configs.

What he wanted to say is that when we build the kernel using the arch kernel's config (by passing _use_current in the env booted with the arch kernel), debug configs are enabled whether _debug is passed or not (I guess).

rayzorben commented on 2022-03-30 21:27 (UTC)

@metak i'm honestly not sure. I was just thinking I want those debug flags off even if arch has them on, so I would like to just do _debug=n and have it turn those kernel flags off.

metak commented on 2022-03-30 18:18 (UTC) (edited on 2022-03-30 18:18 (UTC) by metak)

@rayzorben If I'm getting this right then I should just remove the debug option and just check in PKGBUILD file for resolve_btfids if the file exists & install it? (not native English speaker)

    # 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

rayzorben commented on 2022-03-30 16:53 (UTC)

@metak thanks for your work, having the options listed is very helpful. For somebody new coming to this project, it will be very beneficial.

Regarding _debug it looks like you check if it is set, and then enable the proper debug kernel flags. As far as I understand, the issue with btfids is because the default arch kernel has these on, and when we use _use_current it is pulling in those options even if they aren't enabled in clear. Because those are set, you need to run resolve_btfids.

I am thinking that this is one of those 'tradeoffs' of debug vs performance. I might want to disable these. If I pass _debug=n do you think you could disable these kernel flags instead of enabling them if it is set?

I know I could use _makenconfig to disable these, but then if I ever have to boot standard arch kernel and compile linux-clear I will likely forget and miss them again.

metak commented on 2022-03-27 13:59 (UTC)

@rayzorben resolve_btfids should be resolved with the latest update where I've added _debug option which enables some basic debug options.

Those are the default Clear linux boot parameters. I pasted it here for refference only, the kernel should boot just fine without any modifications. SERIAL_8250

metak commented on 2022-03-27 13:44 (UTC) (edited on 2022-04-02 13:20 (UTC) by metak)

The PKGBUILD file supports a few different configurable build-time options:
  • _makenconfig Tweak kernel options prior to a build via nconfig. Pseudo-graphical menu based on ncurses. 1 2
  • _localmodcfg Only compile active modules to VASTLY reduce the number of modules built and the build time.
  • Please read arch wiki page for detailed explanation on how to use it.
  • _subarch Enable additional optimization/tuning for kernel builds by adding more micro-architectures options. Default is Generic-x86-64 number 36 if nothing else is selected.
  • PKGBUILD file with the list of architectures
  • graysky kernel_compiler_patch
  • _use_current 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_llvm_lto Compile the kernel with LLVM/Clang.
  • _debug Enable y some additional debug features present in arch kernel, but not in Clear upstream. n to force disable or leave empty to ignore.
Lastly, build the kernel by setting your environment variable env _subarch=40 _localmodcfg=y.

rayzorben commented on 2022-03-27 04:57 (UTC) (edited on 2022-03-27 04:59 (UTC) by rayzorben)

I also had the resolve_btfids issue. I had it working, but when upgrading the kernel I forgot to modify the PKGBUILD and next thing you know, no dkms modules were installing.

Would be nice to have a _use_resolve_btfids option, or check for the correct kernel option if it is enabled and call it.

Also to note, what is the console=tty0 console=ttyS0,115200n8 line about? I had an issue with fstab, and nothing was being output during boot even with quiet removed. When I removed those I was able to see what it was outputting. This may make boot faster because its not dumping what it is doing to the screen but it made it a pain to debug.

metak commented on 2022-03-15 19:55 (UTC)

@rayzorben You should boot the default arch kernel, plug in all your devices so it loads appropriate modules and then create modprobe.db. It seems like something might be missing in your build and that's why bluetooth is not working? As for the options, I'll add some description in the future.

rayzorben commented on 2022-03-13 16:37 (UTC)

Would love to see some basic instructions pinned with what the options are. I discovered them through the PKGBUILD but still wasn't sure what to do with them.

That being said, I had a few trial and errors regardless. I felt like env _subarch=35 _localmodcfg=y _use_current=y would be the best combo while running my fully functioning system. However it seems that _localmodcfg for some reason is causing issues with bluetooth. Bluetooth was there, it could see devices, it said my mouse was connected, but it would not work. Rebuilding without _localmodcfg works though.