Issues with mainline kernel

Hello,

i played along with EndeavourOS and i want to ask you about the installation of mainline kernel. I started the installation with:

yay -Syu linux-mainline
or
yay linux-mainline

But both don’t work properly. The installation of the package “linux-mainline” starts without issues as it seems and crashes a while after.

[sandro@Endlich ~]$ yay -Syu linux-mainline
:: Synchronizing package databases…
core is up to date
extra is up to date
community is up to date
multilib is up to date
endeavouros is up to date
:: Starting full system upgrade…
there is nothing to do
:: Searching databases for updates…
:: Searching AUR for updates…
:: Checking for conflicts…
:: Checking for inner conflicts…
[Aur:1] linux-mainline-5.11rc3-1

1 linux-mainline (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 1
:: Deleting (1/1): /home/sandro/.cache/yay/linux-mainline
:: Downloaded PKGBUILD (1/1): linux-mainline
1 linux-mainline (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: (1/1) Parsing SRCINFO: linux-mainline
==> Making package: linux-mainline 5.11rc3-1 (Fr 15 Jan 2021 12:32:23 CET)
==> Retrieving sources…
→ Cloning linux-mainline git repo…
Cloning into bare repository ‘/home/sandro/.cache/yay/linux-mainline/linux-mainline’…
remote: Enumerating objects: 1113, done.
remote: Counting objects: 100% (1113/1113), done.
remote: Compressing objects: 100% (583/583), done.
remote: Total 7878415 (delta 719), reused 697 (delta 530), pack-reused 7877302
Receiving objects: 100% (7878415/7878415), 2.12 GiB | 4.75 MiB/s, done.
Resolving deltas: 100% (6451815/6451815), done.
→ Found config
==> Validating source files with sha256sums…
linux-mainline … Skipped
config … Passed
==> Making package: linux-mainline 5.11rc3-1 (Fr 15 Jan 2021 12:43:10 CET)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> Retrieving sources…
→ Updating linux-mainline git repo…
Fetching origin
→ Found config
==> Validating source files with sha256sums…
linux-mainline … Skipped
config … Passed
==> Removing existing $srcdir/ directory…
==> Extracting sources…
→ Creating working copy of linux-mainline git repo…
Cloning into ‘linux-mainline’…
done.
Updating files: 100% (71259/71259), done.
Switched to a new branch ‘makepkg’
==> Starting prepare()…
Setting version…
Setting config…
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
.config:2306:warning: symbol value ‘m’ invalid for MTD_NAND_ECC_SW_HAMMING

configuration written to .config

Prepared linux-mainline version 5.11.0-rc3-1-mainline
==> Sources are ready.
Looks good, right?
But after that, there is and endless process running, which shows following stuff:

CC arch/x86/kernel/head64.o
CC arch/x86/kernel/ebda.o
CC arch/x86/kernel/platform-quirks.o
LDS arch/x86/kernel/vmlinux.lds
CC arch/x86/kernel/process_64.o
CC arch/x86/kernel/signal.o
CC arch/x86/kernel/signal_compat.o
CC arch/x86/kernel/traps.o
CC arch/x86/kernel/idt.o
CC arch/x86/kernel/irq.o
CC arch/x86/kernel/irq_64.o
CC arch/x86/kernel/dumpstack_64.o
CC arch/x86/kernel/time.o
CC arch/x86/kernel/ioport.o
CC arch/x86/kernel/dumpstack.o
CC arch/x86/kernel/nmi.o
CC arch/x86/kernel/ldt.o
CC arch/x86/kernel/setup.o
CC arch/x86/kernel/x86_init.o
CC arch/x86/kernel/i8259.o
CC arch/x86/kernel/irqinit.o
CC arch/x86/kernel/jump_label.o
CC arch/x86/kernel/irq_work.o
CC arch/x86/kernel/probe_roms.o
CC arch/x86/kernel/sys_ia32.o
CC arch/x86/kernel/sys_x86_64.o
CC arch/x86/kernel/espfix_64.o
CC arch/x86/kernel/ksysfs.o

For how long should i run these commands? Is everything tidy with my installation or is it running wrong?

Thank you,
Endlich.

You are compiling from source which might take a while.

1 Like

But does it takes 24h or a few hours?

Depends entirely on the performance of your computer.
But it won’t take 24h unless you’re compiling on a Pentium 1 or similar :wink:

1 Like

It’s still running, …
Kernel compiling is working on all threads and cores, right?
I need a faster cpu. :smile:

How can you just compile on your systems, when it takes so much time? Haha

Edit /etc/makepkg.conf and make sure you set the MAKEFLAGS variable with the number of cores you have (e.g. -j16 or -j$(nproc) ) - otherwise it will default to -j1.

Compiling on one core might take a while…

Alternatively, there is at least one Unofficial User Repository which builds linux-mainlinemiffe’s repo comes to mind.

4 Likes

If you intend to compile kernels on a regular basis, it might also be good idea to remove modules/drivers that you don’t need. These are generic kernels which obviously come with a ton of drivers in order to support as much common hardware as possible.

But this goes perhaps too far for the moment being.
Follow jonathon’s advice :wink:

1 Like

I will do that, change from one to two cores.

EDIT: The .conf file has already -j2 as it’s standard value.

This is one of the first things I do for each Arch install.

2 Likes

if you only have 2 threads available on your CPU, that setting is correct. If you have more threads, you need to either adjust it to the correct number of threads, or let it do that automatically with

1 Like

You might want to speed up compression as well - same file, add in -T #. Read up on it first! There are other possibilites on different compressors - perhaps –threads=0 on ZSTD for example. The Arch wiki is your friend… sometimes talks too fast, but your friend.

I tried j$(nproc) and will let you know if this makes a difference in time.

But i got an error trying to compile Linux 4.14, 4.9 and 4.4

arch/x86/entry/entry_64.S: Assembler messages:
arch/x86/entry/entry_64.S:1642: Warning: no instruction mnemonic suffix given and no register operands; using default for `sysret'

A warning is not an error. Compilation will succeed.

(Also keep in mind these kernels are available precompiled: Unofficial repo for older LTS kernels)

I have to say, that it is weird.

I compiled the mainline kernel, everything went well no errors. But when it is finished i updated grub, then nothing happens, i restart the pc and there is no sign of mainline kernel in the boot menu.

What did i wrong?
I tried to put miffe’s mainline precompiled kernel but it get’s errors:

error: miffe: key "4A3417224EBB68E0C1F7FE7D18377D81313F5ABD" is unknown
:: Import PGP key 4A3417224EBB68E0C1F7FE7D18377D81313F5ABD? [Y/n] y
error: miffe: signature from "Mikael Eriksson <mikael_eriksson@miffe.org>" is unknown trust
error: failed to update miffe (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases
[endlich@pc ~]$ 

As it says at the top of the Unofficial user repository page:

So, you have to add and locally sign the package signing keys:

https://wiki.archlinux.org/index.php/Pacman/Package_signing#Adding_unofficial_keys

Ah i found out what i forgot to do

1 Like