In an effort to enable audio on a 2-in-1, I am trying to apply patches I’ve received to the Manjaro 5.12 kernel and build linux512-custom and linux512-custom-headers from that.
but I am utterly confused about the naming of things. I can build my packages and install them with pacman -U. However, at this point the standard 512 kernel and mine appear to be both installed, but they are not both available. In grub I see only a single 512 kernel named as the standard one, but that in fact from /proc/version appears to be my custom kernel… so where is the standard 512 and why my kernel does not get the -custom name?
I have clone an existing kernel, that is Manjaro 5.12.8 git clone https://gitlab.manjaro.org/packages/core/linux512.git and created a local branch to do development in.
I have given (in fact tried to give) the kernel a different name. Specifically, I have replace every instance of -MANJARO with -CUSTOM in PKGBUILD. Furthermore, I have edited pkgbase and pkgname into
I have introduced a couple extra patches, taken from Add GLK/Chuwi Hi10x support by plbossart · Pull Request #2962 · thesofproject/linux · GitHub where work is ongoing to support audio on a tablet. I am in a bit of trouble here, because the developers have a testing tree and flow that expect a debian/ubuntu target, and I have manjaro right now on it (since a rolling distro provides a better DE experience on a tablet). For this reasons I had to adapt the patches a bit, but they seem reasonable and I have checked that they do apply cleanly.
I have wondered whether I had to remove linux and linux-headers from the provides arrays of the packages expected to be built in PKGBUILD. All the \arch linux guides say that this is to be done for custom kernels, but I see no mention of it on the Manjaro forum. In the end I have not removed them.
I have run updpkgsums
I have built the kernel and headers packages using makepkg -s. Compilation and packages ended nicely (there was in fact a single warning from the headers packages saying that $srcdir was mentioned in the package or something like that… did not seem critical.
I have copied over the two packages to the target device and installed them there with pacman -U. They installed cleanly.
I have booted the target device and it boots.
However, the boot dir is a mess and the grub menus too…
I was expecting to find a vmlinuz-5.12-cll-x86_64 side to side with the standard vmlinuz-5.12-x86_64, an initramfs-5.12-cll-x86_64 side to side with the standard initramfs-5.12-x86_64 and a linux512-cll-x86_64.kver side to side with the standard linux512-cll-x86_64.kver. Furthermore, I was expecting grub to offer me the option to boot either linux512 or linux512-cll.
Conversely: i do not see any vmlinuz-5.12-cll-x86_64 or initramfs-5.12-cll-x86_64 (even if I do see linux512-cll-x86_64.kver. The vmlinuz-5.12-x86_64 is not anymore the kernel in the standard linux512 package (even if that appears to be installed alongside mine). In fact, it appears that my kernel has overwritten it. Similarly, initramfs-5.12-x86_64 is not anymore the initram corresponding to the standard kernel, as mine seems to have overwritten it. Finally, grub only offers me a single linux512 kernel.
So I have the following questions:
What should I do to make a linux512-cll and a linux512-cll-headers packages that can get installed in parallel with the standard linux512 and linux512-headers packages with the option to boot either linux512 or linux512-cll?
What should I have to do and how should I name things the day I’ll need to make a kernel (and kernel-headers package based on the kernel tree from https://github.com/plbossart/sound/tree/fix/glk-chuwi-Hi10x rather than using the Manjaro 512 kernel as a base?
How about the provides arrays mentioned at point 4? Is there any action required on them?
Is there anything like Debian Linux Kernel Handbook for Manjaro? Or even a much more synthetic wiki page. Instructions for kernel packaging on the forum, notwithstanding the excellent quality of some answers, tend to be a bit dispersive since every answer focuses just on the specific question being asked (so that bits must be collected from multiple answers) and actual instructions get interleaved with other comments and questions that are not always to the point…
@philm I would normally have called in CSCS or Linux-aarhus but as they’re on hiatus, do you know who to call in? (I’ve only ever compiled a kernel once and that was back on Ubuntu and didn’t have any of these problems)