diff options
3 files changed, 121 insertions, 92 deletions
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd/0001-build-certs.py-use-usr-bin-env-for-python3.patch b/meta-oe/recipes-bsp/fwupd/fwupd/0001-build-certs.py-use-usr-bin-env-for-python3.patch new file mode 100644 index 0000000000..3a4ecb1f29 --- /dev/null +++ b/meta-oe/recipes-bsp/fwupd/fwupd/0001-build-certs.py-use-usr-bin-env-for-python3.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From 2c3896878ba8118b48c55528c6bac98f05f223f3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 3 | Date: Thu, 3 Jul 2025 13:34:21 +0000 | ||
| 4 | Subject: [PATCH] build-certs.py: use /usr/bin/env for python3 | ||
| 5 | |||
| 6 | Avoids errors if python3 install path is not | ||
| 7 | in /usr/bin. | ||
| 8 | |||
| 9 | Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 10 | --- | ||
| 11 | data/tests/build-certs.py | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | Upstream-Status: Submitted [https://github.com/fwupd/fwupd/pull/8998] | ||
| 15 | |||
| 16 | diff --git a/data/tests/build-certs.py b/data/tests/build-certs.py | ||
| 17 | index 3b8503b72bcf..222e8a4a0f8b 100755 | ||
| 18 | --- a/data/tests/build-certs.py | ||
| 19 | +++ b/data/tests/build-certs.py | ||
| 20 | @@ -1,4 +1,4 @@ | ||
| 21 | -#!/usr/bin/python3 | ||
| 22 | +#!/usr/bin/env python3 | ||
| 23 | # SPDX-License-Identifier: LGPL-2.1+ | ||
| 24 | |||
| 25 | import os | ||
| 26 | -- | ||
| 27 | 2.43.0 | ||
| 28 | |||
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd/0001-fu-lzma-common.c-reduce-lzma-compression-level-from-.patch b/meta-oe/recipes-bsp/fwupd/fwupd/0001-fu-lzma-common.c-reduce-lzma-compression-level-from-.patch new file mode 100644 index 0000000000..b0d3863eaa --- /dev/null +++ b/meta-oe/recipes-bsp/fwupd/fwupd/0001-fu-lzma-common.c-reduce-lzma-compression-level-from-.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From c96668ab830d016eeff977d5ca4f99d288cf38c0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 3 | Date: Tue, 8 Jul 2025 07:05:02 +0000 | ||
| 4 | Subject: [PATCH] fu-lzma-common.c: reduce lzma compression level from 9 to | ||
| 5 | default 6 | ||
| 6 | |||
| 7 | xz manual page says default is 6 and levels higher than that can cause | ||
| 8 | huge CPU and memory usage. On yocto qemu target, the fwupd tests | ||
| 9 | fail to run with compression level 9: | ||
| 10 | |||
| 11 | FuSelfTest:ERROR:../sources/fwupd-2.0.12/libfwupdplugin/fu-self-test.c:6342:fu_lzma_func: assertion failed (error == NULL): failed to set up LZMA encoder rc=5 (FwupdError, 10) | ||
| 12 | not ok /fwupd/lzma - FuSelfTest:ERROR:../sources/fwupd-2.0.12/libfwupdplugin/fu-self-test.c:6342:fu_lzma_func: assertion failed (error == NULL): failed to set up LZMA encoder rc=5 (FwupdError, 10) | ||
| 13 | |||
| 14 | With default compression level 6 the tests pass. | ||
| 15 | |||
| 16 | https://linux.die.net/man/1/xz | ||
| 17 | |||
| 18 | -6 ... -9 | ||
| 19 | Excellent compression with medium to high memory usage. | ||
| 20 | These are also slower than the lower preset levels. | ||
| 21 | The default is -6. Unless you want to maximize the compression ratio, | ||
| 22 | you probably don't want a higher preset level than -7 due to | ||
| 23 | speed and memory usage. | ||
| 24 | |||
| 25 | Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 26 | --- | ||
| 27 | libfwupdplugin/fu-lzma-common.c | 2 +- | ||
| 28 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 29 | |||
| 30 | Upstream-Status: Submitted [https://github.com/fwupd/fwupd/pull/9019] | ||
| 31 | |||
| 32 | diff --git a/libfwupdplugin/fu-lzma-common.c b/libfwupdplugin/fu-lzma-common.c | ||
| 33 | index a64ec773da91..d381ed52e135 100644 | ||
| 34 | --- a/libfwupdplugin/fu-lzma-common.c | ||
| 35 | +++ b/libfwupdplugin/fu-lzma-common.c | ||
| 36 | @@ -89,7 +89,7 @@ fu_lzma_compress_bytes(GBytes *blob, GError **error) | ||
| 37 | strm.next_in = g_bytes_get_data(blob, NULL); | ||
| 38 | strm.avail_in = g_bytes_get_size(blob); | ||
| 39 | |||
| 40 | - rc = lzma_easy_encoder(&strm, 9, LZMA_CHECK_CRC64); | ||
| 41 | + rc = lzma_easy_encoder(&strm, 6, LZMA_CHECK_CRC64); | ||
| 42 | if (rc != LZMA_OK) { | ||
| 43 | lzma_end(&strm); | ||
| 44 | g_set_error(error, | ||
| 45 | -- | ||
| 46 | 2.43.0 | ||
| 47 | |||
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd_2.0.12.bb b/meta-oe/recipes-bsp/fwupd/fwupd_2.0.12.bb index 52d80be05b..ce21ad42fe 100644 --- a/meta-oe/recipes-bsp/fwupd/fwupd_2.0.12.bb +++ b/meta-oe/recipes-bsp/fwupd/fwupd_2.0.12.bb | |||
| @@ -2,11 +2,26 @@ SUMMARY = "A simple daemon to allow session software to update firmware" | |||
| 2 | LICENSE = "LGPL-2.1-or-later" | 2 | LICENSE = "LGPL-2.1-or-later" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
| 4 | 4 | ||
| 5 | DEPENDS = "glib-2.0 libxmlb json-glib libjcat gcab vala-native python3-jinja2-native" | 5 | DEPENDS = "\ |
| 6 | curl \ | ||
| 7 | gcab \ | ||
| 8 | glib-2.0 \ | ||
| 9 | json-glib \ | ||
| 10 | hwdata \ | ||
| 11 | libjcat \ | ||
| 12 | libusb \ | ||
| 13 | libxmlb \ | ||
| 14 | python3-jinja2-native \ | ||
| 15 | vala-native \ | ||
| 16 | " | ||
| 6 | 17 | ||
| 7 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ | 18 | SRC_URI = "\ |
| 8 | file://run-ptest" | 19 | https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ |
| 9 | SRC_URI[sha256sum] = "a69de9a494a364095cc820faa10a68ec38d31f55eed5388322182048b81d10b3" | 20 | file://0001-build-certs.py-use-usr-bin-env-for-python3.patch \ |
| 21 | file://0001-fu-lzma-common.c-reduce-lzma-compression-level-from-.patch \ | ||
| 22 | file://run-ptest \ | ||
| 23 | " | ||
| 24 | SRC_URI[sha256sum] = "83eab17ef2e65249491aef5e99419827b43ac56d40c5b0747b59ee94b147215e" | ||
| 10 | 25 | ||
| 11 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" | 26 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" |
| 12 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" | 27 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" |
| @@ -22,113 +37,52 @@ GIDOCGEN_MESON_DISABLE_FLAG = 'disabled' | |||
| 22 | GIR_MESON_ENABLE_FLAG = 'enabled' | 37 | GIR_MESON_ENABLE_FLAG = 'enabled' |
| 23 | GIR_MESON_DISABLE_FLAG = 'disabled' | 38 | GIR_MESON_DISABLE_FLAG = 'disabled' |
| 24 | 39 | ||
| 25 | PACKAGECONFIG ??= "curl gnutls gudev gusb \ | 40 | PACKAGECONFIG ??= "\ |
| 26 | ${@bb.utils.filter('DISTRO_FEATURES', 'bluetooth polkit', d)} \ | 41 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ |
| 27 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd offline', '', d)} \ | 42 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ |
| 28 | ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'plugin_uefi_capsule plugin_uefi_pk', '', d)} \ | 43 | ${@bb.utils.filter('DISTRO_FEATURES', 'bluetooth polkit', d)} \ |
| 29 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ | 44 | gnutls \ |
| 30 | hsi \ | 45 | hsi \ |
| 31 | plugin_android_boot \ | 46 | plugin_flashrom \ |
| 32 | plugin_acpi_phat \ | 47 | plugin_modem_manager \ |
| 33 | plugin_bcm57xx \ | 48 | protobuf \ |
| 34 | plugin_emmc \ | 49 | " |
| 35 | plugin_ep963x \ | ||
| 36 | plugin_fastboot \ | ||
| 37 | plugin_flashrom \ | ||
| 38 | plugin_gpio \ | ||
| 39 | plugin_igsc \ | ||
| 40 | plugin_intel_me \ | ||
| 41 | plugin_intel_spi \ | ||
| 42 | plugin_logitech_bulkcontroller \ | ||
| 43 | plugin_logitech_scribe \ | ||
| 44 | plugin_modem_manager \ | ||
| 45 | plugin_msr \ | ||
| 46 | plugin_nitrokey \ | ||
| 47 | plugin_nvme \ | ||
| 48 | plugin_parade_lspcon \ | ||
| 49 | plugin_pixart_rf \ | ||
| 50 | plugin_realtek_mst \ | ||
| 51 | plugin_redfish \ | ||
| 52 | plugin_synaptics_mst \ | ||
| 53 | plugin_synaptics_rmi \ | ||
| 54 | plugin_scsi \ | ||
| 55 | plugin_uf2 \ | ||
| 56 | plugin_upower \ | ||
| 57 | sqlite" | ||
| 58 | 50 | ||
| 59 | PACKAGECONFIG[bluetooth] = "-Dbluez=enabled,-Dbluez=disabled" | 51 | PACKAGECONFIG[bluetooth] = "-Dbluez=enabled,-Dbluez=disabled" |
| 60 | PACKAGECONFIG[compat-cli] = "-Dcompat_cli=true,-Dcompat_cli=false" | ||
| 61 | PACKAGECONFIG[consolekit] = "-Dconsolekit=enabled,-Dconsolekit=disabled,consolekit" | ||
| 62 | PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl" | ||
| 63 | PACKAGECONFIG[firmware-packager] = "-Dfirmware-packager=true,-Dfirmware-packager=false" | 52 | PACKAGECONFIG[firmware-packager] = "-Dfirmware-packager=true,-Dfirmware-packager=false" |
| 64 | PACKAGECONFIG[fish-completion] = "-Dfish_completion=true,-Dfish_completion=false" | 53 | PACKAGECONFIG[fish-completion] = "-Dfish_completion=true,-Dfish_completion=false" |
| 65 | PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" | 54 | PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" |
| 66 | PACKAGECONFIG[gudev] = "-Dgudev=enabled,-Dgudev=disabled,libgudev" | ||
| 67 | PACKAGECONFIG[gusb] = "-Dgusb=enabled,-Dgusb=disabled,libgusb" | ||
| 68 | PACKAGECONFIG[hsi] = "-Dhsi=enabled,-Dhsi=disabled" | 55 | PACKAGECONFIG[hsi] = "-Dhsi=enabled,-Dhsi=disabled" |
| 69 | PACKAGECONFIG[libarchive] = "-Dlibarchive=enabled,-Dlibarchive=disabled,libarchive" | 56 | PACKAGECONFIG[libarchive] = "-Dlibarchive=enabled,-Dlibarchive=disabled,libarchive" |
| 57 | PACKAGECONFIG[libdrm] = "-Dlibdrm=enabled,-Dlibdrm=disabled,libdrm" | ||
| 70 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false" | 58 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false" |
| 71 | PACKAGECONFIG[metainfo] = "-Dmetainfo=true,-Dmetainfo=false" | 59 | PACKAGECONFIG[metainfo] = "-Dmetainfo=true,-Dmetainfo=false" |
| 72 | PACKAGECONFIG[offline] = "-Doffline=enabled,-Doffline=disabled" | ||
| 73 | PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit" | 60 | PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit" |
| 74 | PACKAGECONFIG[sqlite] = "-Dsqlite=enabled,-Dsqlite=disabled,sqlite3" | 61 | PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline" |
| 75 | PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" | 62 | PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" |
| 76 | PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,gcab-native" | 63 | PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,gcab-native" |
| 77 | 64 | ||
| 78 | |||
| 79 | # TODO plugins-all meta-option that expands to all plugin_*? | 65 | # TODO plugins-all meta-option that expands to all plugin_*? |
| 80 | PACKAGECONFIG[plugin_acpi_phat] = "-Dplugin_acpi_phat=enabled,-Dplugin_acpi_phat=disabled" | ||
| 81 | PACKAGECONFIG[plugin_android_boot] = "-Dplugin_android_boot=enabled,-Dplugin_android_boot=disabled" | ||
| 82 | PACKAGECONFIG[plugin_bcm57xx] = "-Dplugin_bcm57xx=enabled,-Dplugin_bcm57xx=disabled" | ||
| 83 | PACKAGECONFIG[plugin_cfu] = "-Dplugin_cfu=enabled,-Dplugin_cfu=disabled" | ||
| 84 | PACKAGECONFIG[plugin_emmc] = "-Dplugin_emmc=enabled,-Dplugin_emmc=disabled" | ||
| 85 | PACKAGECONFIG[plugin_ep963x] = "-Dplugin_ep963x=enabled,-Dplugin_ep963x=disabled" | ||
| 86 | PACKAGECONFIG[plugin_fastboot] = "-Dplugin_fastboot=enabled,-Dplugin_fastboot=disabled" | ||
| 87 | PACKAGECONFIG[plugin_flashrom] = "-Dplugin_flashrom=enabled,-Dplugin_flashrom=disabled,flashrom" | 66 | PACKAGECONFIG[plugin_flashrom] = "-Dplugin_flashrom=enabled,-Dplugin_flashrom=disabled,flashrom" |
| 88 | PACKAGECONFIG[plugin_gpio] = "-Dplugin_gpio=enabled,-Dplugin_gpio=disabled" | 67 | PACKAGECONFIG[protobuf] = "-Dprotobuf=enabled,-Dprotobuf=disabled,protobuf-c-native protobuf-c" |
| 89 | PACKAGECONFIG[plugin_igsc] = "-Dplugin_igsc=enabled,-Dplugin_igsc=disabled" | ||
| 90 | PACKAGECONFIG[plugin_intel_me] = "-Dplugin_intel_me=enabled,-Dplugin_intel_me=disabled" | ||
| 91 | PACKAGECONFIG[plugin_intel_spi] = "-Dplugin_intel_spi=true -Dlzma=enabled,-Dplugin_intel_spi=false -Dlzma=disabled,xz" | ||
| 92 | PACKAGECONFIG[plugin_logitech_bulkcontroller] = "-Dplugin_logitech_bulkcontroller=enabled,-Dplugin_logitech_bulkcontroller=disabled,protobuf-c-native protobuf-c" | ||
| 93 | PACKAGECONFIG[plugin_logitech_scribe] = "-Dplugin_logitech_scribe=enabled,-Dplugin_logitech_scribe=disabled" | ||
| 94 | PACKAGECONFIG[plugin_modem_manager] = "-Dplugin_modem_manager=enabled,-Dplugin_modem_manager=disabled,libqmi modemmanager" | 68 | PACKAGECONFIG[plugin_modem_manager] = "-Dplugin_modem_manager=enabled,-Dplugin_modem_manager=disabled,libqmi modemmanager" |
| 95 | PACKAGECONFIG[plugin_msr] = "-Dplugin_msr=enabled,-Dplugin_msr=disabled,cpuid" | 69 | PACKAGECONFIG[plugin_uefi_capsule_splash] = "-Dplugin_uefi_capsule_splash=true,-Dplugin_uefi_capsule_splash=false,python3-pygobject" |
| 96 | PACKAGECONFIG[plugin_nitrokey] = "-Dplugin_nitrokey=enabled,-Dplugin_nitrokey=disabled" | ||
| 97 | PACKAGECONFIG[plugin_nvme] = "-Dplugin_nvme=enabled,-Dplugin_nvme=disabled" | ||
| 98 | PACKAGECONFIG[plugin_parade_lspcon] = "-Dplugin_parade_lspcon=enabled,-Dplugin_parade_lspcon=disabled" | ||
| 99 | PACKAGECONFIG[plugin_pixart_rf] = "-Dplugin_pixart_rf=enabled,-Dplugin_pixart_rf=disabled" | ||
| 100 | PACKAGECONFIG[plugin_powerd] = "-Dplugin_powerd=enabled,-Dplugin_powerd=disabled" | ||
| 101 | PACKAGECONFIG[plugin_realtek_mst] = "-Dplugin_realtek_mst=enabled,-Dplugin_realtek_mst=disabled" | ||
| 102 | PACKAGECONFIG[plugin_redfish] = "-Dplugin_redfish=enabled,-Dplugin_redfish=disabled" | ||
| 103 | PACKAGECONFIG[plugin_scsi] = "-Dplugin_scsi=enabled,-Dplugin_scsi=disabled" | ||
| 104 | PACKAGECONFIG[plugin_synaptics_mst] = "-Dplugin_synaptics_mst=enabled,-Dplugin_synaptics_mst=disabled" | ||
| 105 | PACKAGECONFIG[plugin_synaptics_rmi] = "-Dplugin_synaptics_rmi=enabled,-Dplugin_synaptics_rmi=disabled" | ||
| 106 | PACKAGECONFIG[plugin_tpm] = "-Dplugin_tpm=enabled,-Dplugin_tpm=disabled,tpm2-tss" | ||
| 107 | # Turn off the capsule splash as it needs G-I at buildtime, which isn't currently supported | ||
| 108 | PACKAGECONFIG[plugin_uefi_capsule] = "-Dplugin_uefi_capsule=enabled -Dplugin_uefi_capsule_splash=false,-Dplugin_uefi_capsule=disabled,efivar fwupd-efi" | ||
| 109 | PACKAGECONFIG[plugin_uefi_pk] = "-Dplugin_uefi_pk=enabled,-Dplugin_uefi_pk=disabled" | ||
| 110 | PACKAGECONFIG[plugin_uf2] = "-Dplugin_uf2=enabled,-Dplugin_uf2=disabled" | ||
| 111 | PACKAGECONFIG[plugin_upower] = "-Dplugin_upower=enabled,-Dplugin_upower=disabled" | ||
| 112 | |||
| 113 | # Always disable these plugins on non-x86 platforms as they don't compile or are useless | ||
| 114 | DISABLE_NON_X86 = "plugin_intel_me plugin_intel_spi plugin_msr" | ||
| 115 | DISABLE_NON_X86:x86 = "" | ||
| 116 | DISABLE_NON_X86:x86-64 = "" | ||
| 117 | PACKAGECONFIG:remove = "${DISABLE_NON_X86}" | ||
| 118 | 70 | ||
| 119 | FILES:${PN} += "${libdir}/fwupd-plugins-* \ | 71 | FILES:${PN} += "\ |
| 120 | ${libdir}/fwupd-${PV} \ | 72 | ${libdir}/fwupd-plugins-* \ |
| 121 | ${systemd_unitdir} \ | 73 | ${libdir}/fwupd-${PV} \ |
| 122 | ${nonarch_libdir}/sysusers.d/fwupd.conf \ | 74 | ${systemd_unitdir} \ |
| 123 | ${datadir}/fish \ | 75 | ${nonarch_libdir}/sysusers.d/fwupd.conf \ |
| 124 | ${datadir}/metainfo \ | 76 | ${datadir}/fish \ |
| 125 | ${datadir}/icons \ | 77 | ${datadir}/metainfo \ |
| 126 | ${datadir}/dbus-1 \ | 78 | ${datadir}/icons \ |
| 127 | ${datadir}/polkit-1 \ | 79 | ${datadir}/dbus-1 \ |
| 128 | ${nonarch_libdir}/modules-load.d" | 80 | ${datadir}/polkit-1 \ |
| 81 | ${nonarch_libdir}/modules-load.d \ | ||
| 82 | " | ||
| 129 | 83 | ||
| 130 | FILES:${PN}-ptest += "${libexecdir}/installed-tests/ \ | 84 | FILES:${PN}-ptest += "${libexecdir}/installed-tests/ \ |
| 131 | ${datadir}/installed-tests/" | 85 | ${datadir}/installed-tests/" |
| 132 | RDEPENDS:${PN}-ptest += "gnome-desktop-testing" | 86 | RDEPENDS:${PN}-ptest += "gnome-desktop-testing python3" |
| 133 | 87 | ||
| 134 | INSANE_SKIP:${PN}-ptest += "buildpaths" | 88 | INSANE_SKIP:${PN}-ptest += "buildpaths" |
