Unified Kernel Image
Packages
pacman -S binutils
Usage
Prepare commandline parameters (LVM on LUKS):
echo cryptdevice=UUID=$(blkid -s UUID -o value /dev/vda2):crypt_lvm root=/dev/mapper/vg0-lv_root resume=/dev/mapper/vg0-lv_swap rw quiet splash add_efi_memmap rootflags=subvol=@ > /etc/kernel/cmdline
Concatenate ucode and initramfs:
cat /boot/amd-ucode.img /boot/initramfs-linux.img > /boot/initramfs-ucode-linux.img
Unify kernel image:
objcopy \
--add-section .osrel="/usr/lib/os-release" --change-section-vma .osrel=0x20000 \
--add-section .cmdline="/etc/kernel/cmdline" --change-section-vma .cmdline=0x30000 \
--add-section .linux="/boot/vmlinuz-linux" --change-section-vma .linux=0x2000000 \
--add-section .initrd="/boot/initramfs-ucode-linux.img" --change-section-vma .initrd=0x3000000 \
"/usr/lib/systemd/boot/efi/linuxx64.efi.stub" "linux.efi"