mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 01:08:19 +00:00
uefi: Rename to uefi-capsule
Rename the plugin to make it clearer of the scope. Based on a patch from Mario Limonciello <mario.limonciello@dell.com>
This commit is contained in:
parent
364e2685ca
commit
ee2e2c3674
@ -18,7 +18,7 @@ cp -R ../../../!(build|dist) .
|
|||||||
popd
|
popd
|
||||||
chown nobody . -R
|
chown nobody . -R
|
||||||
|
|
||||||
# install and run TPM simulator necessary for plugins/uefi/uefi-self-test
|
# install and run TPM simulator necessary for plugins/uefi-capsule/uefi-self-test
|
||||||
pacman -Syu --noconfirm swtpm tpm2-tools
|
pacman -Syu --noconfirm swtpm tpm2-tools
|
||||||
swtpm socket --tpm2 --server port=2321 --ctrl type=tcp,port=2322 --flags not-need-init --tpmstate "dir=$PWD" &
|
swtpm socket --tpm2 --server port=2321 --ctrl type=tcp,port=2322 --flags not-need-init --tpmstate "dir=$PWD" &
|
||||||
trap "kill $!" EXIT
|
trap "kill $!" EXIT
|
||||||
|
@ -18,7 +18,7 @@ meson .. \
|
|||||||
-Dpolkit=false \
|
-Dpolkit=false \
|
||||||
-Dplugin_coreboot=false \
|
-Dplugin_coreboot=false \
|
||||||
-Dplugin_flashrom=false \
|
-Dplugin_flashrom=false \
|
||||||
-Dplugin_uefi=false \
|
-Dplugin_uefi_capsule=false \
|
||||||
-Dplugin_redfish=false \
|
-Dplugin_redfish=false \
|
||||||
-Dplugin_altos=false \
|
-Dplugin_altos=false \
|
||||||
-Dplugin_dell=false \
|
-Dplugin_dell=false \
|
||||||
|
@ -14,7 +14,7 @@ mkdir -p build
|
|||||||
cd build
|
cd build
|
||||||
meson .. \
|
meson .. \
|
||||||
--werror \
|
--werror \
|
||||||
-Dplugin_uefi=false \
|
-Dplugin_uefi_capsule=false \
|
||||||
-Dplugin_dell=false \
|
-Dplugin_dell=false \
|
||||||
-Dplugin_modem_manager=false \
|
-Dplugin_modem_manager=false \
|
||||||
-Dplugin_synaptics=true \
|
-Dplugin_synaptics=true \
|
||||||
|
@ -17,7 +17,7 @@ meson .. \
|
|||||||
--cross-file s390x_cross.txt \
|
--cross-file s390x_cross.txt \
|
||||||
--werror \
|
--werror \
|
||||||
-Dplugin_flashrom=false \
|
-Dplugin_flashrom=false \
|
||||||
-Dplugin_uefi=false \
|
-Dplugin_uefi_capsule=false \
|
||||||
-Dplugin_dell=false \
|
-Dplugin_dell=false \
|
||||||
-Dplugin_modem_manager=false \
|
-Dplugin_modem_manager=false \
|
||||||
-Dplugin_msr=false \
|
-Dplugin_msr=false \
|
||||||
|
@ -15,7 +15,7 @@ meson .. \
|
|||||||
-Dplugin_flashrom=true \
|
-Dplugin_flashrom=true \
|
||||||
-Dplugin_modem_manager=false \
|
-Dplugin_modem_manager=false \
|
||||||
-Dplugin_thunderbolt=true \
|
-Dplugin_thunderbolt=true \
|
||||||
-Dplugin_uefi=true \
|
-Dplugin_uefi_capsule=true \
|
||||||
-Dplugin_dell=true \
|
-Dplugin_dell=true \
|
||||||
-Dplugin_synaptics=true $@
|
-Dplugin_synaptics=true $@
|
||||||
ninja-build dist
|
ninja-build dist
|
||||||
|
@ -12,6 +12,12 @@ if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
|
|||||||
/etc/dbus-1/system.d/org.freedesktop.fwupd.conf 1.3.2~ -- "$@"
|
/etc/dbus-1/system.d/org.freedesktop.fwupd.conf 1.3.2~ -- "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
|
||||||
|
dpkg-maintscript-helper mv_conffile \
|
||||||
|
/etc/fwupd/uefi.conf /etc/fwupd/uefi_capsule.conf 1.5.5~ -- "$@"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
# Clean up from fwupdate->fwupd transition
|
# Clean up from fwupdate->fwupd transition
|
||||||
# This can be removed after bullseye and focal are released
|
# This can be removed after bullseye and focal are released
|
||||||
EFIDIR=$(dpkg-vendor --query vendor | awk '{ print tolower($$0) }')
|
EFIDIR=$(dpkg-vendor --query vendor | awk '{ print tolower($$0) }')
|
||||||
|
@ -38,9 +38,9 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (yes,$(shell pkg-config --exists efivar && echo yes))
|
ifeq (yes,$(shell pkg-config --exists efivar && echo yes))
|
||||||
CONFARGS += -Dplugin_uefi=true
|
CONFARGS += -Dplugin_uefi_capsule=true
|
||||||
else
|
else
|
||||||
CONFARGS += -Dplugin_uefi=false
|
CONFARGS += -Dplugin_uefi_capsule=false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(filter $(DEB_HOST_ARCH_CPU),i386 amd64),)
|
ifneq ($(filter $(DEB_HOST_ARCH_CPU),i386 amd64),)
|
||||||
|
@ -213,10 +213,10 @@ can be flashed using flashrom. It is probably not required on servers.
|
|||||||
%endif
|
%endif
|
||||||
-Dplugin_thunderbolt=true \
|
-Dplugin_thunderbolt=true \
|
||||||
%if 0%{?have_uefi}
|
%if 0%{?have_uefi}
|
||||||
-Dplugin_uefi=true \
|
-Dplugin_uefi_capsule=true \
|
||||||
-Dtpm=true \
|
-Dtpm=true \
|
||||||
%else
|
%else
|
||||||
-Dplugin_uefi=false \
|
-Dplugin_uefi_capsule=false \
|
||||||
-Dtpm=false \
|
-Dtpm=false \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?have_dell}
|
%if 0%{?have_dell}
|
||||||
@ -290,7 +290,7 @@ done
|
|||||||
%config(noreplace)%{_sysconfdir}/fwupd/daemon.conf
|
%config(noreplace)%{_sysconfdir}/fwupd/daemon.conf
|
||||||
%config(noreplace)%{_sysconfdir}/fwupd/upower.conf
|
%config(noreplace)%{_sysconfdir}/fwupd/upower.conf
|
||||||
%if 0%{?have_uefi}
|
%if 0%{?have_uefi}
|
||||||
%config(noreplace)%{_sysconfdir}/fwupd/uefi.conf
|
%config(noreplace)%{_sysconfdir}/fwupd/uefi_capsule.conf
|
||||||
%endif
|
%endif
|
||||||
%config(noreplace)%{_sysconfdir}/fwupd/redfish.conf
|
%config(noreplace)%{_sysconfdir}/fwupd/redfish.conf
|
||||||
%config(noreplace)%{_sysconfdir}/fwupd/thunderbolt.conf
|
%config(noreplace)%{_sysconfdir}/fwupd/thunderbolt.conf
|
||||||
@ -437,7 +437,7 @@ done
|
|||||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_tpm.so
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_tpm.so
|
||||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_tpm_eventlog.so
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_tpm_eventlog.so
|
||||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_bios.so
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_bios.so
|
||||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi.so
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi_capsule.so
|
||||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi_dbx.so
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi_dbx.so
|
||||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi_recovery.so
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi_recovery.so
|
||||||
%endif
|
%endif
|
||||||
|
@ -49,7 +49,7 @@ if get_option('systemd') and build_daemon
|
|||||||
con2.set('localstatedir', localstatedir)
|
con2.set('localstatedir', localstatedir)
|
||||||
con2.set('package_name', meson.project_name())
|
con2.set('package_name', meson.project_name())
|
||||||
rw_directories = []
|
rw_directories = []
|
||||||
if get_option('plugin_uefi')
|
if get_option('plugin_uefi_capsule')
|
||||||
rw_directories += ['-/boot/efi', '-/efi/EFI', '-/boot/EFI']
|
rw_directories += ['-/boot/efi', '-/efi/EFI', '-/boot/EFI']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ else
|
|||||||
tpm2tss = dependency('', required: false)
|
tpm2tss = dependency('', required: false)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if build_standalone and get_option('plugin_uefi')
|
if build_standalone and get_option('plugin_uefi_capsule')
|
||||||
cairo = dependency('cairo')
|
cairo = dependency('cairo')
|
||||||
fontconfig = cc.find_library('fontconfig')
|
fontconfig = cc.find_library('fontconfig')
|
||||||
freetype = cc.find_library('freetype')
|
freetype = cc.find_library('freetype')
|
||||||
@ -368,8 +368,8 @@ endif
|
|||||||
if build_standalone and get_option('plugin_dell')
|
if build_standalone and get_option('plugin_dell')
|
||||||
libsmbios_c = dependency('libsmbios_c', version : '>= 2.4.0')
|
libsmbios_c = dependency('libsmbios_c', version : '>= 2.4.0')
|
||||||
conf.set('HAVE_DELL', '1')
|
conf.set('HAVE_DELL', '1')
|
||||||
if not get_option('plugin_uefi')
|
if not get_option('plugin_uefi_capsule')
|
||||||
error('plugin_dell also needs plugin_uefi to work')
|
error('plugin_dell also needs plugin_uefi_capsule to work')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ option('plugin_emmc', type : 'boolean', value : true, description : 'enable eMMC
|
|||||||
option('plugin_synaptics', type: 'boolean', value: true, description : 'enable Synaptics MST hub support')
|
option('plugin_synaptics', type: 'boolean', value: true, description : 'enable Synaptics MST hub support')
|
||||||
option('plugin_thunderbolt', type : 'boolean', value : true, description : 'enable Thunderbolt support')
|
option('plugin_thunderbolt', type : 'boolean', value : true, description : 'enable Thunderbolt support')
|
||||||
option('plugin_redfish', type : 'boolean', value : true, description : 'enable Redfish support')
|
option('plugin_redfish', type : 'boolean', value : true, description : 'enable Redfish support')
|
||||||
option('plugin_uefi', type : 'boolean', value : true, description : 'enable UEFI support')
|
option('plugin_uefi_capsule', type : 'boolean', value : true, description : 'enable UEFI support')
|
||||||
option('plugin_nvme', type : 'boolean', value : true, description : 'enable NVMe support')
|
option('plugin_nvme', type : 'boolean', value : true, description : 'enable NVMe support')
|
||||||
option('plugin_modem_manager', type : 'boolean', value : false, description : 'enable ModemManager support')
|
option('plugin_modem_manager', type : 'boolean', value : false, description : 'enable ModemManager support')
|
||||||
option('plugin_msr', type : 'boolean', value : true, description : 'enable MSR support')
|
option('plugin_msr', type : 'boolean', value : true, description : 'enable MSR support')
|
||||||
|
@ -837,7 +837,7 @@ fu_plugin_init (FuPlugin *plugin)
|
|||||||
data->smi_obj->fake_smbios = TRUE;
|
data->smi_obj->fake_smbios = TRUE;
|
||||||
|
|
||||||
/* make sure that UEFI plugin is ready to receive devices */
|
/* make sure that UEFI plugin is ready to receive devices */
|
||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_AFTER, "uefi");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_AFTER, "uefi_capsule");
|
||||||
|
|
||||||
/* our TPM device is upgradable! */
|
/* our TPM device is upgradable! */
|
||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_BETTER_THAN, "tpm");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_BETTER_THAN, "tpm");
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "fu-hash.h"
|
#include "fu-hash.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
FuPlugin *plugin_uefi;
|
FuPlugin *plugin_uefi_capsule;
|
||||||
FuPlugin *plugin_dell;
|
FuPlugin *plugin_dell;
|
||||||
} FuTest;
|
} FuTest;
|
||||||
|
|
||||||
@ -60,10 +60,10 @@ fu_engine_plugin_device_register_cb (FuPlugin *plugin_dell,
|
|||||||
FuDevice *device,
|
FuDevice *device,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
FuPlugin *plugin_uefi = FU_PLUGIN (user_data);
|
FuPlugin *plugin_uefi_capsule = FU_PLUGIN (user_data);
|
||||||
g_autofree gchar *dbg = fu_device_to_string (device);
|
g_autofree gchar *dbg = fu_device_to_string (device);
|
||||||
g_debug ("registering device: %s", dbg);
|
g_debug ("registering device: %s", dbg);
|
||||||
fu_plugin_runner_device_register (plugin_uefi, device);
|
fu_plugin_runner_device_register (plugin_uefi_capsule, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -94,14 +94,14 @@ fu_plugin_dell_tpm_func (gconstpointer user_data)
|
|||||||
|
|
||||||
devices = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
|
devices = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
|
||||||
added_id =
|
added_id =
|
||||||
g_signal_connect (self->plugin_uefi, "device-added",
|
g_signal_connect (self->plugin_uefi_capsule, "device-added",
|
||||||
G_CALLBACK (_plugin_device_added_cb),
|
G_CALLBACK (_plugin_device_added_cb),
|
||||||
devices);
|
devices);
|
||||||
|
|
||||||
register_id =
|
register_id =
|
||||||
g_signal_connect (self->plugin_dell, "device-register",
|
g_signal_connect (self->plugin_dell, "device-register",
|
||||||
G_CALLBACK (fu_engine_plugin_device_register_cb),
|
G_CALLBACK (fu_engine_plugin_device_register_cb),
|
||||||
self->plugin_uefi);
|
self->plugin_uefi_capsule);
|
||||||
ret = fu_plugin_runner_coldplug (self->plugin_dell, &error);
|
ret = fu_plugin_runner_coldplug (self->plugin_dell, &error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_assert (ret);
|
g_assert (ret);
|
||||||
@ -144,7 +144,7 @@ fu_plugin_dell_tpm_func (gconstpointer user_data)
|
|||||||
g_assert_false (fu_device_has_flag (device_v12, FWUPD_DEVICE_FLAG_UPDATABLE));
|
g_assert_false (fu_device_has_flag (device_v12, FWUPD_DEVICE_FLAG_UPDATABLE));
|
||||||
|
|
||||||
/* try to unlock 2.0 */
|
/* try to unlock 2.0 */
|
||||||
ret = fu_plugin_runner_unlock (self->plugin_uefi, device_v20, &error);
|
ret = fu_plugin_runner_unlock (self->plugin_uefi_capsule, device_v20, &error);
|
||||||
g_assert_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED);
|
g_assert_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED);
|
||||||
g_assert_false (ret);
|
g_assert_false (ret);
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
@ -175,7 +175,7 @@ fu_plugin_dell_tpm_func (gconstpointer user_data)
|
|||||||
/* try to unlock 2.0 */
|
/* try to unlock 2.0 */
|
||||||
device_v20 = _find_device_by_name (devices, "TPM 2.0");
|
device_v20 = _find_device_by_name (devices, "TPM 2.0");
|
||||||
g_assert_nonnull (device_v20);
|
g_assert_nonnull (device_v20);
|
||||||
ret = fu_plugin_runner_unlock (self->plugin_uefi, device_v20, &error);
|
ret = fu_plugin_runner_unlock (self->plugin_uefi_capsule, device_v20, &error);
|
||||||
g_assert_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED);
|
g_assert_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED);
|
||||||
g_assert_false (ret);
|
g_assert_false (ret);
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
@ -207,7 +207,7 @@ fu_plugin_dell_tpm_func (gconstpointer user_data)
|
|||||||
g_assert_false (fu_device_has_flag (device_v20, FWUPD_DEVICE_FLAG_UPDATABLE));
|
g_assert_false (fu_device_has_flag (device_v20, FWUPD_DEVICE_FLAG_UPDATABLE));
|
||||||
|
|
||||||
/* try to unlock 2.0 */
|
/* try to unlock 2.0 */
|
||||||
ret = fu_plugin_runner_unlock (self->plugin_uefi, device_v20, &error);
|
ret = fu_plugin_runner_unlock (self->plugin_uefi_capsule, device_v20, &error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_assert (ret);
|
g_assert (ret);
|
||||||
|
|
||||||
@ -242,20 +242,20 @@ fu_plugin_dell_tpm_func (gconstpointer user_data)
|
|||||||
g_assert_false (fu_device_has_flag (device_v12, FWUPD_DEVICE_FLAG_UPDATABLE));
|
g_assert_false (fu_device_has_flag (device_v12, FWUPD_DEVICE_FLAG_UPDATABLE));
|
||||||
|
|
||||||
/* With one flash left we need an override */
|
/* With one flash left we need an override */
|
||||||
ret = fu_plugin_runner_update (self->plugin_uefi, device_v20, blob_fw,
|
ret = fu_plugin_runner_update (self->plugin_uefi_capsule, device_v20, blob_fw,
|
||||||
FWUPD_INSTALL_FLAG_NONE, &error);
|
FWUPD_INSTALL_FLAG_NONE, &error);
|
||||||
g_assert_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED);
|
g_assert_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED);
|
||||||
g_assert_false (ret);
|
g_assert_false (ret);
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
|
|
||||||
/* test override */
|
/* test override */
|
||||||
ret = fu_plugin_runner_update (self->plugin_uefi, device_v20, blob_fw,
|
ret = fu_plugin_runner_update (self->plugin_uefi_capsule, device_v20, blob_fw,
|
||||||
FWUPD_INSTALL_FLAG_FORCE, &error);
|
FWUPD_INSTALL_FLAG_FORCE, &error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_assert (ret);
|
g_assert (ret);
|
||||||
|
|
||||||
/* all */
|
/* all */
|
||||||
g_signal_handler_disconnect (self->plugin_uefi, added_id);
|
g_signal_handler_disconnect (self->plugin_uefi_capsule, added_id);
|
||||||
g_signal_handler_disconnect (self->plugin_dell, register_id);
|
g_signal_handler_disconnect (self->plugin_dell, register_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,13 +274,13 @@ fu_plugin_dell_dock_func (gconstpointer user_data)
|
|||||||
|
|
||||||
devices = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
|
devices = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
|
||||||
added_id =
|
added_id =
|
||||||
g_signal_connect (self->plugin_uefi, "device-added",
|
g_signal_connect (self->plugin_uefi_capsule, "device-added",
|
||||||
G_CALLBACK (_plugin_device_added_cb),
|
G_CALLBACK (_plugin_device_added_cb),
|
||||||
devices);
|
devices);
|
||||||
register_id =
|
register_id =
|
||||||
g_signal_connect (self->plugin_dell, "device-register",
|
g_signal_connect (self->plugin_dell, "device-register",
|
||||||
G_CALLBACK (fu_engine_plugin_device_register_cb),
|
G_CALLBACK (fu_engine_plugin_device_register_cb),
|
||||||
self->plugin_uefi);
|
self->plugin_uefi_capsule);
|
||||||
|
|
||||||
/* make sure bad device doesn't trigger this */
|
/* make sure bad device doesn't trigger this */
|
||||||
fu_plugin_dell_inject_fake_data (self->plugin_dell,
|
fu_plugin_dell_inject_fake_data (self->plugin_dell,
|
||||||
@ -465,7 +465,7 @@ fu_plugin_dell_dock_func (gconstpointer user_data)
|
|||||||
g_free (buf.record);
|
g_free (buf.record);
|
||||||
|
|
||||||
/* all */
|
/* all */
|
||||||
g_signal_handler_disconnect (self->plugin_uefi, added_id);
|
g_signal_handler_disconnect (self->plugin_uefi_capsule, added_id);
|
||||||
g_signal_handler_disconnect (self->plugin_dell, register_id);
|
g_signal_handler_disconnect (self->plugin_dell, register_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -477,14 +477,14 @@ fu_test_self_init (FuTest *self)
|
|||||||
g_autofree gchar *pluginfn_uefi = NULL;
|
g_autofree gchar *pluginfn_uefi = NULL;
|
||||||
g_autofree gchar *pluginfn_dell = NULL;
|
g_autofree gchar *pluginfn_dell = NULL;
|
||||||
|
|
||||||
self->plugin_uefi = fu_plugin_new ();
|
self->plugin_uefi_capsule = fu_plugin_new ();
|
||||||
pluginfn_uefi = g_build_filename (PLUGINBUILDDIR, "..", "uefi",
|
pluginfn_uefi = g_build_filename (PLUGINBUILDDIR, "..", "uefi-capsule",
|
||||||
"libfu_plugin_uefi." G_MODULE_SUFFIX,
|
"libfu_plugin_uefi_capsule." G_MODULE_SUFFIX,
|
||||||
NULL);
|
NULL);
|
||||||
ret = fu_plugin_open (self->plugin_uefi, pluginfn_uefi, &error);
|
ret = fu_plugin_open (self->plugin_uefi_capsule, pluginfn_uefi, &error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_assert (ret);
|
g_assert (ret);
|
||||||
ret = fu_plugin_runner_startup (self->plugin_uefi, &error);
|
ret = fu_plugin_runner_startup (self->plugin_uefi_capsule, &error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_assert (ret);
|
g_assert (ret);
|
||||||
|
|
||||||
@ -503,8 +503,8 @@ fu_test_self_init (FuTest *self)
|
|||||||
static void
|
static void
|
||||||
fu_test_self_free (FuTest *self)
|
fu_test_self_free (FuTest *self)
|
||||||
{
|
{
|
||||||
if (self->plugin_uefi != NULL)
|
if (self->plugin_uefi_capsule != NULL)
|
||||||
g_object_unref (self->plugin_uefi);
|
g_object_unref (self->plugin_uefi_capsule);
|
||||||
if (self->plugin_dell != NULL)
|
if (self->plugin_dell != NULL)
|
||||||
g_object_unref (self->plugin_dell);
|
g_object_unref (self->plugin_dell);
|
||||||
g_free (self);
|
g_free (self);
|
||||||
|
@ -1 +1 @@
|
|||||||
../uefi/tests/
|
../uefi-capsule/tests/
|
@ -119,9 +119,9 @@ endif
|
|||||||
subdir('synaptics-mst')
|
subdir('synaptics-mst')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('plugin_uefi')
|
if get_option('plugin_uefi_capsule')
|
||||||
subdir('bios')
|
subdir('bios')
|
||||||
subdir('uefi')
|
subdir('uefi-capsule')
|
||||||
subdir('uefi-recovery')
|
subdir('uefi-recovery')
|
||||||
subdir('uefi-dbx')
|
subdir('uefi-dbx')
|
||||||
endif
|
endif
|
||||||
|
@ -22,7 +22,7 @@ void
|
|||||||
fu_plugin_init (FuPlugin *plugin)
|
fu_plugin_init (FuPlugin *plugin)
|
||||||
{
|
{
|
||||||
fu_plugin_alloc_data (plugin, sizeof (FuPluginData));
|
fu_plugin_alloc_data (plugin, sizeof (FuPluginData));
|
||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_BEFORE, "uefi");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_BEFORE, "uefi_capsule");
|
||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_AFTER, "tpm");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_AFTER, "tpm");
|
||||||
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ void
|
|||||||
fu_plugin_device_registered (FuPlugin *plugin, FuDevice *device)
|
fu_plugin_device_registered (FuPlugin *plugin, FuDevice *device)
|
||||||
{
|
{
|
||||||
/* only care about UEFI devices from ESRT */
|
/* only care about UEFI devices from ESRT */
|
||||||
if (g_strcmp0 (fu_device_get_plugin (device), "uefi") == 0) {
|
if (g_strcmp0 (fu_device_get_plugin (device), "uefi_capsule") == 0) {
|
||||||
fu_plugin_device_registered_uefi (plugin, device);
|
fu_plugin_device_registered_uefi (plugin, device);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
UEFI Support
|
UEFI Capsule Support
|
||||||
============
|
====================
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
@ -9,7 +9,7 @@ defines the software interface between an OS and platform firmware.
|
|||||||
With the UpdateCapsule boot service it can be used to update system firmware.
|
With the UpdateCapsule boot service it can be used to update system firmware.
|
||||||
|
|
||||||
If you don't want or need this functionality you can use the
|
If you don't want or need this functionality you can use the
|
||||||
`-Dplugin_uefi=false` option.
|
`-Dplugin_uefi_capsule=false` option.
|
||||||
|
|
||||||
Firmware Format
|
Firmware Format
|
||||||
---------------
|
---------------
|
||||||
@ -55,7 +55,7 @@ Custom EFI System Partition
|
|||||||
|
|
||||||
Since version 1.1.0 fwupd will autodetect the ESP when it is mounted on
|
Since version 1.1.0 fwupd will autodetect the ESP when it is mounted on
|
||||||
`/boot/efi`, `/boot`, or `/efi`. A custom EFI system partition location can be
|
`/boot/efi`, `/boot`, or `/efi`. A custom EFI system partition location can be
|
||||||
used by modifying *OverrideESPMountPoint* in `/etc/fwupd/uefi.conf`.
|
used by modifying *OverrideESPMountPoint* in `/etc/fwupd/uefi_capsule.conf`.
|
||||||
|
|
||||||
Setting an invalid directory will disable the fwupd plugin.
|
Setting an invalid directory will disable the fwupd plugin.
|
||||||
|
|
@ -41,6 +41,7 @@ fu_plugin_init (FuPlugin *plugin)
|
|||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_METADATA_SOURCE, "tpm");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_METADATA_SOURCE, "tpm");
|
||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_METADATA_SOURCE, "tpm_eventlog");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_METADATA_SOURCE, "tpm_eventlog");
|
||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_METADATA_SOURCE, "dell");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_METADATA_SOURCE, "dell");
|
||||||
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_CONFLICTS, "uefi"); /* old name */
|
||||||
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +126,7 @@ fu_plugin_add_security_attrs (FuPlugin *plugin, FuSecurityAttrs *attrs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GBytes *
|
static GBytes *
|
||||||
fu_plugin_uefi_get_splash_data (guint width, guint height, GError **error)
|
fu_plugin_uefi_capsule_get_splash_data (guint width, guint height, GError **error)
|
||||||
{
|
{
|
||||||
const gchar * const *langs = g_get_language_names ();
|
const gchar * const *langs = g_get_language_names ();
|
||||||
const gchar *localedir = FWUPD_LOCALEDIR;
|
const gchar *localedir = FWUPD_LOCALEDIR;
|
||||||
@ -196,7 +197,7 @@ fu_plugin_uefi_get_splash_data (guint width, guint height, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static guint8
|
static guint8
|
||||||
fu_plugin_uefi_calc_checksum (const guint8 *buf, gsize sz)
|
fu_plugin_uefi_capsule_calc_checksum (const guint8 *buf, gsize sz)
|
||||||
{
|
{
|
||||||
guint8 csum = 0;
|
guint8 csum = 0;
|
||||||
for (gsize i = 0; i < sz; i++)
|
for (gsize i = 0; i < sz; i++)
|
||||||
@ -205,7 +206,7 @@ fu_plugin_uefi_calc_checksum (const guint8 *buf, gsize sz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_plugin_uefi_write_splash_data (FuPlugin *plugin,
|
fu_plugin_uefi_capsule_write_splash_data (FuPlugin *plugin,
|
||||||
FuDevice *device,
|
FuDevice *device,
|
||||||
GBytes *blob,
|
GBytes *blob,
|
||||||
GError **error)
|
GError **error)
|
||||||
@ -270,11 +271,11 @@ fu_plugin_uefi_write_splash_data (FuPlugin *plugin,
|
|||||||
fu_uefi_bgrt_get_height (data->bgrt);
|
fu_uefi_bgrt_get_height (data->bgrt);
|
||||||
|
|
||||||
/* header, payload and image has to add to zero */
|
/* header, payload and image has to add to zero */
|
||||||
csum += fu_plugin_uefi_calc_checksum ((guint8 *) &capsule_header,
|
csum += fu_plugin_uefi_capsule_calc_checksum ((guint8 *) &capsule_header,
|
||||||
sizeof(capsule_header));
|
sizeof(capsule_header));
|
||||||
csum += fu_plugin_uefi_calc_checksum ((guint8 *) &header,
|
csum += fu_plugin_uefi_capsule_calc_checksum ((guint8 *) &header,
|
||||||
sizeof(header));
|
sizeof(header));
|
||||||
csum += fu_plugin_uefi_calc_checksum (g_bytes_get_data (blob, NULL),
|
csum += fu_plugin_uefi_capsule_calc_checksum (g_bytes_get_data (blob, NULL),
|
||||||
g_bytes_get_size (blob));
|
g_bytes_get_size (blob));
|
||||||
header.checksum = 0x100 - csum;
|
header.checksum = 0x100 - csum;
|
||||||
|
|
||||||
@ -298,7 +299,7 @@ fu_plugin_uefi_write_splash_data (FuPlugin *plugin,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_plugin_uefi_update_splash (FuPlugin *plugin, FuDevice *device, GError **error)
|
fu_plugin_uefi_capsule_update_splash (FuPlugin *plugin, FuDevice *device, GError **error)
|
||||||
{
|
{
|
||||||
FuPluginData *data = fu_plugin_get_data (plugin);
|
FuPluginData *data = fu_plugin_get_data (plugin);
|
||||||
guint best_idx = G_MAXUINT;
|
guint best_idx = G_MAXUINT;
|
||||||
@ -369,14 +370,14 @@ fu_plugin_uefi_update_splash (FuPlugin *plugin, FuDevice *device, GError **error
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* get the raw data */
|
/* get the raw data */
|
||||||
image_bmp = fu_plugin_uefi_get_splash_data (sizes[best_idx].width,
|
image_bmp = fu_plugin_uefi_capsule_get_splash_data (sizes[best_idx].width,
|
||||||
sizes[best_idx].height,
|
sizes[best_idx].height,
|
||||||
error);
|
error);
|
||||||
if (image_bmp == NULL)
|
if (image_bmp == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* perform the upload */
|
/* perform the upload */
|
||||||
return fu_plugin_uefi_write_splash_data (plugin, device, image_bmp, error);
|
return fu_plugin_uefi_capsule_write_splash_data (plugin, device, image_bmp, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@ -413,7 +414,7 @@ fu_plugin_update (FuPlugin *plugin,
|
|||||||
|
|
||||||
/* perform the update */
|
/* perform the update */
|
||||||
fu_device_set_status (device, FWUPD_STATUS_SCHEDULING);
|
fu_device_set_status (device, FWUPD_STATUS_SCHEDULING);
|
||||||
if (!fu_plugin_uefi_update_splash (plugin, device, &error_splash)) {
|
if (!fu_plugin_uefi_capsule_update_splash (plugin, device, &error_splash)) {
|
||||||
g_debug ("failed to upload UEFI UX capsule text: %s",
|
g_debug ("failed to upload UEFI UX capsule text: %s",
|
||||||
error_splash->message);
|
error_splash->message);
|
||||||
}
|
}
|
||||||
@ -422,7 +423,7 @@ fu_plugin_update (FuPlugin *plugin,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_plugin_uefi_load_config (FuPlugin *plugin, FuDevice *device)
|
fu_plugin_uefi_capsule_load_config (FuPlugin *plugin, FuDevice *device)
|
||||||
{
|
{
|
||||||
gboolean disable_shim;
|
gboolean disable_shim;
|
||||||
gboolean fallback_removable_path;
|
gboolean fallback_removable_path;
|
||||||
@ -449,14 +450,14 @@ fu_plugin_uefi_load_config (FuPlugin *plugin, FuDevice *device)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_plugin_uefi_register_proxy_device (FuPlugin *plugin, FuDevice *device)
|
fu_plugin_uefi_capsule_register_proxy_device (FuPlugin *plugin, FuDevice *device)
|
||||||
{
|
{
|
||||||
FuPluginData *data = fu_plugin_get_data (plugin);
|
FuPluginData *data = fu_plugin_get_data (plugin);
|
||||||
g_autoptr(FuUefiDevice) dev = fu_uefi_device_new_from_dev (device);
|
g_autoptr(FuUefiDevice) dev = fu_uefi_device_new_from_dev (device);
|
||||||
g_autoptr(GError) error_local = NULL;
|
g_autoptr(GError) error_local = NULL;
|
||||||
|
|
||||||
/* load all configuration variables */
|
/* load all configuration variables */
|
||||||
fu_plugin_uefi_load_config (plugin, FU_DEVICE (dev));
|
fu_plugin_uefi_capsule_load_config (plugin, FU_DEVICE (dev));
|
||||||
if (data->esp == NULL)
|
if (data->esp == NULL)
|
||||||
data->esp = fu_common_get_esp_default (&error_local);
|
data->esp = fu_common_get_esp_default (&error_local);
|
||||||
if (data->esp == NULL) {
|
if (data->esp == NULL) {
|
||||||
@ -477,12 +478,12 @@ fu_plugin_device_registered (FuPlugin *plugin, FuDevice *device)
|
|||||||
g_warning ("cannot create proxy device as no GUID: %s", dbg);
|
g_warning ("cannot create proxy device as no GUID: %s", dbg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fu_plugin_uefi_register_proxy_device (plugin, device);
|
fu_plugin_uefi_capsule_register_proxy_device (plugin, device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const gchar *
|
static const gchar *
|
||||||
fu_plugin_uefi_uefi_type_to_string (FuUefiDeviceKind device_kind)
|
fu_plugin_uefi_capsule_uefi_type_to_string (FuUefiDeviceKind device_kind)
|
||||||
{
|
{
|
||||||
if (device_kind == FU_UEFI_DEVICE_KIND_UNKNOWN)
|
if (device_kind == FU_UEFI_DEVICE_KIND_UNKNOWN)
|
||||||
return "Unknown Firmware";
|
return "Unknown Firmware";
|
||||||
@ -498,19 +499,19 @@ fu_plugin_uefi_uefi_type_to_string (FuUefiDeviceKind device_kind)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
fu_plugin_uefi_get_name_for_type (FuPlugin *plugin, FuUefiDeviceKind device_kind)
|
fu_plugin_uefi_capsule_get_name_for_type (FuPlugin *plugin, FuUefiDeviceKind device_kind)
|
||||||
{
|
{
|
||||||
GString *display_name;
|
GString *display_name;
|
||||||
|
|
||||||
/* set Display Name prefix for capsules that are not PCI cards */
|
/* set Display Name prefix for capsules that are not PCI cards */
|
||||||
display_name = g_string_new (fu_plugin_uefi_uefi_type_to_string (device_kind));
|
display_name = g_string_new (fu_plugin_uefi_capsule_uefi_type_to_string (device_kind));
|
||||||
if (device_kind == FU_UEFI_DEVICE_KIND_DEVICE_FIRMWARE)
|
if (device_kind == FU_UEFI_DEVICE_KIND_DEVICE_FIRMWARE)
|
||||||
g_string_prepend (display_name, "UEFI ");
|
g_string_prepend (display_name, "UEFI ");
|
||||||
return g_string_free (display_name, FALSE);
|
return g_string_free (display_name, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_plugin_uefi_coldplug_device (FuPlugin *plugin, FuUefiDevice *dev, GError **error)
|
fu_plugin_uefi_capsule_coldplug_device (FuPlugin *plugin, FuUefiDevice *dev, GError **error)
|
||||||
{
|
{
|
||||||
FuUefiDeviceKind device_kind;
|
FuUefiDeviceKind device_kind;
|
||||||
|
|
||||||
@ -533,7 +534,7 @@ fu_plugin_uefi_coldplug_device (FuPlugin *plugin, FuUefiDevice *dev, GError **er
|
|||||||
device_kind = fu_uefi_device_get_kind (dev);
|
device_kind = fu_uefi_device_get_kind (dev);
|
||||||
if (fu_device_get_name (FU_DEVICE (dev)) == NULL) {
|
if (fu_device_get_name (FU_DEVICE (dev)) == NULL) {
|
||||||
g_autofree gchar *name = NULL;
|
g_autofree gchar *name = NULL;
|
||||||
name = fu_plugin_uefi_get_name_for_type (plugin, device_kind);
|
name = fu_plugin_uefi_capsule_get_name_for_type (plugin, device_kind);
|
||||||
if (name != NULL)
|
if (name != NULL)
|
||||||
fu_device_set_name (FU_DEVICE (dev), name);
|
fu_device_set_name (FU_DEVICE (dev), name);
|
||||||
if (device_kind != FU_UEFI_DEVICE_KIND_SYSTEM_FIRMWARE)
|
if (device_kind != FU_UEFI_DEVICE_KIND_SYSTEM_FIRMWARE)
|
||||||
@ -562,7 +563,7 @@ fu_plugin_uefi_coldplug_device (FuPlugin *plugin, FuUefiDevice *dev, GError **er
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_plugin_uefi_test_secure_boot (FuPlugin *plugin)
|
fu_plugin_uefi_capsule_test_secure_boot (FuPlugin *plugin)
|
||||||
{
|
{
|
||||||
const gchar *result_str = "Disabled";
|
const gchar *result_str = "Disabled";
|
||||||
if (fu_efivar_secure_boot_enabled ())
|
if (fu_efivar_secure_boot_enabled ())
|
||||||
@ -571,7 +572,7 @@ fu_plugin_uefi_test_secure_boot (FuPlugin *plugin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_plugin_uefi_smbios_enabled (FuPlugin *plugin, GError **error)
|
fu_plugin_uefi_capsule_smbios_enabled (FuPlugin *plugin, GError **error)
|
||||||
{
|
{
|
||||||
const guint8 *data;
|
const guint8 *data;
|
||||||
gsize sz;
|
gsize sz;
|
||||||
@ -629,7 +630,7 @@ fu_plugin_startup (FuPlugin *plugin, GError **error)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* check SMBIOS for 'UEFI Specification is supported' */
|
/* check SMBIOS for 'UEFI Specification is supported' */
|
||||||
if (!fu_plugin_uefi_smbios_enabled (plugin, &error_local)) {
|
if (!fu_plugin_uefi_capsule_smbios_enabled (plugin, &error_local)) {
|
||||||
g_autofree gchar *fw = fu_common_get_path (FU_PATH_KIND_SYSFSDIR_FW);
|
g_autofree gchar *fw = fu_common_get_path (FU_PATH_KIND_SYSFSDIR_FW);
|
||||||
g_autofree gchar *fn = g_build_filename (fw, "efi", NULL);
|
g_autofree gchar *fn = g_build_filename (fw, "efi", NULL);
|
||||||
if (g_file_test (fn, G_FILE_TEST_EXISTS)) {
|
if (g_file_test (fn, G_FILE_TEST_EXISTS)) {
|
||||||
@ -668,7 +669,7 @@ fu_plugin_startup (FuPlugin *plugin, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_plugin_uefi_ensure_efivarfs_rw (GError **error)
|
fu_plugin_uefi_capsule_ensure_efivarfs_rw (GError **error)
|
||||||
{
|
{
|
||||||
g_autofree gchar *sysfsfwdir = fu_common_get_path (FU_PATH_KIND_SYSFSDIR_FW);
|
g_autofree gchar *sysfsfwdir = fu_common_get_path (FU_PATH_KIND_SYSFSDIR_FW);
|
||||||
g_autofree gchar *sysfsefivardir = g_build_filename (sysfsfwdir, "efi", "efivars", NULL);
|
g_autofree gchar *sysfsefivardir = g_build_filename (sysfsfwdir, "efi", "efivars", NULL);
|
||||||
@ -779,7 +780,7 @@ fu_plugin_coldplug (FuPlugin *plugin, GError **error)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* make sure that efivarfs is rw */
|
/* make sure that efivarfs is rw */
|
||||||
if (!fu_plugin_uefi_ensure_efivarfs_rw (&error_efivarfs)) {
|
if (!fu_plugin_uefi_capsule_ensure_efivarfs_rw (&error_efivarfs)) {
|
||||||
fu_plugin_add_flag (plugin, FWUPD_PLUGIN_FLAG_EFIVAR_NOT_MOUNTED);
|
fu_plugin_add_flag (plugin, FWUPD_PLUGIN_FLAG_EFIVAR_NOT_MOUNTED);
|
||||||
fu_plugin_add_flag (plugin, FWUPD_PLUGIN_FLAG_CLEAR_UPDATABLE);
|
fu_plugin_add_flag (plugin, FWUPD_PLUGIN_FLAG_CLEAR_UPDATABLE);
|
||||||
fu_plugin_add_flag (plugin, FWUPD_PLUGIN_FLAG_USER_WARNING);
|
fu_plugin_add_flag (plugin, FWUPD_PLUGIN_FLAG_USER_WARNING);
|
||||||
@ -808,18 +809,18 @@ fu_plugin_coldplug (FuPlugin *plugin, GError **error)
|
|||||||
fu_device_set_quirks (FU_DEVICE (dev), fu_plugin_get_quirks (plugin));
|
fu_device_set_quirks (FU_DEVICE (dev), fu_plugin_get_quirks (plugin));
|
||||||
if (data->esp != NULL)
|
if (data->esp != NULL)
|
||||||
fu_uefi_device_set_esp (FU_UEFI_DEVICE (dev), data->esp);
|
fu_uefi_device_set_esp (FU_UEFI_DEVICE (dev), data->esp);
|
||||||
if (!fu_plugin_uefi_coldplug_device (plugin, dev, error))
|
if (!fu_plugin_uefi_capsule_coldplug_device (plugin, dev, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
fu_device_add_flag (FU_DEVICE (dev), FWUPD_DEVICE_FLAG_UPDATABLE);
|
fu_device_add_flag (FU_DEVICE (dev), FWUPD_DEVICE_FLAG_UPDATABLE);
|
||||||
fu_device_add_flag (FU_DEVICE (dev), FWUPD_DEVICE_FLAG_USABLE_DURING_UPDATE);
|
fu_device_add_flag (FU_DEVICE (dev), FWUPD_DEVICE_FLAG_USABLE_DURING_UPDATE);
|
||||||
|
|
||||||
/* load all configuration variables */
|
/* load all configuration variables */
|
||||||
fu_plugin_uefi_load_config (plugin, FU_DEVICE (dev));
|
fu_plugin_uefi_capsule_load_config (plugin, FU_DEVICE (dev));
|
||||||
fu_plugin_device_add (plugin, FU_DEVICE (dev));
|
fu_plugin_device_add (plugin, FU_DEVICE (dev));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for debugging problems later */
|
/* for debugging problems later */
|
||||||
fu_plugin_uefi_test_secure_boot (plugin);
|
fu_plugin_uefi_capsule_test_secure_boot (plugin);
|
||||||
if (!fu_uefi_bgrt_setup (data->bgrt, &error_local))
|
if (!fu_uefi_bgrt_setup (data->bgrt, &error_local))
|
||||||
g_debug ("BGRT setup failed: %s", error_local->message);
|
g_debug ("BGRT setup failed: %s", error_local->message);
|
||||||
str = fu_uefi_bgrt_get_supported (data->bgrt) ? "Enabled" : "Disabled";
|
str = fu_uefi_bgrt_get_supported (data->bgrt) ? "Enabled" : "Disabled";
|
@ -1,19 +1,19 @@
|
|||||||
subdir('efi')
|
subdir('efi')
|
||||||
|
|
||||||
cargs = ['-DG_LOG_DOMAIN="FuPluginUefi"']
|
cargs = ['-DG_LOG_DOMAIN="FuPluginUefiCapsule"']
|
||||||
|
|
||||||
efi_os_dir = get_option('efi_os_dir')
|
efi_os_dir = get_option('efi_os_dir')
|
||||||
if efi_os_dir != ''
|
if efi_os_dir != ''
|
||||||
cargs += '-DEFI_OS_DIR="' + efi_os_dir + '"'
|
cargs += '-DEFI_OS_DIR="' + efi_os_dir + '"'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install_data(['uefi.quirk'],
|
install_data(['uefi-capsule.quirk'],
|
||||||
install_dir: join_paths(datadir, 'fwupd', 'quirks.d'))
|
install_dir: join_paths(datadir, 'fwupd', 'quirks.d'))
|
||||||
|
|
||||||
shared_module('fu_plugin_uefi',
|
shared_module('fu_plugin_uefi_capsule',
|
||||||
fu_hash,
|
fu_hash,
|
||||||
sources : [
|
sources : [
|
||||||
'fu-plugin-uefi.c',
|
'fu-plugin-uefi-capsule.c',
|
||||||
'fu-uefi-bgrt.c',
|
'fu-uefi-bgrt.c',
|
||||||
'fu-ucs2.c',
|
'fu-ucs2.c',
|
||||||
'fu-uefi-bootmgr.c',
|
'fu-uefi-bootmgr.c',
|
||||||
@ -96,7 +96,7 @@ if get_option('man')
|
|||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install_data(['uefi.conf'],
|
install_data(['uefi_capsule.conf'],
|
||||||
install_dir: join_paths(sysconfdir, 'fwupd')
|
install_dir: join_paths(sysconfdir, 'fwupd')
|
||||||
)
|
)
|
||||||
|
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@ -15,7 +15,7 @@ void
|
|||||||
fu_plugin_init (FuPlugin *plugin)
|
fu_plugin_init (FuPlugin *plugin)
|
||||||
{
|
{
|
||||||
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_METADATA_SOURCE, "uefi");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_METADATA_SOURCE, "uefi_capsule");
|
||||||
fu_plugin_add_firmware_gtype (plugin, NULL, FU_TYPE_EFI_SIGNATURE_LIST);
|
fu_plugin_add_firmware_gtype (plugin, NULL, FU_TYPE_EFI_SIGNATURE_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ void
|
|||||||
fu_plugin_init (FuPlugin *plugin)
|
fu_plugin_init (FuPlugin *plugin)
|
||||||
{
|
{
|
||||||
/* make sure that UEFI plugin is ready to receive devices */
|
/* make sure that UEFI plugin is ready to receive devices */
|
||||||
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_AFTER, "uefi");
|
fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_AFTER, "uefi_capsule");
|
||||||
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@ data/remotes.d/lvfs-testing.metainfo.xml
|
|||||||
policy/org.freedesktop.fwupd.policy.in
|
policy/org.freedesktop.fwupd.policy.in
|
||||||
plugins/dfu/dfu-tool.c
|
plugins/dfu/dfu-tool.c
|
||||||
plugins/tpm-eventlog/fu-tpm-eventlog.c
|
plugins/tpm-eventlog/fu-tpm-eventlog.c
|
||||||
|
plugins/uefi-capsule/fu-plugin-uefi-capsule.c
|
||||||
|
plugins/uefi-capsule/fu-uefi-tool.c
|
||||||
plugins/uefi-dbx/fu-dbxtool.c
|
plugins/uefi-dbx/fu-dbxtool.c
|
||||||
plugins/uefi/fu-plugin-uefi.c
|
|
||||||
plugins/uefi/fu-uefi-tool.c
|
|
||||||
src/fu-agent.c
|
src/fu-agent.c
|
||||||
src/fu-debug.c
|
src/fu-debug.c
|
||||||
src/fu-engine-helper.c
|
src/fu-engine-helper.c
|
||||||
|
@ -5,7 +5,7 @@ i18n.gettext(meson.project_name(),
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
if get_option('plugin_uefi')
|
if get_option('plugin_uefi_capsule')
|
||||||
meson.add_install_script('make-images.sh', localedir, python3.path())
|
meson.add_install_script('make-images.sh', localedir, python3.path())
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -982,7 +982,7 @@ fu_engine_device_priority_func (gconstpointer user_data)
|
|||||||
fu_device_add_vendor_id (device3, "USB:FFFF");
|
fu_device_add_vendor_id (device3, "USB:FFFF");
|
||||||
fu_device_set_protocol (device3, "com.acme");
|
fu_device_set_protocol (device3, "com.acme");
|
||||||
fu_device_set_priority (device3, 0);
|
fu_device_set_priority (device3, 0);
|
||||||
fu_device_set_plugin (device3, "uefi");
|
fu_device_set_plugin (device3, "uefi_capsule");
|
||||||
fu_device_add_instance_id (device3, "GUID1");
|
fu_device_add_instance_id (device3, "GUID1");
|
||||||
fu_device_convert_instance_ids (device3);
|
fu_device_convert_instance_ids (device3);
|
||||||
fu_engine_add_device (engine, device3);
|
fu_engine_add_device (engine, device3);
|
||||||
@ -1019,7 +1019,7 @@ fu_engine_device_priority_func (gconstpointer user_data)
|
|||||||
fu_device_add_vendor_id (device5, "USB:FFFF");
|
fu_device_add_vendor_id (device5, "USB:FFFF");
|
||||||
fu_device_set_protocol (device5, "com.acme");
|
fu_device_set_protocol (device5, "com.acme");
|
||||||
fu_device_set_priority (device5, 0);
|
fu_device_set_priority (device5, 0);
|
||||||
fu_device_set_plugin (device5, "uefi");
|
fu_device_set_plugin (device5, "uefi_capsule");
|
||||||
fu_device_add_instance_id (device5, "GUID5");
|
fu_device_add_instance_id (device5, "GUID5");
|
||||||
fu_device_set_name (device5, "ABC");
|
fu_device_set_name (device5, "ABC");
|
||||||
fu_device_convert_instance_ids (device5);
|
fu_device_convert_instance_ids (device5);
|
||||||
|
Loading…
Reference in New Issue
Block a user