Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
mkuki: Make Universal Kernel Image
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = usr/lib/modules/*/vmlinuz
Target = usr/lib/initcpio/*
Target = boot/*.img
Target = boot/vmlinuz-*
Target = usr/lib/systemd/boot/efi/linuxx64.efi.stub
Target = usr/share/systemd/bootctl/splash-arch.bmp
[Action]
Description = Updating Universal Kernel Image...
When = PostTransaction
Exec = /usr/bin/mkuki
NeedsTargets
#!/usr/bin/sh
cat /boot/intel-ucode.img /boot/initramfs-linux.img > /boot/initramfs-linux-merged.img
objcopy \
--add-section .osrel="/usr/lib/os-release" --change-section-vma .osrel=0x20000 \
--add-section .cmdline="/etc/cmdline.conf" --change-section-vma .cmdline=0x30000 \
--add-section .splash="/usr/share/systemd/bootctl/splash-arch.bmp" --change-section-vma .splash=0x40000 \
--add-section .linux="/boot/vmlinuz-linux" --change-section-vma .linux=0x2000000 \
--add-section .initrd="/boot/initramfs-linux-merged.img" --change-section-vma .initrd=0x3000000 \
"/usr/lib/systemd/boot/efi/linuxx64.efi.stub" "/efi/EFI/Linux/linux.efi"
cat /boot/intel-ucode.img /boot/initramfs-linux-fallback.img > /boot/initramfs-linux-fallback-merged.img
objcopy \
--add-section .osrel="/usr/lib/os-release" --change-section-vma .osrel=0x20000 \
--add-section .cmdline="/etc/cmdline.conf" --change-section-vma .cmdline=0x30000 \
--add-section .splash="/usr/share/systemd/bootctl/splash-arch.bmp" --change-section-vma .splash=0x40000 \
--add-section .linux="/boot/vmlinuz-linux" --change-section-vma .linux=0x2000000 \
--add-section .initrd="/boot/initramfs-linux-fallback-merged.img" --change-section-vma .initrd=0x3000000 \
"/usr/lib/systemd/boot/efi/linuxx64.efi.stub" "/efi/EFI/Linux/linux-fallback.efi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment