Make more plugins optional

This commit is contained in:
Richard Hughes 2021-11-27 18:43:38 +00:00
parent dc1d5de057
commit 02eac5c75f
10 changed files with 82 additions and 4 deletions

48
contrib/build-openbmc.sh Executable file
View File

@ -0,0 +1,48 @@
#!/bin/sh
meson ../ \
-Dbash_completion=false \
-Dcompat_cli=false \
-Dconsolekit=false \
-Ddocs=none \
-Delogind=false \
-Dfish_completion=false \
-Dfirmware-packager=false \
-Dgudev=false \
-Dgusb=false \
-Dhsi=false \
-Dintrospection=false \
-Dlibarchive=false \
-Dlogind=false \
-Dman=false \
-Dmetainfo=false \
-Doffline=false \
-Dplugin_acpi_phat=false \
-Dplugin_amt=false \
-Dplugin_bcm57xx=false \
-Dplugin_cfu=false \
-Dplugin_dell=false \
-Dplugin_emmc=false \
-Dplugin_ep963x=false \
-Dplugin_fastboot=false \
-Dplugin_logitech_bulkcontroller=false \
-Dplugin_nitrokey=false \
-Dplugin_nvme=false \
-Dplugin_parade_lspcon=false \
-Dplugin_pixart_rf=false \
-Dplugin_powerd=false \
-Dplugin_realtek_mst=false \
-Dplugin_redfish=false \
-Dplugin_synaptics_mst=false \
-Dplugin_synaptics_rmi=false \
-Dplugin_thunderbolt=false \
-Dplugin_tpm=false \
-Dplugin_uefi_capsule=false \
-Dplugin_upower=false \
-Dplugin_upower=false \
-Dpolkit=false \
-Dsqlite=false \
-Dtests=false \
-Dudevdir=/tmp \
-Dsystemd_root_prefix=/tmp \
$@

View File

@ -34,6 +34,10 @@ meson .. \
-Dplugin_parade_lspcon=false \
-Dplugin_realtek_mst=false \
-Dplugin_platform_integrity=false \
-Dplugin_bcm57xx=false \
-Dplugin_pixart_rf=false \
-Dplugin_cfu=false \
-Dplugin_ep963x=false \
-Dplugin_tpm=false \
-Dsystemd=false \
-Doffline=false \

View File

@ -416,7 +416,6 @@ done
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_ata.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_bcm57xx.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_ccgx.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_cfu.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_colorhug.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_cros_ec.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_cpu.so

View File

@ -14,12 +14,17 @@ option('gnutls', type: 'boolean', value : true, description : 'enable GnuTLS sup
option('sqlite', type: 'boolean', value : true, description : 'enable sqlite support')
option('lzma', type: 'boolean', value : false, description : 'enable LZMA support')
option('plugin_amt', type : 'boolean', value : true, description : 'enable Intel AMT support')
option('plugin_acpi_phat', type : 'boolean', value : true, description : 'enable ACPI PHAT support')
option('plugin_bcm57xx', type : 'boolean', value : true, description : 'enable BCM57xx support')
option('plugin_cfu', type : 'boolean', value : false, description : 'enable CFU support')
option('plugin_dell', type : 'boolean', value : true, description : 'enable Dell-specific support')
option('plugin_dummy', type : 'boolean', value : false, description : 'enable the dummy device')
option('plugin_emmc', type : 'boolean', value : true, description : 'enable eMMC support')
option('plugin_ep963x', type : 'boolean', value : true, description : 'enable EP963x support')
option('plugin_fastboot', type : 'boolean', value : true, description : 'enable Fastboot support')
option('plugin_logitech_bulkcontroller', type : 'boolean', value : true, description : 'enable Logitech bulk controller support')
option('plugin_parade_lspcon', type : 'boolean', value : true, description : 'enable Parade LSPCON support')
option('plugin_pixart_rf', type : 'boolean', value : true, description : 'enable PixartRF support')
option('plugin_realtek_mst', type : 'boolean', value : true, description : 'enable Realtek MST hub support')
option('plugin_synaptics_mst', type: 'boolean', value: true, description : 'enable Synaptics MST hub support')
option('plugin_synaptics_rmi', type: 'boolean', value: true, description : 'enable Synaptics RMI support')
@ -29,6 +34,7 @@ option('plugin_redfish', type : 'boolean', value : true, description : 'enable R
option('plugin_uefi_capsule', type : 'boolean', value : true, description : 'enable UEFI capsule support')
option('plugin_uefi_capsule_splash', type : 'boolean', value : true, description : 'enable UEFI capsule splash support')
option('plugin_uefi_pk', type : 'boolean', value : true, description : 'enable UEFI PK support')
option('plugin_nitrokey', type : 'boolean', value : true, description : 'enable Nitrokey 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_msr', type : 'boolean', value : true, description : 'enable MSR support')

View File

@ -1,4 +1,4 @@
if host_machine.system() == 'linux'
if get_option('plugin_acpi_phat') and host_machine.system() == 'linux'
cargs = ['-DG_LOG_DOMAIN="FuPluginAcpiPhat"']
shared_module('fu_plugin_acpi_phat',

View File

@ -1,3 +1,7 @@
if get_option('plugin_bcm57xx')
if not get_option('gudev')
error('gudev is required for plugin_bcm57xx')
endif
cargs = ['-DG_LOG_DOMAIN="FuPluginBcm57xx"']
install_data(['bcm57xx.quirk'],
@ -67,3 +71,4 @@ if get_option('tests')
)
test('bcm57xx-self-test', e, env : env)
endif
endif

View File

@ -1,3 +1,7 @@
if get_option('plugin_cfu')
if not get_option('gudev')
error('gudev is required for plugin_cfu')
endif
cargs = ['-DG_LOG_DOMAIN="FuPluginCfu"']
install_data([
@ -29,3 +33,4 @@ shared_module('fu_plugin_cfu',
plugin_deps,
],
)
endif

View File

@ -1,3 +1,7 @@
if get_option('plugin_ep963x')
if not get_option('gudev')
error('gudev is required for plugin_ep963x')
endif
cargs = ['-DG_LOG_DOMAIN="FuPluginEp963x"']
install_data([
@ -30,3 +34,4 @@ shared_module('fu_plugin_ep963x',
plugin_deps,
],
)
endif

View File

@ -1,3 +1,4 @@
if get_option('plugin_nitrokey')
cargs = ['-DG_LOG_DOMAIN="FuPluginNitrokey"']
install_data(['nitrokey.quirk'],
@ -53,3 +54,4 @@ if get_option('tests')
)
test('nitrokey-self-test', e) # added to installed-tests
endif
endif

View File

@ -1,4 +1,8 @@
if host_machine.system() == 'linux'
if get_option('plugin_pixart_rf') and host_machine.system() == 'linux'
if not get_option('gudev')
error('gudev is required for plugin_pixart_rf')
endif
cargs = ['-DG_LOG_DOMAIN="FuPluginPixartRf"']
install_data(['pixart-rf.quirk'],
@ -31,7 +35,6 @@ shared_module('fu_plugin_pixart_rf',
fwupdplugin,
],
)
endif
if get_option('tests')
install_data(['tests/pixart.builder.xml'],
@ -63,3 +66,4 @@ if get_option('tests')
)
test('pxi-self-test', e, env : env)
endif
endif