OK, after some testing and extracting salient points from this post and the archived post referenced and the arch wiki turns out it’s quite easy to compile your kernel
- /etc/makepkg.conf
CFLAGS=“-march=native -O2 -pipe -fstack-protector-strong -fno-plt”
CXXFLAGS=“${CFLAGS}”
(though thats arch method setting cxx to cflags, manjaro duplicates the line)
- download the manjaro source
git clone Packages / Core / linux414 · GitLab
- test you can build it as it is
cd linux414
makepkg -Csri
couple of hours later, enter password and install it, reboot and test it works
- edit PKGBUILD
after the line “make prepare” add line with “make nconfig”
(if you start adding patches then need to also run updpkgsums)
make -Csri
(-C is important as makepkg fails if patches already applied)
set your kernel parameters in the menus when nconfig starts
exit and let system build
and there you go, custom kernel, in my case with preempt now enabled in 419 and jack audio now stable with 5ms latency at 96khz
footnote:
https://archived.forum.manjaro.org/t/how-to-compile-the-mainline-kernel-the-manjaro-way/51700/50
The archived manjaro article referenced with post by anon23612428 describes adding your own version suffix for having a new entry in grub which is well worth doing, I tried that first but them was getting errors because patches had already been applied causing makepkg to fail which threw me for a while… so yet to do it properly but just reading up on the myriad kernel options to get a more optimised kernel for next attempt.
(Funny, saw an article saying "Kernel 5.2 released with 500,000 new lines of code, theres plenty to… enjoy!.. , I thought, plenty to slow yer old computer down LOL, no but it is a stunning achievement to support so much stuff purely by enthusiasts for free eh! )