-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compatibility to package kernel-debs that use a localversion-X file #5166
base: main
Are you sure you want to change the base?
Conversation
…to handle localversion files correctly
Thanks @pddenhar -- looks good on first contact -- I will cherry pick this and do a few dozen kernels with this and let you know. |
Hello, I've tried a few kernels. Here's some feedback
I'm still not sure this is generally the best way forward, though. If we simply |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... review in #5166 (comment) above, sorry ...
Ah, I didn't realize
I do think this is a fair point, it would be nice to have package names that reflect whether a given kernel has RT patches applied. I will take a swing at only using |
That assumption is sane, yes. It might very well have worked on our ~63-ish kernels...! Unfortunately some of our legacy kernels are insane, and people are really attached to them.
We could actually create a |
Description
The current kernel.sh build system uses the
grab_version()
function in utils-compilation.sh to determine the version string of the kernel and locate the build artifacts aftermake
has completed.grab_version is a simple implementation that parses the makefile to guess the final kernel version, but if a userpatch has been applied to the kernel that includes a localversion-xx file (the PREEMPT_RT patch does this, for example), the returned value will be wrong (
grab_version
returns5.10.110
when the true value used to name the vmlinuz image is5.10.110-rt53-rockchip-rk3588
)Thank you to @rpardini on Discord for helping me identify a fix for this issue.
This patch switches kernel.sh to use the built in
make kernelrelease
command to return the kernel version, which takes into account any localversion-xx files in the kernel tree, as well as theLOCALVERSION=-${LINUXFAMILY}
value appended by the armbian kernel-make.sh code.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
Packaging fails at
kernel_package_callback_linux_image() --> lib/functions/compilation/kernel-debs.sh:213
which is
run_host_command_logged ls -la "${kernel_pre_package_path}" "${kernel_image_pre_package_path}"
This fails because
kernel_image_pre_package_path
is derived fromgrab_version
vmlinuz filenames are unchanged from current functionality and correctly located by kernel-debs.sh to be built into .deb files.
Output from
run_host_command_logged ls -la "${kernel_pre_package_path}" "${kernel_image_pre_package_path}"
:.deb creation is correct:
vmlinuz files are correctly named with both the localversion-xx file and the armbian localversion appended in kernel-make.sh.
Output from
run_host_command_logged ls -la "${kernel_pre_package_path}" "${kernel_image_pre_package_path}"
:.debs are created as expected:
Checklist: