-
Notifications
You must be signed in to change notification settings - Fork 146
Description
Problem
Since krunkit commit f16a009, krunkit uses plain libkrun instead of libkrun-efi and calls krun_set_firmware() to load the firmware at runtime. This means the firmware file edk2/KRUN_EFI.silent.fd must be present on disk at a well-known location.
However, libkrun's make install does not install this file. It only installs the library, headers, and pkg-config files. The firmware binary is built and present in the source tree at edk2/KRUN_EFI.silent.fd, but never copied to $PREFIX/share/.
This causes several issues:
- krunkit is broken when building from source. After
make && make installof both libkrun and krunkit, krunkit fails with:Error: can't find a firmware to load - Tools using krunkit will break if they need to pass
--firmware-pathexplicitly. The firmware must be available at the default search path for existing integrations to keep working. - Any client using
krun_set_firmware()(not just krunkit) needs the firmware file on disk, including libkrun's ownboot_efiexample.
Workaround
Manually install the firmware from the libkrun source tree:
sudo mkdir -p /usr/local/share/krunkit
sudo cp /path/to/libkrun/edk2/KRUN_EFI.silent.fd /usr/local/share/krunkit/Note: krunkit currently looks in $PREFIX/share/krunkit/, this should probably change to $PREFIX/share/libkrun/ since the firmware belongs to libkrun.
Proposed fix
Install the firmware file as part of make install, e.g.:
install -d $(DESTDIR)$(PREFIX)/share/libkrun
install -m 644 edk2/KRUN_EFI.silent.fd $(DESTDIR)$(PREFIX)/share/libkrun/krunkit would then need to update get_firmware_path() to look in share/libkrun/ instead of share/krunkit/.