Skip to content

main/postmarketos-installkernel: new package

Alexey Min requested to merge installkernel-pmos into master

This script will be used to install postmarketOS mainline kernels.

problem

Mainline kernel packages that are using "make zinstall" are slightly broken because they end up using alpine's default installkernel script. And kernel gets installed into /boot/vmlinuz-postmarketos-qcom-... (with $_flavor). This later leads to problem when upgrading - newly generated boot.img will not receive newer vmlinuz file (long story).

solution

Custom installkernel script. /sbin/installkernel is invoked by kernel build system in response to make install / make zinstall. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/install.sh

minecrell: We should make a custom "installkernel-pmos" package imo, if we want the kernel somewhere else
like this https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/installkernel/installkernel -
    then you don't need to remove zinstall

Well, zinstall is the "official" way to install a kernel
like you install modules with modules_install
if you want to customize the location it gets installed to, you make a installkernel script
this is an official feature in mainline Linux:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/install.sh

TODO

  • demo of the functionality on one kernel package, so it can be built on CI (msm8974 kernel will do)
  • also convert other kernel packages that are using zinstall

[ ] maybe convert other mainline kernel packages (even those without zinstall) so they are all using the same template? - no, better to do later, this MR will be large enough already. We can continue with "cleanups" later, after these "fixes" are merged

Edited by Alexey Min

Merge request reports