Skip to content

Add fallback kernel version scraper

Kristian Klausen requested to merge github/fork/depau/master into master

Created by: depau

The kernel version scraper included in mkinitcpio works only on x86 kernel images.

This commit implements kernel version scraping on a generic architecture if an uncompressed image is provided.

With this commit I'm mainly targeting ALARM. However, since I wasn't able to find a static offset for the kernel version like on x86, I decided to go for a generic scraper that greps over the entire uncompressed image.

This is definitely inefficient, it takes ~300ms on my laptop with an NVMe SSD, 1.8s on my Rock64 with eMMC storage. However, it's better than nothing in my opinion, and people can still hardcode the kernel version in the preset just as before.

Merge request reports