%define debug_package %{nil} Name: boot-rpi5-config Version: 0 Release: %autorelease Summary: Package that configures direct kernel boot on a Raspberry Pi 5 License: MIT Source0: config.txt Source1: 99-vc4.conf BuildRequires: efi-filesystem BuildRequires: efi-srpm-macros %if 0%{?rhel} && 0%{?rhel} < 10 Requires: bcm2712-firmware %endif Requires: kernel-16k Conflicts: edk2-rpi5 %description Simple package that installs the right files in the right places to allow a Raspberry Pi 5 to boot with kernel direct boot %prep %build %install mkdir -p %{buildroot}%{efi_esp_root} install -m 0600 %{SOURCE0} %{buildroot}%{efi_esp_root} mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d install %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d %post # Create cmdline.txt with grubby if [ ! -f %{efi_esp_root}/cmdline.txt ] then echo "root="$(grubby --info=$(grubby --default-kernel) | grep root= | cut -d"\"" -f 2) \ $(grubby --info=$(grubby --default-kernel) | grep args | cut -d"\"" -f 2) \ > %{efi_esp_root}/cmdline.txt fi # Copy the kernel and initramfs ver=$(grubby --info=$(grubby --default-kernel) | grep kernel=\" | cut -d"\"" -f 2 | cut -d"-" -f 2) rel=$(grubby --info=$(grubby --default-kernel) | grep kernel=\" | cut -d"\"" -f 2 | cut -d"-" -f 3) vmlinuz=/boot/vmlinuz-$ver-$rel initramfs=/boot/initramfs-$ver-$rel.img install $vmlinuz %{efi_esp_root}/vmlinuz install $initramfs %{efi_esp_root}/initramfs %files %config(noreplace) %{efi_esp_root}/config.txt %{_sysconfdir}/X11/xorg.conf.d/99-vc4.conf %changelog %autochangelog