-
Notifications
You must be signed in to change notification settings - Fork 7
UKI: Optimize kernel-to-initramfs mapping #403
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
Conversation
784461f
to
8c0f9ae
Compare
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.
LGTM
BootDir = "boot" | ||
EspDir = "boot/efi" | ||
DefaultGrubCfgPath = "grub2/grub.cfg" | ||
UkiKernelInfoJson = "uki-kernel-info.json" |
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.
some of these constants are only used in this file, unexport them ?
var ukiNamePattern = regexp.MustCompile(`^vmlinuz-(.+)\.efi$`) | ||
|
||
// UkiKernelInfo holds both command line arguments and initramfs name for a UKI kernel | ||
type UkiKernelInfo struct { |
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.
change to ukiKernelInfo as its only being used in this file, see my comment above.
This PR optimizes the UKI (Unified Kernel Image) build process by eliminating redundant calls to
getKernelToInitramfsMap()
and consolidating kernel information into a single, well-structured data format.In addition, resolved the comment of "Use GrubArgsToString to convert args list to a string."
Before:
After:
Checklist