Name: autosig-qemu-dtb Version: 0.1 Release: 4%{?dist} Summary: Dtb for qemu # This is the qemu licences. Don't know what the actual output file license really is License: GPLv2 and BSD and MIT and CC-BY BuildRequires: qemu-kvm autosig-u-boot # No dtbs in x86-land so it makes sense ExclusiveArch: aarch64 %description Create dtb for use with aarch64 qemu, in combination with autosig-u-boot firmware. %prep rm -rf %{name}-{%version} mkdir %{name}-{%version} %build # check if kvm exists, if it doesn't, the environment isn't suitable to dump # kvm dtbs, cbs is not kvm enabled, so it cannot generate dtbs that work with # kvm guest # [ -e "/dev/kvm" ] cd %{name}-{%version} export PATH=$PATH:/usr/libexec # qemu-kvm -smp 1 -machine virt,accel=kvm -m 4G -cpu max -bios /boot/u-boot.bin -machine dumpdtb=qemu-kvm.dtb qemu-kvm -smp 1 -machine virt,accel=tcg -m 4G -cpu max -bios /boot/u-boot.bin -machine dumpdtb=qemu-tcg.dtb %install cd %{name}-{%version} # install -Dm 0644 qemu-kvm.dtb %{buildroot}%{_datadir}/qemu/qemu-kvm.dtb install -Dm 0644 qemu-tcg.dtb %{buildroot}%{_datadir}/qemu/qemu-tcg.dtb %files # %{_datadir}/qemu/qemu-kvm.dtb %{_datadir}/qemu/qemu-tcg.dtb %changelog * Wed Mar 13 2023 Eric Curtin - Dump only tcg dtb * Wed Jan 11 2023 Eric Curtin - Install dtbs to /usr/share/qemu/ to be ostree compatible - Dump both tcg and kvm dtbs * Wed Aug 17 2022 Alexander Larsson - Initial version