Skip to content

functions: support "ARM zImage" compressed files

Luke Shumaker requested to merge lukeshu/mkinitcpio:lukeshu/better-kver into master

kver detection does not work on ARM32 zImage files... which are most of what you'll see these days. That is: It works on neither Arch Linux ARM's kernels nor Parabola's kernels. Both ALARM and Parabola work around this by having the .preset files say ALL_kver=%KERNVER% instead of /boot/vmlinuz-%PKGBASE%; and must then rely on a separate mechanism (not libalpm/scripts/mkinitcpio) to install the kernel to /boot.

So, implement decompressing ARM zImage files.

To do this, I first spent 6 commits cleaning up compressed-file handling to make the final addition of "ARM zImage" support as simple as it can be. I hope you'll find that it's an improvement to the quality of the code-base.

I've marked this as a draft because I have not added tests yet. However, I have manually tested it on several Parabola and ALARM kernels. But I figured the PR is big enough that I should go ahead and put it up for feedback.

Bill Auger helped a lot with understanding what was going wrong.

Cc: @yetist because this is reworking a lot of code you wrote

Edited by Luke Shumaker

Merge request reports