From 46fc02f3932e37eb07ed7cd23ac96d464c6db55c Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Tue, 18 Oct 2022 12:34:53 -0500 Subject: subtree updates meta-openembedded: 9a0caf5b09..0e6c34f82c: Martin Jansa (1): ostree: prevent ostree-native depending on target virtual/kernel to provide kernel-module-overlay Nicolas Dechesne (1): imlib2: update SRC_URI poky: eff78b3802..fd00d74f47: Alexandre Belloni (1): pseudo: Fix handling of absolute links Anuj Mittal (2): poky.conf: bump version for 3.4.4 release documentation: update for 3.4.4 release Bruce Ashfield (10): linux-yocto/5.10: update to v5.10.109 lttng-modules: update to 2.13.1 lttng-modules: support kernel 5.18+ linux-yocto/5.10: features/security: Move x86_64 configs to separate file linux-yocto/5.10: update to v5.10.110 linux-yocto/5.10: base: enable kernel crypto userspace API linux-yocto/5.10: update to v5.10.112 linux-yocto: enable powerpc debug fragment linux-yocto/5.10: update to v5.10.113 yocto-bsps: update to v5.10.113 Chen Qi (1): cases/buildepoxy.py: fix typo Davide Gardenal (1): rootfs-postcommands: fix symlinks where link and output path are equal Dmitry Baryshkov (2): linux-firmware: correct license for ar3k firmware linux-firmware: upgrade 20220411 -> 20220509 Felix Moessbauer (1): wic/plugins/rootfs: Fix permissions when splitting rootfs folders across partitions Joe Slater (1): unzip: fix CVE-2021-4217 Khem Raj (2): busybox: Use base_bindir instead of hardcoding /bin path linux-yocto: Enable powerpc-debug fragment for ppc64 LE Konrad Weihmann (1): gmp: add missing COPYINGv3 Martin Jansa (1): license_image.bbclass: close package.manifest file Max Krummenacher (2): perf: sort-pmuevents: don't drop elements perf: sort-pmuevents: allow for additional type qualifiers and storage class Michael Opdenacker (1): adding missing space in appends Ovidiu Panait (1): openssl: upgrade 1.1.1l -> 1.1.1n Paul Gortmaker (1): install/devshell: Introduce git intercept script due to fakeroot issues Peter Kjellerstedt (1): u-boot: Inherit pkgconfig Portia (1): volatile-binds: Change DefaultDependencies from false to no Rahul Kumar (1): neard: Switch SRC_URI to git repo Ralph Siemsen (1): xz: fix CVE-2022-1271 Ranjitsinh Rathod (1): openssl: Minor security upgrade 1.1.1n to 1.1.1o Richard Purdie (14): scripts/runqemu: Fix memory limits for qemux86-64 vim: Upgrade 8.2.4524 -> 8.2.4681 uninative: Upgrade to 3.6 with gcc 12 support tiff: Add marker for CVE-2022-1056 being fixed externalsrc/devtool: Fix to work with fixed export funcition flags handling libxshmfence: Correct LICENSE to HPND alsa-tools: Ensure we install correctly shadow-native: Simplify and fix syslog disable patch build-appliance-image: Update to honister head revision base: Avoid circular references to our own scripts base: Drop git intercept scripts: Make git intercept global scripts/git: Ensure we don't have circular references vim: Upgrade 8.2.4681 -> 8.2.4912 Ross Burton (4): bitbake: knotty: display active tasks when printing keepAlive() message bitbake: knotty: reduce keep-alive timeout from 5000s (83 minutes) to 10 minutes bitbake.conf: mark all directories as safe for git to read oeqa/selftest: add test for git working correctly inside pseudo wangmy (3): linux-firmware: upgrade 20220310 -> 20220411 lttng-modules: upgrade 2.13.1 -> 2.13.2 lttng-modules: upgrade 2.13.2 -> 2.13.3 zhengruoqin (1): wireless-regdb: upgrade 2022.02.18 -> 2022.04.08 Signed-off-by: Patrick Williams Change-Id: I0298ba1d7a4f4f77e0ebe24f18b3f8bdc326097b --- .../recipes-extended/ostree/ostree_2021.3.bb | 2 +- .../meta-oe/recipes-graphics/imlib2/imlib2_git.bb | 2 +- poky/bitbake/lib/bb/ui/knotty.py | 11 +- poky/documentation/dev-manual/common-tasks.rst | 2 +- poky/documentation/kernel-dev/common.rst | 2 +- poky/documentation/poky.yaml | 12 +- poky/documentation/ref-manual/variables.rst | 8 +- poky/meta-poky/conf/distro/poky.conf | 2 +- .../git-submodule-test/git-submodule-test.bb | 15 + .../recipeutils/recipeutils-test_1.2.bb | 2 +- .../recipes-kernel/linux/linux-yocto_5.10.bbappend | 16 +- poky/meta/classes/base.bbclass | 4 + poky/meta/classes/devshell.bbclass | 2 + poky/meta/classes/externalsrc.bbclass | 19 +- poky/meta/classes/license_image.bbclass | 4 +- poky/meta/classes/rootfs-postcommands.bbclass | 14 +- poky/meta/conf/bitbake.conf | 8 + poky/meta/conf/distro/include/yocto-uninative.inc | 8 +- poky/meta/lib/oeqa/sdk/cases/buildepoxy.py | 2 +- poky/meta/lib/oeqa/selftest/cases/git.py | 15 + poky/meta/recipes-bsp/u-boot/u-boot-common.inc | 3 + poky/meta/recipes-connectivity/neard/neard_0.16.bb | 13 +- .../recipes-connectivity/openssl/openssl_1.1.1l.bb | 249 ----- .../recipes-connectivity/openssl/openssl_1.1.1o.bb | 250 +++++ poky/meta/recipes-core/busybox/busybox.inc | 2 +- .../images/build-appliance-image_15.0.0.bb | 2 +- .../volatile-binds/files/volatile-binds.service.in | 2 +- poky/meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +- .../0001-Disable-use-of-syslog-for-sysroot.patch | 150 +-- .../unzip/unzip/CVE-2021-4217.patch | 67 ++ poky/meta/recipes-extended/unzip/unzip_6.0.bb | 1 + .../recipes-extended/xz/xz/CVE-2022-1271.patch | 96 ++ poky/meta/recipes-extended/xz/xz_5.2.5.bb | 4 +- .../recipes-graphics/xorg-lib/libxshmfence_1.3.bb | 2 +- .../linux-firmware/linux-firmware_20220310.bb | 1068 -------------------- .../linux-firmware/linux-firmware_20220509.bb | 1068 ++++++++++++++++++++ .../recipes-kernel/linux/linux-yocto-rt_5.10.bb | 6 +- .../recipes-kernel/linux/linux-yocto-tiny_5.10.bb | 8 +- poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb | 27 +- ...01-Fix-compaction-migratepages-event-name.patch | 37 + ...plug-Remove-deprecated-CPU-hotplug-functi.patch | 394 -------- ...int-event-allow-same-provider-and-event-n.patch | 48 + ...Makefile-Enable-Wimplicit-fallthrough-for.patch | 829 --------------- ...racing-Don-t-re-read-p-state-when-emittin.patch | 183 ++++ .../0004-fix-block-remove-genhd.h-v5.18.patch | 45 + ...ock-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch | 79 ++ ...ix-random-remove-unused-tracepoints-v5.18.patch | 47 + ...-Use-rethook-for-kretprobe-if-possible-v5.patch | 72 ++ ...csi-core-Remove-scsi-scsi_request.h-v5.18.patch | 44 + .../0009-Rename-genhd-wrapper-to-blkdev.patch | 76 ++ ...action-cleanup-the-compaction-trace-event.patch | 106 ++ .../recipes-kernel/lttng/lttng-modules_2.13.0.bb | 47 - .../recipes-kernel/lttng/lttng-modules_2.13.3.bb | 56 + .../recipes-kernel/perf/perf/sort-pmuevents.py | 28 +- .../wireless-regdb/wireless-regdb_2022.02.18.bb | 43 - .../wireless-regdb/wireless-regdb_2022.04.08.bb | 43 + .../recipes-multimedia/alsa/alsa-tools_1.2.5.bb | 1 + ...x-issue-380-and-382-heap-buffer-overflow-.patch | 1 + poky/meta/recipes-support/gmp/gmp_6.2.1.bb | 8 +- poky/meta/recipes-support/vim/vim.inc | 6 +- poky/scripts/git | 26 + poky/scripts/lib/wic/plugins/source/rootfs.py | 5 +- poky/scripts/runqemu | 2 +- 63 files changed, 2554 insertions(+), 2842 deletions(-) create mode 100644 poky/meta/lib/oeqa/selftest/cases/git.py delete mode 100644 poky/meta/recipes-connectivity/openssl/openssl_1.1.1l.bb create mode 100644 poky/meta/recipes-connectivity/openssl/openssl_1.1.1o.bb create mode 100644 poky/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch create mode 100644 poky/meta/recipes-extended/xz/xz/CVE-2022-1271.patch delete mode 100644 poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220310.bb create mode 100644 poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220509.bb create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-compaction-migratepages-event-name.patch delete mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch delete mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0004-fix-block-remove-genhd.h-v5.18.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-remove-unused-tracepoints-v5.18.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0009-Rename-genhd-wrapper-to-blkdev.patch create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch delete mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb create mode 100644 poky/meta/recipes-kernel/lttng/lttng-modules_2.13.3.bb delete mode 100644 poky/meta/recipes-kernel/wireless-regdb/wireless-regdb_2022.02.18.bb create mode 100644 poky/meta/recipes-kernel/wireless-regdb/wireless-regdb_2022.04.08.bb create mode 100755 poky/scripts/git diff --git a/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2021.3.bb b/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2021.3.bb index 803186058a..7fb458ca10 100644 --- a/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2021.3.bb +++ b/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2021.3.bb @@ -181,7 +181,7 @@ RDEPENDS:${PN}-ptest += " \ " RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-localedata-en-us" -RRECOMMENDS:${PN} += "kernel-module-overlay" +RRECOMMENDS:${PN}:append:class-target = " kernel-module-overlay" SYSTEMD_SERVICE:${PN} = "ostree-remount.service ostree-finalize-staged.path" SYSTEMD_SERVICE:${PN}-switchroot = "ostree-prepare-root.service" diff --git a/meta-openembedded/meta-oe/recipes-graphics/imlib2/imlib2_git.bb b/meta-openembedded/meta-oe/recipes-graphics/imlib2/imlib2_git.bb index 56d41cd394..869f8123db 100644 --- a/meta-openembedded/meta-oe/recipes-graphics/imlib2/imlib2_git.bb +++ b/meta-openembedded/meta-oe/recipes-graphics/imlib2/imlib2_git.bb @@ -14,7 +14,7 @@ inherit autotools pkgconfig lib_package AUTO_LIBNAME_PKGS = "" -SRC_URI = "git://git.enlightenment.org/legacy/${BPN}.git;protocol=https;branch=master" +SRC_URI = "git://git.enlightenment.org/old/legacy-${BPN}.git;protocol=https;branch=master" S = "${WORKDIR}/git" PACKAGECONFIG ??= "jpeg png zlib ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" diff --git a/poky/bitbake/lib/bb/ui/knotty.py b/poky/bitbake/lib/bb/ui/knotty.py index 484545a684..3ba5579ca4 100644 --- a/poky/bitbake/lib/bb/ui/knotty.py +++ b/poky/bitbake/lib/bb/ui/knotty.py @@ -228,7 +228,9 @@ class TerminalFilter(object): def keepAlive(self, t): if not self.cuu: - print("Bitbake still alive (%ds)" % t) + print("Bitbake still alive (no events for %ds). Active tasks:" % t) + for t in self.helper.running_tasks: + print(t) sys.stdout.flush() def updateFooter(self): @@ -605,7 +607,8 @@ def main(server, eventHandler, params, tf = TerminalFilter): warnings = 0 taskfailures = [] - printinterval = 5000 + printintervaldelta = 10 * 60 # 10 minutes + printinterval = printintervaldelta lastprint = time.time() termfilter = tf(main, helper, console_handlers, params.options.quiet) @@ -615,7 +618,7 @@ def main(server, eventHandler, params, tf = TerminalFilter): try: if (lastprint + printinterval) <= time.time(): termfilter.keepAlive(printinterval) - printinterval += 5000 + printinterval += printintervaldelta event = eventHandler.waitEvent(0) if event is None: if main.shutdown > 1: @@ -646,7 +649,7 @@ def main(server, eventHandler, params, tf = TerminalFilter): if isinstance(event, logging.LogRecord): lastprint = time.time() - printinterval = 5000 + printinterval = printintervaldelta if event.levelno >= bb.msg.BBLogFormatter.ERROR: errors = errors + 1 return_value = 1 diff --git a/poky/documentation/dev-manual/common-tasks.rst b/poky/documentation/dev-manual/common-tasks.rst index 4683b1c045..fa9cd58b37 100644 --- a/poky/documentation/dev-manual/common-tasks.rst +++ b/poky/documentation/dev-manual/common-tasks.rst @@ -4781,7 +4781,7 @@ configuration would be as follows:: require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE:virtclass-multilib-lib32 = "x86" - IMAGE_INSTALL:append = "lib32-glib-2.0" + IMAGE_INSTALL:append = " lib32-glib-2.0" This example enables an additional library named ``lib32`` alongside the normal target packages. When combining these diff --git a/poky/documentation/kernel-dev/common.rst b/poky/documentation/kernel-dev/common.rst index d42ca5f99a..631c46631e 100644 --- a/poky/documentation/kernel-dev/common.rst +++ b/poky/documentation/kernel-dev/common.rst @@ -1062,7 +1062,7 @@ Section. contents:: FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - SRC_URI:append = "file://0001-calibrate.c-Added-some-printk-statements.patch" + SRC_URI:append = " file://0001-calibrate.c-Added-some-printk-statements.patch" The :term:`FILESEXTRAPATHS` and :term:`SRC_URI` statements enable the OpenEmbedded build system to find the patch file. diff --git a/poky/documentation/poky.yaml b/poky/documentation/poky.yaml index d8ee000c0c..fc7ec9ec3c 100644 --- a/poky/documentation/poky.yaml +++ b/poky/documentation/poky.yaml @@ -1,14 +1,14 @@ -DISTRO : "3.4.3" +DISTRO : "3.4.4" DISTRO_NAME_NO_CAP : "honister" DISTRO_NAME : "Honister" DISTRO_NAME_NO_CAP_MINUS_ONE : "hardknott" DISTRO_NAME_NO_CAP_LTS : "dunfell" -YOCTO_DOC_VERSION : "3.4.3" -YOCTO_DOC_VERSION_MINUS_ONE : "3.3.5" -DISTRO_REL_TAG : "yocto-3.4.3" -DOCCONF_VERSION : "3.4.3" +YOCTO_DOC_VERSION : "3.4.4" +YOCTO_DOC_VERSION_MINUS_ONE : "3.3.6" +DISTRO_REL_TAG : "yocto-3.4.4" +DOCCONF_VERSION : "3.4.4" BITBAKE_SERIES : "1.52" -POKYVERSION : "26.0.3" +POKYVERSION : "26.0.4" YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;" YOCTO_DL_URL : "https://downloads.yoctoproject.org" YOCTO_AB_URL : "https://autobuilder.yoctoproject.org" diff --git a/poky/documentation/ref-manual/variables.rst b/poky/documentation/ref-manual/variables.rst index fd796fddf7..7aef27337e 100644 --- a/poky/documentation/ref-manual/variables.rst +++ b/poky/documentation/ref-manual/variables.rst @@ -3979,10 +3979,10 @@ system and gives an overview of their function and contents. statements add specific configurations to targeted machine types:: KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" - KERNEL_FEATURES:append = "${KERNEL_EXTRA_FEATURES}" - KERNEL_FEATURES:append:qemuall = "cfg/virtio.scc" + KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" + KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc" KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" - KERNEL_FEATURES:append:qemux86-64 = "cfg/sound.scc" + KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc" :term:`KERNEL_FIT_LINK_NAME` The link name of the kernel flattened image tree (FIT) image. This @@ -4170,7 +4170,7 @@ system and gives an overview of their function and contents. SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" KMACHINE:core2-32-intel-common = "intel-core2-32" KBRANCH:core2-32-intel-common = "standard/base" - KERNEL_FEATURES:append:core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}" The :term:`KMACHINE` statement says that the kernel understands the machine name as "intel-core2-32". diff --git a/poky/meta-poky/conf/distro/poky.conf b/poky/meta-poky/conf/distro/poky.conf index 5e176e123c..6a21404a87 100644 --- a/poky/meta-poky/conf/distro/poky.conf +++ b/poky/meta-poky/conf/distro/poky.conf @@ -1,6 +1,6 @@ DISTRO = "poky" DISTRO_NAME = "Poky (Yocto Project Reference Distro)" -DISTRO_VERSION = "3.4.3" +DISTRO_VERSION = "3.4.4" DISTRO_CODENAME = "honister" SDK_VENDOR = "-pokysdk" SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" diff --git a/poky/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb b/poky/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb index cc5d7eae5a..fa3041b7d8 100644 --- a/poky/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb +++ b/poky/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb @@ -7,3 +7,18 @@ INHIBIT_DEFAULT_DEPS = "1" SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master" SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee" + +S = "${WORKDIR}/git" + +do_test_git_as_user() { + cd ${S} + git status +} +addtask test_git_as_user after do_unpack + +fakeroot do_test_git_as_root() { + cd ${S} + git status +} +do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot" +addtask test_git_as_root after do_unpack diff --git a/poky/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb b/poky/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb index 062d6a7a05..ad9f475d15 100644 --- a/poky/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb +++ b/poky/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb @@ -2,7 +2,7 @@ SUMMARY = "Test recipe for recipeutils.patch_recipe()" require recipeutils-test.inc -LICENSE = "Proprietary" +LICENSE = "HPND" LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e" DEPENDS += "zlib" diff --git a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.10.bbappend b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.10.bbappend index 4f4ec0f210..94192afffe 100644 --- a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.10.bbappend +++ b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.10.bbappend @@ -7,17 +7,17 @@ KMACHINE:genericx86 ?= "common-pc" KMACHINE:genericx86-64 ?= "common-pc-64" KMACHINE:beaglebone-yocto ?= "beaglebone" -SRCREV_machine:genericx86 ?= "c0b313d988a16b25c1ee730bfe7393c462ee8a5c" -SRCREV_machine:genericx86-64 ?= "c0b313d988a16b25c1ee730bfe7393c462ee8a5c" -SRCREV_machine:edgerouter ?= "4ab94e777d8b41ee1ee4c279259e9733bc8049b1" -SRCREV_machine:beaglebone-yocto ?= "941cc9c3849f96f7eaf109b1e35e05ba366aca56" +SRCREV_machine:genericx86 ?= "a8b4c628f382412e5e7df5750f2be711df95fa06" +SRCREV_machine:genericx86-64 ?= "a8b4c628f382412e5e7df5750f2be711df95fa06" +SRCREV_machine:edgerouter ?= "43577894d2295a92fce760dc403b97527fb55835" +SRCREV_machine:beaglebone-yocto ?= "8038166b729c192d06f1eb37ab6868a5769f8bc5" COMPATIBLE_MACHINE:genericx86 = "genericx86" COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64" COMPATIBLE_MACHINE:edgerouter = "edgerouter" COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto" -LINUX_VERSION:genericx86 = "5.10.99" -LINUX_VERSION:genericx86-64 = "5.10.99" -LINUX_VERSION:edgerouter = "5.10.63" -LINUX_VERSION:beaglebone-yocto = "5.10.63" +LINUX_VERSION:genericx86 = "5.10.113" +LINUX_VERSION:genericx86-64 = "5.10.113" +LINUX_VERSION:edgerouter = "5.10.113" +LINUX_VERSION:beaglebone-yocto = "5.10.113" diff --git a/poky/meta/classes/base.bbclass b/poky/meta/classes/base.bbclass index 340ebe7d78..070341d1aa 100644 --- a/poky/meta/classes/base.bbclass +++ b/poky/meta/classes/base.bbclass @@ -122,6 +122,10 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True): tools = d.getVar(toolsvar).split() origbbenv = d.getVar("BB_ORIGENV", False) path = origbbenv.getVar("PATH") + # Need to ignore our own scripts directories to avoid circular links + for p in path.split(":"): + if p.endswith("/scripts"): + path = path.replace(p, "/ignoreme") bb.utils.mkdirhier(dest) notfound = [] for tool in tools: diff --git a/poky/meta/classes/devshell.bbclass b/poky/meta/classes/devshell.bbclass index 76dd0b42ee..b6212ebd89 100644 --- a/poky/meta/classes/devshell.bbclass +++ b/poky/meta/classes/devshell.bbclass @@ -2,6 +2,8 @@ inherit terminal DEVSHELL = "${SHELL}" +PATH:prepend:task-devshell = "${COREBASE}/scripts/git-intercept:" + python do_devshell () { if d.getVarFlag("do_devshell", "manualfakeroot"): d.prependVar("DEVSHELL", "pseudo ") diff --git a/poky/meta/classes/externalsrc.bbclass b/poky/meta/classes/externalsrc.bbclass index ad93b2d2ab..435635f42b 100644 --- a/poky/meta/classes/externalsrc.bbclass +++ b/poky/meta/classes/externalsrc.bbclass @@ -90,15 +90,16 @@ python () { # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock") - # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean) - cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 'cleandirs', False) or '') - setvalue = False - for cleandir in cleandirs[:]: - if oe.path.is_path_parent(externalsrc, d.expand(cleandir)): - cleandirs.remove(cleandir) - setvalue = True - if setvalue: - d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs)) + for funcname in [task, "base_" + task, "kernel_" + task]: + # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean) + cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(funcname, 'cleandirs', False) or '') + setvalue = False + for cleandir in cleandirs[:]: + if oe.path.is_path_parent(externalsrc, d.expand(cleandir)): + cleandirs.remove(cleandir) + setvalue = True + if setvalue: + d.setVarFlag(funcname, 'cleandirs', ' '.join(cleandirs)) fetch_tasks = ['do_fetch', 'do_unpack'] # If we deltask do_patch, there's no dependency to ensure do_unpack gets run, so add one diff --git a/poky/meta/classes/license_image.bbclass b/poky/meta/classes/license_image.bbclass index 5490d121f1..150e8174f1 100644 --- a/poky/meta/classes/license_image.bbclass +++ b/poky/meta/classes/license_image.bbclass @@ -19,8 +19,8 @@ python write_package_manifest() { pkgs = image_list_installed_packages(d) output = format_pkg_list(pkgs) - open(os.path.join(license_image_dir, 'package.manifest'), - 'w+').write(output) + with open(os.path.join(license_image_dir, 'package.manifest'), "w+") as package_manifest: + package_manifest.write(output) } python license_create_manifest() { diff --git a/poky/meta/classes/rootfs-postcommands.bbclass b/poky/meta/classes/rootfs-postcommands.bbclass index 0452fe4b27..2310e86cdf 100644 --- a/poky/meta/classes/rootfs-postcommands.bbclass +++ b/poky/meta/classes/rootfs-postcommands.bbclass @@ -267,9 +267,10 @@ python write_image_manifest () { if os.path.exists(manifest_name) and link_name: manifest_link = deploy_dir + "/" + link_name + ".manifest" - if os.path.lexists(manifest_link): - os.remove(manifest_link) - os.symlink(os.path.basename(manifest_name), manifest_link) + if manifest_link != manifest_name: + if os.path.lexists(manifest_link): + os.remove(manifest_link) + os.symlink(os.path.basename(manifest_name), manifest_link) } # Can be used to create /etc/timestamp during image construction to give a reasonably @@ -339,9 +340,10 @@ python write_image_test_data() { if os.path.exists(testdata_name) and link_name: testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name) - if os.path.lexists(testdata_link): - os.remove(testdata_link) - os.symlink(os.path.basename(testdata_name), testdata_link) + if testdata_link != testdata_name: + if os.path.lexists(testdata_link): + os.remove(testdata_link) + os.symlink(os.path.basename(testdata_name), testdata_link) } write_image_test_data[vardepsexclude] += "TOPDIR" diff --git a/poky/meta/conf/bitbake.conf b/poky/meta/conf/bitbake.conf index c2cb2f0d9d..51253003fd 100644 --- a/poky/meta/conf/bitbake.conf +++ b/poky/meta/conf/bitbake.conf @@ -730,10 +730,18 @@ export PKG_CONFIG_DISABLE_UNINSTALLED = "yes" export PKG_CONFIG_SYSTEM_LIBRARY_PATH = "${base_libdir}:${libdir}" export PKG_CONFIG_SYSTEM_INCLUDE_PATH = "${includedir}" +# Git configuration + # Don't allow git to chdir up past WORKDIR so that it doesn't detect the OE # repository when building a recipe export GIT_CEILING_DIRECTORIES = "${WORKDIR}" +# Treat all directories are safe, as during fakeroot tasks git will run as +# root so recent git releases (eg 2.30.3) will refuse to work on repositories. See +# https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9 for +# further details. +export GIT_CONFIG_PARAMETERS="'safe.directory=*'" + ### ### Config file processing ### diff --git a/poky/meta/conf/distro/include/yocto-uninative.inc b/poky/meta/conf/distro/include/yocto-uninative.inc index bfe05ce1eb..411fe45a24 100644 --- a/poky/meta/conf/distro/include/yocto-uninative.inc +++ b/poky/meta/conf/distro/include/yocto-uninative.inc @@ -7,9 +7,9 @@ # UNINATIVE_MAXGLIBCVERSION = "2.35" -UNINATIVE_VERSION = "3.5" +UNINATIVE_VERSION = "3.6" UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/" -UNINATIVE_CHECKSUM[aarch64] ?= "6de0771bd21e0fcb5e80388e5b561a8023b24083bcbf46e056a089982aff75d7" -UNINATIVE_CHECKSUM[i686] ?= "8c8745becbfa1c341bae839c7eab56ddf17ce36c303bcd73d3b2f2f788b631c2" -UNINATIVE_CHECKSUM[x86_64] ?= "e8047a5748e6f266165da141eb6d08b23674f30e477b0e5505b6403d50fbc4b2" +UNINATIVE_CHECKSUM[aarch64] ?= "d64831cf2792c8e470c2e42230660e1a8e5de56a579cdd59978791f663c2f3ed" +UNINATIVE_CHECKSUM[i686] ?= "2f0ee9b66b1bb2c85e2b592fb3c9c7f5d77399fa638d74961330cdb8de34ca3b" +UNINATIVE_CHECKSUM[x86_64] ?= "9bfc4c970495b3716b2f9e52c4df9f968c02463a9a95000f6657fbc3fde1f098" diff --git a/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py b/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py index 385f8ccca8..f69f720cd6 100644 --- a/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py +++ b/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py @@ -17,7 +17,7 @@ class EpoxyTest(OESDKTestCase): """ def setUp(self): if not (self.tc.hasHostPackage("nativesdk-meson")): - raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain Meson") + raise unittest.SkipTest("EpoxyTest class: SDK doesn't contain Meson") def test_epoxy(self): with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir: diff --git a/poky/meta/lib/oeqa/selftest/cases/git.py b/poky/meta/lib/oeqa/selftest/cases/git.py new file mode 100644 index 0000000000..f12874dc7d --- /dev/null +++ b/poky/meta/lib/oeqa/selftest/cases/git.py @@ -0,0 +1,15 @@ +from oeqa.selftest.case import OESelftestTestCase +from oeqa.utils.commands import bitbake + +class GitCheck(OESelftestTestCase): + def test_git_intercept(self): + """ + Git binaries with CVE-2022-24765 fixed will refuse to operate on a + repository which is owned by a different user. This breaks our + do_install task as that runs inside pseudo, so the git repository is + owned by the build user but git is running as (fake)root. + + We have an intercept which disables pseudo, so verify that it works. + """ + bitbake("git-submodule-test -c test_git_as_user") + bitbake("git-submodule-test -c test_git_as_root") diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-common.inc b/poky/meta/recipes-bsp/u-boot/u-boot-common.inc index 2423e9ca14..9af65e6b27 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/poky/meta/recipes-bsp/u-boot/u-boot-common.inc @@ -19,4 +19,7 @@ SRC_URI = "git://git.denx.de/u-boot.git;branch=master \ S = "${WORKDIR}/git" B = "${WORKDIR}/build" + +inherit pkgconfig + do_configure[cleandirs] = "${B}" diff --git a/poky/meta/recipes-connectivity/neard/neard_0.16.bb b/poky/meta/recipes-connectivity/neard/neard_0.16.bb index b6cc1d6ced..936b3c5754 100644 --- a/poky/meta/recipes-connectivity/neard/neard_0.16.bb +++ b/poky/meta/recipes-connectivity/neard/neard_0.16.bb @@ -2,21 +2,22 @@ SUMMARY = "Linux NFC daemon" DESCRIPTION = "A daemon for the Linux Near Field Communication stack" HOMEPAGE = "http://01.org/linux-nfc" LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \ + " DEPENDS = "dbus glib-2.0 libnl" -SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BP}.tar.xz \ +SRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=git;branch=master \ file://neard.in \ file://Makefile.am-fix-parallel-issue.patch \ file://Makefile.am-do-not-ship-version.h.patch \ file://0001-Add-header-dependency-to-nciattach.o.patch \ " -SRC_URI[md5sum] = "5c691fb7872856dc0d909c298bc8cb41" -SRC_URI[sha256sum] = "eae3b11c541a988ec11ca94b7deab01080cd5b58cfef3ced6ceac9b6e6e65b36" -LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \ - " +SRCREV = "949795024f7625420e93e288c56e194cb9a3e74a" + +S = "${WORKDIR}/git" inherit autotools pkgconfig systemd update-rc.d diff --git a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1l.bb b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1l.bb deleted file mode 100644 index 17c769bb56..0000000000 --- a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1l.bb +++ /dev/null @@ -1,249 +0,0 @@ -SUMMARY = "Secure Socket Layer" -DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." -HOMEPAGE = "http://www.openssl.org/" -BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" -SECTION = "libs/network" - -# "openssl" here actually means both OpenSSL and SSLeay licenses apply -# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) -LICENSE = "openssl" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" - -DEPENDS = "hostperl-runtime-native" - -SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ - file://run-ptest \ - file://0001-skip-test_symbol_presence.patch \ - file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ - file://afalg.patch \ - file://reproducible.patch \ - file://reproducibility.patch \ - " - -SRC_URI:append:class-nativesdk = " \ - file://environment.d-openssl.sh \ - " - -SRC_URI:append:riscv32 = " \ - file://0003-Add-support-for-io_pgetevents_time64-syscall.patch \ - file://0004-Fixup-support-for-io_pgetevents_time64-syscall.patch \ - " - -SRC_URI[sha256sum] = "0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1" - -inherit lib_package multilib_header multilib_script ptest -MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" - -PACKAGECONFIG ?= "" -PACKAGECONFIG:class-native = "" -PACKAGECONFIG:class-nativesdk = "" - -PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module" -PACKAGECONFIG[no-tls1] = "no-tls1" -PACKAGECONFIG[no-tls1_1] = "no-tls1_1" - -B = "${WORKDIR}/build" -do_configure[cleandirs] = "${B}" - -#| ./libcrypto.so: undefined reference to `getcontext' -#| ./libcrypto.so: undefined reference to `setcontext' -#| ./libcrypto.so: undefined reference to `makecontext' -EXTRA_OECONF:append:libc-musl = " no-async" -EXTRA_OECONF:append:libc-musl:powerpc64 = " no-asm" - -# adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions -# (native versions can be built with newer glibc, but then relocated onto a system with older glibc) -EXTRA_OECONF:class-native = "--with-rand-seed=os,devrandom" -EXTRA_OECONF:class-nativesdk = "--with-rand-seed=os,devrandom" - -# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. -CFLAGS:append:class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" -CFLAGS:append:class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" - -# Disable deprecated crypto algorithms -# Retained for compatibilty -# des (curl) -# dh (python-ssl) -# dsa (rpm) -# md4 (cyrus-sasl freeradius hostapd) -# bf (wvstreams postgresql x11vnc crda znc cfengine) -# rc4 (freerdp librtorrent ettercap xrdp transmission pam-ssh-agent-auth php) -# rc2 (mailx) -# psk (qt5) -# srp (libest) -# whirlpool (qca) -DEPRECATED_CRYPTO_FLAGS = "no-ssl no-idea no-rc5 no-md2 no-camellia no-mdc2 no-scrypt no-seed no-siphash no-sm2 no-sm3 no-sm4" - -do_configure () { - os=${HOST_OS} - case $os in - linux-gnueabi |\ - linux-gnuspe |\ - linux-musleabi |\ - linux-muslspe |\ - linux-musl ) - os=linux - ;; - *) - ;; - esac - target="$os-${HOST_ARCH}" - case $target in - linux-arm*) - target=linux-armv4 - ;; - linux-aarch64*) - target=linux-aarch64 - ;; - linux-i?86 | linux-viac3) - target=linux-x86 - ;; - linux-gnux32-x86_64 | linux-muslx32-x86_64 ) - target=linux-x32 - ;; - linux-gnu64-x86_64) - target=linux-x86_64 - ;; - linux-mips | linux-mipsel) - # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags - target="linux-mips32 ${TARGET_CC_ARCH}" - ;; - linux-gnun32-mips*) - target=linux-mips64 - ;; - linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) - target=linux64-mips64 - ;; - linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) - target=linux-generic32 - ;; - linux-powerpc) - target=linux-ppc - ;; - linux-powerpc64) - target=linux-ppc64 - ;; - linux-powerpc64le) - target=linux-ppc64le - ;; - linux-riscv32) - target=linux-generic32 - ;; - linux-riscv64) - target=linux-generic64 - ;; - linux-sparc | linux-supersparc) - target=linux-sparcv9 - ;; - mingw32-x86_64) - target=mingw64 - ;; - esac - - useprefix=${prefix} - if [ "x$useprefix" = "x" ]; then - useprefix=/ - fi - # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the - # environment variables set by bitbake. Adjust the environment variables instead. - HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ - perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target - perl ${B}/configdata.pm --dump -} - -do_install () { - oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install - - oe_multilib_header openssl/opensslconf.h - - # Create SSL structure for packages such as ca-certificates which - # contain hard-coded paths to /etc/ssl. Debian does the same. - install -d ${D}${sysconfdir}/ssl - mv ${D}${libdir}/ssl-1.1/certs \ - ${D}${libdir}/ssl-1.1/private \ - ${D}${libdir}/ssl-1.1/openssl.cnf \ - ${D}${sysconfdir}/ssl/ - - # Although absolute symlinks would be OK for the target, they become - # invalid if native or nativesdk are relocated from sstate. - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf -} - -do_install:append:class-native () { - create_wrapper ${D}${bindir}/openssl \ - OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ - SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ - SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ - OPENSSL_ENGINES=${libdir}/engines-1.1 -} - -do_install:append:class-nativesdk () { - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh - sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh -} - -PTEST_BUILD_HOST_FILES += "configdata.pm" -PTEST_BUILD_HOST_PATTERN = "perl_version =" -do_install_ptest () { - # Prune the build tree - rm -f ${B}/fuzz/*.* ${B}/test/*.* - - cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} - cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} - - # For test_shlibload - ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ - ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ - - install -d ${D}${PTEST_PATH}/apps - ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps - install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps - install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps - - install -d ${D}${PTEST_PATH}/engines - install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines - - # seems to be needed with perl 5.32.1 - install -d ${D}${PTEST_PATH}/util/perl/recipes - cp ${D}${PTEST_PATH}/test/recipes/tconversion.pl ${D}${PTEST_PATH}/util/perl/recipes/ -} - -# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto -# package RRECOMMENDS on this package. This will enable the configuration -# file to be installed for both the openssl-bin package and the libcrypto -# package since the openssl-bin package depends on the libcrypto package. - -PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" - -FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}" -FILES:libssl = "${libdir}/libssl${SOLIBS}" -FILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf \ - ${libdir}/ssl-1.1/openssl.cnf* \ - " -FILES:${PN}-engines = "${libdir}/engines-1.1" -# ${prefix} comes from what we pass into --prefix at configure time (which is used for INSTALLTOP) -FILES:${PN}-engines:append:mingw32:class-nativesdk = " ${prefix}${libdir}/engines-1_1" -FILES:${PN}-misc = "${libdir}/ssl-1.1/misc ${bindir}/c_rehash" -FILES:${PN} =+ "${libdir}/ssl-1.1/*" -FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" - -CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf" - -RRECOMMENDS:libcrypto += "openssl-conf" -RDEPENDS:${PN}-misc = "perl" -RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash" - -RDEPENDS:${PN}-bin += "openssl-conf" - -BBCLASSEXTEND = "native nativesdk" - -CVE_PRODUCT = "openssl:openssl" - -CVE_VERSION_SUFFIX = "alphabetical" - -# Only affects OpenSSL >= 1.1.1 in combination with Apache < 2.4.37 -# Apache in meta-webserver is already recent enough -CVE_CHECK_WHITELIST += "CVE-2019-0190" diff --git a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1o.bb b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1o.bb new file mode 100644 index 0000000000..d6386c33a9 --- /dev/null +++ b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1o.bb @@ -0,0 +1,250 @@ +SUMMARY = "Secure Socket Layer" +DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." +HOMEPAGE = "http://www.openssl.org/" +BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" +SECTION = "libs/network" + +# "openssl" here actually means both OpenSSL and SSLeay licenses apply +# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) +LICENSE = "openssl" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" + +DEPENDS = "hostperl-runtime-native" + +SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ + file://run-ptest \ + file://0001-skip-test_symbol_presence.patch \ + file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ + file://afalg.patch \ + file://reproducible.patch \ + file://reproducibility.patch \ + " + +SRC_URI:append:class-nativesdk = " \ + file://environment.d-openssl.sh \ + " + +SRC_URI:append:riscv32 = " \ + file://0003-Add-support-for-io_pgetevents_time64-syscall.patch \ + file://0004-Fixup-support-for-io_pgetevents_time64-syscall.patch \ + " + +SRC_URI[sha256sum] = "9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f" + +inherit lib_package multilib_header multilib_script ptest +MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" + +PACKAGECONFIG ?= "" +PACKAGECONFIG:class-native = "" +PACKAGECONFIG:class-nativesdk = "" + +PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module" +PACKAGECONFIG[no-tls1] = "no-tls1" +PACKAGECONFIG[no-tls1_1] = "no-tls1_1" + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" + +#| ./libcrypto.so: undefined reference to `getcontext' +#| ./libcrypto.so: undefined reference to `setcontext' +#| ./libcrypto.so: undefined reference to `makecontext' +EXTRA_OECONF:append:libc-musl = " no-async" +EXTRA_OECONF:append:libc-musl:powerpc64 = " no-asm" + +# adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions +# (native versions can be built with newer glibc, but then relocated onto a system with older glibc) +EXTRA_OECONF:class-native = "--with-rand-seed=os,devrandom" +EXTRA_OECONF:class-nativesdk = "--with-rand-seed=os,devrandom" + +# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. +CFLAGS:append:class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" +CFLAGS:append:class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" + +# Disable deprecated crypto algorithms +# Retained for compatibilty +# des (curl) +# dh (python-ssl) +# dsa (rpm) +# md4 (cyrus-sasl freeradius hostapd) +# bf (wvstreams postgresql x11vnc crda znc cfengine) +# rc4 (freerdp librtorrent ettercap xrdp transmission pam-ssh-agent-auth php) +# rc2 (mailx) +# psk (qt5) +# srp (libest) +# whirlpool (qca) +DEPRECATED_CRYPTO_FLAGS = "no-ssl no-idea no-rc5 no-md2 no-camellia no-mdc2 no-scrypt no-seed no-siphash no-sm2 no-sm3 no-sm4" + +do_configure () { + os=${HOST_OS} + case $os in + linux-gnueabi |\ + linux-gnuspe |\ + linux-musleabi |\ + linux-muslspe |\ + linux-musl ) + os=linux + ;; + *) + ;; + esac + target="$os-${HOST_ARCH}" + case $target in + linux-arm*) + target=linux-armv4 + ;; + linux-aarch64*) + target=linux-aarch64 + ;; + linux-i?86 | linux-viac3) + target=linux-x86 + ;; + linux-gnux32-x86_64 | linux-muslx32-x86_64 ) + target=linux-x32 + ;; + linux-gnu64-x86_64) + target=linux-x86_64 + ;; + linux-mips | linux-mipsel) + # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags + target="linux-mips32 ${TARGET_CC_ARCH}" + ;; + linux-gnun32-mips*) + target=linux-mips64 + ;; + linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) + target=linux64-mips64 + ;; + linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) + target=linux-generic32 + ;; + linux-powerpc) + target=linux-ppc + ;; + linux-powerpc64) + target=linux-ppc64 + ;; + linux-powerpc64le) + target=linux-ppc64le + ;; + linux-riscv32) + target=linux-generic32 + ;; + linux-riscv64) + target=linux-generic64 + ;; + linux-sparc | linux-supersparc) + target=linux-sparcv9 + ;; + mingw32-x86_64) + target=mingw64 + ;; + esac + + useprefix=${prefix} + if [ "x$useprefix" = "x" ]; then + useprefix=/ + fi + # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the + # environment variables set by bitbake. Adjust the environment variables instead. + HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ + perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target + perl ${B}/configdata.pm --dump +} + +do_install () { + oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install + + oe_multilib_header openssl/opensslconf.h + + # Create SSL structure for packages such as ca-certificates which + # contain hard-coded paths to /etc/ssl. Debian does the same. + install -d ${D}${sysconfdir}/ssl + mv ${D}${libdir}/ssl-1.1/certs \ + ${D}${libdir}/ssl-1.1/private \ + ${D}${libdir}/ssl-1.1/openssl.cnf \ + ${D}${sysconfdir}/ssl/ + + # Although absolute symlinks would be OK for the target, they become + # invalid if native or nativesdk are relocated from sstate. + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf +} + +do_install:append:class-native () { + create_wrapper ${D}${bindir}/openssl \ + OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ + SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ + SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ + OPENSSL_ENGINES=${libdir}/engines-1.1 +} + +do_install:append:class-nativesdk () { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh + sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh +} + +PTEST_BUILD_HOST_FILES += "configdata.pm" +PTEST_BUILD_HOST_PATTERN = "perl_version =" +do_install_ptest () { + # Prune the build tree + rm -f ${B}/fuzz/*.* ${B}/test/*.* + + cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} + cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} + + # For test_shlibload + ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ + ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ + + install -d ${D}${PTEST_PATH}/apps + ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps + install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps + install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps + + install -d ${D}${PTEST_PATH}/engines + install -m755 ${B}/engines/dasync.so ${D}${PTEST_PATH}/engines + install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines + + # seems to be needed with perl 5.32.1 + install -d ${D}${PTEST_PATH}/util/perl/recipes + cp ${D}${PTEST_PATH}/test/recipes/tconversion.pl ${D}${PTEST_PATH}/util/perl/recipes/ +} + +# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto +# package RRECOMMENDS on this package. This will enable the configuration +# file to be installed for both the openssl-bin package and the libcrypto +# package since the openssl-bin package depends on the libcrypto package. + +PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" + +FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}" +FILES:libssl = "${libdir}/libssl${SOLIBS}" +FILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf \ + ${libdir}/ssl-1.1/openssl.cnf* \ + " +FILES:${PN}-engines = "${libdir}/engines-1.1" +# ${prefix} comes from what we pass into --prefix at configure time (which is used for INSTALLTOP) +FILES:${PN}-engines:append:mingw32:class-nativesdk = " ${prefix}${libdir}/engines-1_1" +FILES:${PN}-misc = "${libdir}/ssl-1.1/misc ${bindir}/c_rehash" +FILES:${PN} =+ "${libdir}/ssl-1.1/*" +FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" + +CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf" + +RRECOMMENDS:libcrypto += "openssl-conf" +RDEPENDS:${PN}-misc = "perl" +RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash" + +RDEPENDS:${PN}-bin += "openssl-conf" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "openssl:openssl" + +CVE_VERSION_SUFFIX = "alphabetical" + +# Only affects OpenSSL >= 1.1.1 in combination with Apache < 2.4.37 +# Apache in meta-webserver is already recent enough +CVE_CHECK_WHITELIST += "CVE-2019-0190" diff --git a/poky/meta/recipes-core/busybox/busybox.inc b/poky/meta/recipes-core/busybox/busybox.inc index 808c3dc700..187ca15957 100644 --- a/poky/meta/recipes-core/busybox/busybox.inc +++ b/poky/meta/recipes-core/busybox/busybox.inc @@ -349,7 +349,7 @@ do_install_ptest () { # These access the internet which is not guaranteed to work on machines running the tests rm -rf ${D}${PTEST_PATH}/testsuite/wget sort ${B}/.config > ${D}${PTEST_PATH}/.config - ln -s /bin/busybox ${D}${PTEST_PATH}/busybox + ln -s ${base_bindir}/busybox ${D}${PTEST_PATH}/busybox } inherit update-alternatives diff --git a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb index 4297beec24..e8151ac982 100644 --- a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb +++ b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb @@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx" inherit core-image setuptools3 -SRCREV ?= "d8cd104e66e7a616f6cf6be67d3b36a798be4c7b" +SRCREV ?= "3f17ee4ebef3103e290750d8cdd7d001fc306673" SRC_URI = "git://git.yoctoproject.org/poky;branch=honister \ file://Yocto_Build_Appliance.vmx \ file://Yocto_Build_Appliance.vmxf \ diff --git a/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in index e2ad39f258..0c1c79d0c4 100644 --- a/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in +++ b/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in @@ -1,6 +1,6 @@ [Unit] Description=Bind mount volatile @where@ -DefaultDependencies=false +DefaultDependencies=no Before=local-fs.target RequiresMountsFor=@whatparent@ @whereparent@ ConditionPathIsReadWrite=@whatparent@ diff --git a/poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/poky/meta/recipes-devtools/pseudo/pseudo_git.bb index d20136aef9..e7ef6a730c 100644 --- a/poky/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/poky/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -13,7 +13,7 @@ SRC_URI:append:class-nativesdk = " \ file://older-glibc-symbols.patch" SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa" -SRCREV = "df1d1321fb093283485c387e3c933d2d264e509c" +SRCREV = "2b4b88eb513335b0ece55fe51854693d9b20de35" S = "${WORKDIR}/git" PV = "1.9.0+git${SRCPV}" diff --git a/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch index 95728bcd3f..628db42136 100644 --- a/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch +++ b/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch @@ -1,124 +1,52 @@ -From 30a3906a0a21120fa6bbc918b6258ab9303fbeaa Mon Sep 17 00:00:00 2001 -From: Scott Garman -Date: Thu, 14 Apr 2016 12:28:57 +0200 -Subject: [PATCH] Disable use of syslog for sysroot +From 8b845fff891798a03bdf21354b52e4487c2c0200 Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Thu, 14 Apr 2022 23:11:53 +0000 +Subject: [PATCH] Disable use of syslog for shadow-native tools Disable use of syslog to prevent sysroot user and group additions from writing entries to the host's syslog. This patch should only be used with the shadow-native recipe. -Upstream-Status: Inappropriate [disable feature] - -Signed-off-by: Scott Garman +Upstream-Status: Inappropriate [OE specific configuration] +Signed-off-by: Richard Purdie Signed-off-by: Peter Kjellerstedt -Signed-off-by: Chen Qi --- - src/groupadd.c | 3 +++ - src/groupdel.c | 3 +++ - src/groupmems.c | 3 +++ - src/groupmod.c | 3 +++ - src/useradd.c | 3 +++ - src/userdel.c | 4 ++++ - src/usermod.c | 3 +++ - 7 files changed, 22 insertions(+) + configure.ac | 2 +- + src/login_nopam.c | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) -diff --git a/src/groupadd.c b/src/groupadd.c -index d7f68b1..5fe5f43 100644 ---- a/src/groupadd.c -+++ b/src/groupadd.c -@@ -34,6 +34,9 @@ - - #ident "$Id$" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/groupdel.c b/src/groupdel.c -index 5c89312..2aefc5a 100644 ---- a/src/groupdel.c -+++ b/src/groupdel.c -@@ -34,6 +34,9 @@ - +diff --git a/configure.ac b/configure.ac +index 5dcae19..b2c58f5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd", + [Path to passwd program.]) + + dnl XXX - quick hack, should disappear before anyone notices :). +-AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) ++#AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) + if test "$ac_cv_func_ruserok" = "yes"; then + AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.]) + AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).]) +diff --git a/src/login_nopam.c b/src/login_nopam.c +index df6ba88..fc24e13 100644 +--- a/src/login_nopam.c ++++ b/src/login_nopam.c +@@ -29,7 +29,6 @@ + #ifndef USE_PAM #ident "$Id$" -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/groupmems.c b/src/groupmems.c -index 654a8f3..6b2026b 100644 ---- a/src/groupmems.c -+++ b/src/groupmems.c -@@ -32,6 +32,9 @@ - - #include - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/groupmod.c b/src/groupmod.c -index acd6f35..a2c5247 100644 ---- a/src/groupmod.c -+++ b/src/groupmod.c -@@ -34,6 +34,9 @@ - - #ident "$Id$" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/useradd.c b/src/useradd.c -index 127177e..b80e505 100644 ---- a/src/useradd.c -+++ b/src/useradd.c -@@ -34,6 +34,9 @@ - - #ident "$Id$" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/userdel.c b/src/userdel.c -index 79a7c89..c1e010a 100644 ---- a/src/userdel.c -+++ b/src/userdel.c -@@ -31,6 +31,10 @@ - */ - - #include -+ -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/usermod.c b/src/usermod.c -index 03bb9b9..e15fdd4 100644 ---- a/src/usermod.c -+++ b/src/usermod.c -@@ -34,6 +34,9 @@ - - #ident "$Id$" +-#include "prototypes.h" + /* + * This module implements a simple but effective form of login access + * control based on login names and on host (or domain) names, internet +@@ -57,6 +56,8 @@ + #include + #include /* for inet_ntoa() */ -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG ++#include "prototypes.h" + - #include - #include - #include + #if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 64) + #undef MAXHOSTNAMELEN + #define MAXHOSTNAMELEN 256 diff --git a/poky/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch b/poky/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch new file mode 100644 index 0000000000..6ba2b879a3 --- /dev/null +++ b/poky/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch @@ -0,0 +1,67 @@ +From 731d698377dbd1f5b1b90efeb8094602ed59fc40 Mon Sep 17 00:00:00 2001 +From: Nils Bars +Date: Mon, 17 Jan 2022 16:53:16 +0000 +Subject: [PATCH] Fix null pointer dereference and use of uninitialized data + +This fixes a bug that causes use of uninitialized heap data if `readbuf` fails +to read as many bytes as indicated by the extra field length attribute. +Furthermore, this fixes a null pointer dereference if an archive contains an +`EF_UNIPATH` extra field but does not have a filename set. +--- + fileio.c | 5 ++++- + process.c | 6 +++++- + 2 files changed, 9 insertions(+), 2 deletions(-) +--- + +Patch from: +https://bugs.launchpad.net/ubuntu/+source/unzip/+bug/1957077 +https://launchpadlibrarian.net/580782282/0001-Fix-null-pointer-dereference-and-use-of-uninitialized-data.patch +Regenerated to apply without offsets. + +CVE: CVE-2021-4217 + +Upstream-Status: Pending [infozip upstream inactive] + +Signed-off-by: Joe Slater + + +diff --git a/fileio.c b/fileio.c +index 14460f3..1dc319e 100644 +--- a/fileio.c ++++ b/fileio.c +@@ -2301,8 +2301,11 @@ int do_string(__G__ length, option) /* return PK-type error code */ + seek_zipf(__G__ G.cur_zipfile_bufstart - G.extra_bytes + + (G.inptr-G.inbuf) + length); + } else { +- if (readbuf(__G__ (char *)G.extra_field, length) == 0) ++ unsigned bytes_read = readbuf(__G__ (char *)G.extra_field, length); ++ if (bytes_read == 0) + return PK_EOF; ++ if (bytes_read != length) ++ return PK_ERR; + /* Looks like here is where extra fields are read */ + if (getZip64Data(__G__ G.extra_field, length) != PK_COOL) + { +diff --git a/process.c b/process.c +index 5f8f6c6..de843a5 100644 +--- a/process.c ++++ b/process.c +@@ -2058,10 +2058,14 @@ int getUnicodeData(__G__ ef_buf, ef_len) + G.unipath_checksum = makelong(offset + ef_buf); + offset += 4; + ++ if (!G.filename_full) { ++ /* Check if we have a unicode extra section but no filename set */ ++ return PK_ERR; ++ } ++ + /* + * Compute 32-bit crc + */ +- + chksum = crc32(chksum, (uch *)(G.filename_full), + strlen(G.filename_full)); + +-- +2.32.0 + diff --git a/poky/meta/recipes-extended/unzip/unzip_6.0.bb b/poky/meta/recipes-extended/unzip/unzip_6.0.bb index 0bc6abcd4b..d074db37b4 100644 --- a/poky/meta/recipes-extended/unzip/unzip_6.0.bb +++ b/poky/meta/recipes-extended/unzip/unzip_6.0.bb @@ -27,6 +27,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/ file://CVE-2019-13232_p2.patch \ file://CVE-2019-13232_p3.patch \ file://unzip_optimization.patch \ + file://CVE-2021-4217.patch \ " UPSTREAM_VERSION_UNKNOWN = "1" diff --git a/poky/meta/recipes-extended/xz/xz/CVE-2022-1271.patch b/poky/meta/recipes-extended/xz/xz/CVE-2022-1271.patch new file mode 100644 index 0000000000..e43e73cf12 --- /dev/null +++ b/poky/meta/recipes-extended/xz/xz/CVE-2022-1271.patch @@ -0,0 +1,96 @@ +From dc932a1e9c0d9f1db71be11a9b82496e3a72f112 Mon Sep 17 00:00:00 2001 +From: Lasse Collin +Date: Tue, 29 Mar 2022 19:19:12 +0300 +Subject: [PATCH] xzgrep: Fix escaping of malicious filenames (ZDI-CAN-16587). + +Malicious filenames can make xzgrep to write to arbitrary files +or (with a GNU sed extension) lead to arbitrary code execution. + +xzgrep from XZ Utils versions up to and including 5.2.5 are +affected. 5.3.1alpha and 5.3.2alpha are affected as well. +This patch works for all of them. + +This bug was inherited from gzip's zgrep. gzip 1.12 includes +a fix for zgrep. + +The issue with the old sed script is that with multiple newlines, +the N-command will read the second line of input, then the +s-commands will be skipped because it's not the end of the +file yet, then a new sed cycle starts and the pattern space +is printed and emptied. So only the last line or two get escaped. + +One way to fix this would be to read all lines into the pattern +space first. However, the included fix is even simpler: All lines +except the last line get a backslash appended at the end. To ensure +that shell command substitution doesn't eat a possible trailing +newline, a colon is appended to the filename before escaping. +The colon is later used to separate the filename from the grep +output so it is fine to add it here instead of a few lines later. + +The old code also wasn't POSIX compliant as it used \n in the +replacement section of the s-command. Using \ is the +POSIX compatible method. + +LC_ALL=C was added to the two critical sed commands. POSIX sed +manual recommends it when using sed to manipulate pathnames +because in other locales invalid multibyte sequences might +cause issues with some sed implementations. In case of GNU sed, +these particular sed scripts wouldn't have such problems but some +other scripts could have, see: + + info '(sed)Locale Considerations' + +This vulnerability was discovered by: +cleemy desu wayo working with Trend Micro Zero Day Initiative + +Thanks to Jim Meyering and Paul Eggert discussing the different +ways to fix this and for coordinating the patch release schedule +with gzip. + +Upstream-Status: Backport [https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch] +CVE: CVE-2022-1271 + +Signed-off-by: Ralph Siemsen +--- + src/scripts/xzgrep.in | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in +index 9db5c3a..f64dddb 100644 +--- a/src/scripts/xzgrep.in ++++ b/src/scripts/xzgrep.in +@@ -179,22 +179,26 @@ for i; do + { test $# -eq 1 || test $no_filename -eq 1; }; then + eval "$grep" + else ++ # Append a colon so that the last character will never be a newline ++ # which would otherwise get lost in shell command substitution. ++ i="$i:" ++ ++ # Escape & \ | and newlines only if such characters are present ++ # (speed optimization). + case $i in + (*' + '* | *'&'* | *'\'* | *'|'*) +- i=$(printf '%s\n' "$i" | +- sed ' +- $!N +- $s/[&\|]/\\&/g +- $s/\n/\\n/g +- ');; ++ i=$(printf '%s\n' "$i" | LC_ALL=C sed 's/[&\|]/\\&/g; $!s/$/\\/');; + esac +- sed_script="s|^|$i:|" ++ ++ # $i already ends with a colon so don't add it here. ++ sed_script="s|^|$i|" + + # Fail if grep or sed fails. + r=$( + exec 4>&1 +- (eval "$grep" 4>&-; echo $? >&4) 3>&- | sed "$sed_script" >&3 4>&- ++ (eval "$grep" 4>&-; echo $? >&4) 3>&- | ++ LC_ALL=C sed "$sed_script" >&3 4>&- + ) || r=2 + exit $r + fi >&3 5>&- diff --git a/poky/meta/recipes-extended/xz/xz_5.2.5.bb b/poky/meta/recipes-extended/xz/xz_5.2.5.bb index 8021ebd9bc..200af0e672 100644 --- a/poky/meta/recipes-extended/xz/xz_5.2.5.bb +++ b/poky/meta/recipes-extended/xz/xz_5.2.5.bb @@ -23,7 +23,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \ file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \ " -SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz" +SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz \ + file://CVE-2022-1271.patch \ + " SRC_URI[md5sum] = "0d270c997aff29708c74d53f599ef717" SRC_URI[sha256sum] = "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" UPSTREAM_CHECK_REGEX = "xz-(?P\d+(\.\d+)+)\.tar" diff --git a/poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb b/poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb index d153c7a603..b0b6cb6b56 100644 --- a/poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb +++ b/poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb @@ -6,7 +6,7 @@ using file descriptor passing." require xorg-lib-common.inc -LICENSE = "MIT-style" +LICENSE = "HPND" LIC_FILES_CHKSUM = "file://COPYING;md5=47e508ca280fde97906eacb77892c3ac" DEPENDS += "virtual/libx11" diff --git a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220310.bb b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220310.bb deleted file mode 100644 index fa0f906db0..0000000000 --- a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220310.bb +++ /dev/null @@ -1,1068 +0,0 @@ -SUMMARY = "Firmware files for use with Linux kernel" -HOMEPAGE = "https://www.kernel.org/" -DESCRIPTION = "Linux firmware is a package distributed alongside the Linux kernel \ -that contains firmware binary blobs necessary for partial or full functionality \ -of certain hardware devices." -SECTION = "kernel" - -LICENSE = "\ - Firmware-Abilis \ - & Firmware-adsp_sst \ - & Firmware-agere \ - & Firmware-amdgpu \ - & Firmware-amd-ucode \ - & Firmware-amlogic_vdec \ - & Firmware-atheros_firmware \ - & Firmware-atmel \ - & Firmware-broadcom_bcm43xx \ - & Firmware-ca0132 \ - & Firmware-cavium \ - & Firmware-chelsio_firmware \ - & Firmware-cw1200 \ - & Firmware-cypress \ - & Firmware-dib0700 \ - & Firmware-e100 \ - & Firmware-ene_firmware \ - & Firmware-fw_sst_0f28 \ - & Firmware-go7007 \ - & Firmware-GPLv2 \ - & Firmware-hfi1_firmware \ - & Firmware-i2400m \ - & Firmware-i915 \ - & Firmware-ibt_firmware \ - & Firmware-ice \ - & Firmware-it913x \ - & Firmware-iwlwifi_firmware \ - & Firmware-IntcSST2 \ - & Firmware-kaweth \ - & Firmware-Lontium \ - & Firmware-Marvell \ - & Firmware-moxa \ - & Firmware-myri10ge_firmware \ - & Firmware-netronome \ - & Firmware-nvidia \ - & Firmware-OLPC \ - & Firmware-ath9k-htc \ - & Firmware-phanfw \ - & Firmware-qat \ - & Firmware-qcom \ - & Firmware-qla1280 \ - & Firmware-qla2xxx \ - & Firmware-qualcommAthos_ar3k \ - & Firmware-qualcommAthos_ath10k \ - & Firmware-r8a779x_usb3 \ - & Firmware-radeon \ - & Firmware-ralink_a_mediatek_company_firmware \ - & Firmware-ralink-firmware \ - & Firmware-rtlwifi_firmware \ - & Firmware-imx-sdma_firmware \ - & Firmware-siano \ - & Firmware-tda7706-firmware \ - & Firmware-ti-connectivity \ - & Firmware-ti-keystone \ - & Firmware-ueagle-atm4-firmware \ - & Firmware-via_vt6656 \ - & Firmware-wl1251 \ - & Firmware-xc4000 \ - & Firmware-xc5000 \ - & Firmware-xc5000c \ - & WHENCE \ -" - -LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ - file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \ - file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \ - file://LICENSE.amdgpu;md5=44c1166d052226cb2d6c8d7400090203 \ - file://LICENSE.amd-ucode;md5=3c5399dc9148d7f0e1f41e34b69cf14f \ - file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \ - file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \ - file://LICENSE.atmel;md5=aa74ac0c60595dee4d4e239107ea77a3 \ - file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ - file://LICENCE.ca0132;md5=209b33e66ee5be0461f13d31da392198 \ - file://LICENCE.cadence;md5=009f46816f6956cfb75ede13d3e1cee0 \ - file://LICENCE.cavium;md5=c37aaffb1ebe5939b2580d073a95daea \ - file://LICENCE.chelsio_firmware;md5=819aa8c3fa453f1b258ed8d168a9d903 \ - file://LICENCE.cw1200;md5=f0f770864e7a8444a5c5aa9d12a3a7ed \ - file://LICENCE.cypress;md5=48cd9436c763bf873961f9ed7b5c147b \ - file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \ - file://LICENCE.e100;md5=ec0f84136766df159a3ae6d02acdf5a8 \ - file://LICENCE.ene_firmware;md5=ed67f0f62f8f798130c296720b7d3921 \ - file://LICENCE.fw_sst_0f28;md5=6353931c988ad52818ae733ac61cd293 \ - file://LICENCE.go7007;md5=c0bb9f6aaaba55b0529ee9b30aa66beb \ - file://GPL-2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSE.hfi1_firmware;md5=5e7b6e586ce7339d12689e49931ad444 \ - file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \ - file://LICENSE.i915;md5=2b0b2e0d20984affd4490ba2cba02570 \ - file://LICENCE.ibt_firmware;md5=fdbee1ddfe0fb7ab0b2fcd6b454a366b \ - file://LICENSE.ice;md5=742ab4850f2670792940e6d15c974b2f \ - file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \ - file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 \ - file://LICENCE.iwlwifi_firmware;md5=2ce6786e0fc11ac6e36b54bb9b799f1b \ - file://LICENCE.kaweth;md5=b1d876e562f4b3b8d391ad8395dfe03f \ - file://LICENSE.Lontium;md5=4ec8dc582ff7295f39e2ca6a7b0be2b6 \ - file://LICENCE.Marvell;md5=28b6ed8bd04ba105af6e4dcd6e997772 \ - file://LICENCE.mediatek;md5=7c1976b63217d76ce47d0a11d8a79cf2 \ - file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \ - file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \ - file://LICENCE.Netronome;md5=4add08f2577086d44447996503cddf5f \ - file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \ - file://LICENCE.NXP;md5=58bb8ba632cd729b9ba6183bc6aed36f \ - file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \ - file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \ - file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \ - file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \ - file://LICENSE.qcom;md5=164e3362a538eb11d3ac51e8e134294b \ - file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \ - file://LICENCE.qla2xxx;md5=505855e921b75f1be4a437ad9b79dff0 \ - file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \ - file://LICENSE.QualcommAtheros_ath10k;md5=cb42b686ee5f5cb890275e4321db60a8 \ - file://LICENCE.r8a779x_usb3;md5=4c1671656153025d7076105a5da7e498 \ - file://LICENSE.radeon;md5=68ec28bacb3613200bca44f404c69b16 \ - file://LICENCE.ralink_a_mediatek_company_firmware;md5=728f1a85fd53fd67fa8d7afb080bc435 \ - file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \ - file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \ - file://LICENSE.sdma_firmware;md5=51e8c19ecc2270f4b8ea30341ad63ce9 \ - file://LICENCE.siano;md5=4556c1bf830067f12ca151ad953ec2a5 \ - file://LICENCE.tda7706-firmware.txt;md5=835997cf5e3c131d0dddd695c7d9103e \ - file://LICENCE.ti-connectivity;md5=c5e02be633f1499c109d1652514d85ec \ - file://LICENCE.ti-keystone;md5=3a86335d32864b0bef996bee26cc0f2c \ - file://LICENCE.ueagle-atm4-firmware;md5=4ed7ea6b507ccc583b9d594417714118 \ - file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \ - file://LICENCE.wl1251;md5=ad3f81922bb9e197014bb187289d3b5b \ - file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \ - file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ - file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \ - file://WHENCE;md5=45a9c4a92d152e9495db81e1192f2bdc \ - " - -# These are not common licenses, set NO_GENERIC_LICENSE for them -# so that the license files will be copied from fetched source -NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENCE.Abilis" -NO_GENERIC_LICENSE[Firmware-adsp_sst] = "LICENCE.adsp_sst" -NO_GENERIC_LICENSE[Firmware-agere] = "LICENCE.agere" -NO_GENERIC_LICENSE[Firmware-amdgpu] = "LICENSE.amdgpu" -NO_GENERIC_LICENSE[Firmware-amd-ucode] = "LICENSE.amd-ucode" -NO_GENERIC_LICENSE[Firmware-amlogic_vdec] = "LICENSE.amlogic_vdec" -NO_GENERIC_LICENSE[Firmware-atheros_firmware] = "LICENCE.atheros_firmware" -NO_GENERIC_LICENSE[Firmware-atmel] = "LICENSE.atmel" -NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx] = "LICENCE.broadcom_bcm43xx" -NO_GENERIC_LICENSE[Firmware-ca0132] = "LICENCE.ca0132" -NO_GENERIC_LICENSE[Firmware-cadence] = "LICENCE.cadence" -NO_GENERIC_LICENSE[Firmware-cavium] = "LICENCE.cavium" -NO_GENERIC_LICENSE[Firmware-chelsio_firmware] = "LICENCE.chelsio_firmware" -NO_GENERIC_LICENSE[Firmware-cw1200] = "LICENCE.cw1200" -NO_GENERIC_LICENSE[Firmware-cypress] = "LICENCE.cypress" -NO_GENERIC_LICENSE[Firmware-dib0700] = "LICENSE.dib0700" -NO_GENERIC_LICENSE[Firmware-e100] = "LICENCE.e100" -NO_GENERIC_LICENSE[Firmware-ene_firmware] = "LICENCE.ene_firmware" -NO_GENERIC_LICENSE[Firmware-fw_sst_0f28] = "LICENCE.fw_sst_0f28" -NO_GENERIC_LICENSE[Firmware-go7007] = "LICENCE.go7007" -NO_GENERIC_LICENSE[Firmware-GPLv2] = "GPL-2" -NO_GENERIC_LICENSE[Firmware-hfi1_firmware] = "LICENSE.hfi1_firmware" -NO_GENERIC_LICENSE[Firmware-i2400m] = "LICENCE.i2400m" -NO_GENERIC_LICENSE[Firmware-i915] = "LICENSE.i915" -NO_GENERIC_LICENSE[Firmware-ibt_firmware] = "LICENCE.ibt_firmware" -NO_GENERIC_LICENSE[Firmware-ice] = "LICENSE.ice" -NO_GENERIC_LICENSE[Firmware-IntcSST2] = "LICENCE.IntcSST2" -NO_GENERIC_LICENSE[Firmware-it913x] = "LICENCE.it913x" -NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware" -NO_GENERIC_LICENSE[Firmware-kaweth] = "LICENCE.kaweth" -NO_GENERIC_LICENSE[Firmware-Lontium] = "LICENSE.Lontium" -NO_GENERIC_LICENSE[Firmware-Marvell] = "LICENCE.Marvell" -NO_GENERIC_LICENSE[Firmware-mediatek] = "LICENCE.mediatek" -NO_GENERIC_LICENSE[Firmware-moxa] = "LICENCE.moxa" -NO_GENERIC_LICENSE[Firmware-myri10ge_firmware] = "LICENCE.myri10ge_firmware" -NO_GENERIC_LICENSE[Firmware-netronome] = "LICENCE.Netronome" -NO_GENERIC_LICENSE[Firmware-nvidia] = "LICENCE.nvidia" -NO_GENERIC_LICENSE[Firmware-OLPC] = "LICENCE.OLPC" -NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware" -NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw" -NO_GENERIC_LICENSE[Firmware-qat] = "LICENCE.qat_firmware" -NO_GENERIC_LICENSE[Firmware-qcom] = "LICENSE.qcom" -NO_GENERIC_LICENSE[Firmware-qla1280] = "LICENCE.qla1280" -NO_GENERIC_LICENSE[Firmware-qla2xxx] = "LICENCE.qla2xxx" -NO_GENERIC_LICENSE[Firmware-qualcommAthos_ar3k] = "LICENSE.QualcommAtheros_ar3k" -NO_GENERIC_LICENSE[Firmware-qualcommAthos_ath10k] = "LICENSE.QualcommAtheros_ath10k" -NO_GENERIC_LICENSE[Firmware-r8a779x_usb3] = "LICENCE.r8a779x_usb3" -NO_GENERIC_LICENSE[Firmware-radeon] = "LICENSE.radeon" -NO_GENERIC_LICENSE[Firmware-ralink_a_mediatek_company_firmware] = "LICENCE.ralink_a_mediatek_company_firmware" -NO_GENERIC_LICENSE[Firmware-ralink-firmware] = "LICENCE.ralink-firmware.txt" -NO_GENERIC_LICENSE[Firmware-rtlwifi_firmware] = "LICENCE.rtlwifi_firmware.txt" -NO_GENERIC_LICENSE[Firmware-siano] = "LICENCE.siano" -NO_GENERIC_LICENSE[Firmware-imx-sdma_firmware] = "LICENSE.sdma_firmware" -NO_GENERIC_LICENSE[Firmware-tda7706-firmware] = "LICENCE.tda7706-firmware.txt" -NO_GENERIC_LICENSE[Firmware-ti-connectivity] = "LICENCE.ti-connectivity" -NO_GENERIC_LICENSE[Firmware-ti-keystone] = "LICENCE.ti-keystone" -NO_GENERIC_LICENSE[Firmware-ueagle-atm4-firmware] = "LICENCE.ueagle-atm4-firmware" -NO_GENERIC_LICENSE[Firmware-via_vt6656] = "LICENCE.via_vt6656" -NO_GENERIC_LICENSE[Firmware-wl1251] = "LICENCE.wl1251" -NO_GENERIC_LICENSE[Firmware-xc4000] = "LICENCE.xc4000" -NO_GENERIC_LICENSE[Firmware-xc5000] = "LICENCE.xc5000" -NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c" -NO_GENERIC_LICENSE[WHENCE] = "WHENCE" - -PE = "1" - -SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz" - -SRC_URI[sha256sum] = "5938ee717b2023b48f6bfcf344b40ddc947e3e22c0bc36d4c3418f90fea68182" - -inherit allarch - -CLEANBROKEN = "1" - -do_compile() { - : -} - -do_install() { - oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' install - cp GPL-2 LICEN[CS]E.* WHENCE ${D}${nonarch_base_libdir}/firmware/ -} - - -PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \ - ${PN}-mt7601u-license ${PN}-mt7601u \ - ${PN}-radeon-license ${PN}-radeon \ - ${PN}-marvell-license ${PN}-pcie8897 ${PN}-pcie8997 \ - ${PN}-sd8686 ${PN}-sd8688 ${PN}-sd8787 ${PN}-sd8797 ${PN}-sd8801 \ - ${PN}-sd8887 ${PN}-sd8897 ${PN}-sd8997 ${PN}-usb8997 \ - ${PN}-ti-connectivity-license ${PN}-wlcommon ${PN}-wl12xx ${PN}-wl18xx \ - ${PN}-vt6656-license ${PN}-vt6656 \ - ${PN}-rs9113 ${PN}-rs9116 \ - ${PN}-rtl-license ${PN}-rtl8188 ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su ${PN}-rtl8723 ${PN}-rtl8821 \ - ${PN}-rtl8168 \ - ${PN}-cypress-license \ - ${PN}-broadcom-license \ - ${PN}-bcm-0bb4-0306 \ - ${PN}-bcm43143 \ - ${PN}-bcm43236b \ - ${PN}-bcm43241b0 \ - ${PN}-bcm43241b4 \ - ${PN}-bcm43241b5 \ - ${PN}-bcm43242a \ - ${PN}-bcm4329 \ - ${PN}-bcm4329-fullmac \ - ${PN}-bcm4330 \ - ${PN}-bcm4334 \ - ${PN}-bcm43340 \ - ${PN}-bcm4335 \ - ${PN}-bcm43362 \ - ${PN}-bcm4339 \ - ${PN}-bcm43430 \ - ${PN}-bcm43430a0 \ - ${PN}-bcm43455 \ - ${PN}-bcm4350 \ - ${PN}-bcm4350c2 \ - ${PN}-bcm4354 \ - ${PN}-bcm4356 \ - ${PN}-bcm4356-pcie \ - ${PN}-bcm43569 \ - ${PN}-bcm43570 \ - ${PN}-bcm4358 \ - ${PN}-bcm43602 \ - ${PN}-bcm4366b \ - ${PN}-bcm4366c \ - ${PN}-bcm4371 \ - ${PN}-bcm4373 \ - ${PN}-bcm43xx \ - ${PN}-bcm43xx-hdr \ - ${PN}-atheros-license ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k \ - ${PN}-gplv2-license ${PN}-carl9170 \ - ${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k ${PN}-ath11k ${PN}-qca \ - \ - ${PN}-imx-sdma-license ${PN}-imx-sdma-imx6q ${PN}-imx-sdma-imx7d \ - \ - ${PN}-iwlwifi-license ${PN}-iwlwifi \ - ${PN}-iwlwifi-135-6 \ - ${PN}-iwlwifi-3160-7 ${PN}-iwlwifi-3160-8 ${PN}-iwlwifi-3160-9 \ - ${PN}-iwlwifi-3160-10 ${PN}-iwlwifi-3160-12 ${PN}-iwlwifi-3160-13 \ - ${PN}-iwlwifi-3160-16 ${PN}-iwlwifi-3160-17 \ - ${PN}-iwlwifi-6000-4 ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2a-6 \ - ${PN}-iwlwifi-6000g2b-5 ${PN}-iwlwifi-6000g2b-6 \ - ${PN}-iwlwifi-6050-4 ${PN}-iwlwifi-6050-5 \ - ${PN}-iwlwifi-7260 \ - ${PN}-iwlwifi-7265 \ - ${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \ - ${PN}-iwlwifi-9000 \ - ${PN}-iwlwifi-misc \ - ${PN}-ibt-license ${PN}-ibt \ - ${PN}-ibt-11-5 ${PN}-ibt-12-16 ${PN}-ibt-hw-37-7 ${PN}-ibt-hw-37-8 \ - ${PN}-ibt-17 \ - ${PN}-ibt-20 \ - ${PN}-ibt-misc \ - ${PN}-i915-license ${PN}-i915 \ - ${PN}-ice-license ${PN}-ice \ - ${PN}-adsp-sst-license ${PN}-adsp-sst \ - ${PN}-bnx2-mips \ - ${PN}-liquidio \ - ${PN}-nvidia-license \ - ${PN}-nvidia-tegra-k1 ${PN}-nvidia-tegra \ - ${PN}-nvidia-gpu \ - ${PN}-netronome-license ${PN}-netronome \ - ${PN}-qat ${PN}-qat-license \ - ${PN}-qcom-license \ - ${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 ${PN}-qcom-venus-5.2 ${PN}-qcom-venus-5.4 \ - ${PN}-qcom-vpu-1.0 ${PN}-qcom-vpu-2.0 \ - ${PN}-qcom-adreno-a3xx ${PN}-qcom-adreno-a530 \ - ${PN}-qcom-adreno-a630 ${PN}-qcom-adreno-a650 ${PN}-qcom-adreno-a660 \ - ${PN}-qcom-sdm845-audio ${PN}-qcom-sdm845-compute ${PN}-qcom-sdm845-modem \ - ${PN}-qcom-sm8250-audio ${PN}-qcom-sm8250-compute \ - ${PN}-amlogic-vdec-license ${PN}-amlogic-vdec \ - ${PN}-lt9611uxc ${PN}-lontium-license \ - ${PN}-whence-license \ - ${PN}-license \ - " - -# For atheros -LICENSE:${PN}-ar9170 = "Firmware-atheros_firmware" -LICENSE:${PN}-ath6k = "Firmware-atheros_firmware" -LICENSE:${PN}-ath9k = "Firmware-atheros_firmware" -LICENSE:${PN}-atheros-license = "Firmware-atheros_firmware" - -FILES:${PN}-atheros-license = "${nonarch_base_libdir}/firmware/LICENCE.atheros_firmware" -FILES:${PN}-ar9170 = " \ - ${nonarch_base_libdir}/firmware/ar9170*.fw \ -" -FILES:${PN}-ath6k = " \ - ${nonarch_base_libdir}/firmware/ath6k \ -" -FILES:${PN}-ath9k = " \ - ${nonarch_base_libdir}/firmware/ar9271.fw \ - ${nonarch_base_libdir}/firmware/ar7010*.fw \ - ${nonarch_base_libdir}/firmware/htc_9271.fw \ - ${nonarch_base_libdir}/firmware/htc_7010.fw \ - ${nonarch_base_libdir}/firmware/ath9k_htc/htc_7010-1.4.0.fw \ - ${nonarch_base_libdir}/firmware/ath9k_htc/htc_9271-1.4.0.fw \ -" - -RDEPENDS:${PN}-ar9170 += "${PN}-atheros-license" -RDEPENDS:${PN}-ath6k += "${PN}-atheros-license" -RDEPENDS:${PN}-ath9k += "${PN}-atheros-license" - -# For carl9170 -LICENSE:${PN}-carl9170 = "Firmware-GPLv2" -LICENSE:${PN}-gplv2-license = "Firmware-GPLv2" - -FILES:${PN}-gplv2-license = "${nonarch_base_libdir}/firmware/GPL-2" -FILES:${PN}-carl9170 = " \ - ${nonarch_base_libdir}/firmware/carl9170*.fw \ -" - -RDEPENDS:${PN}-carl9170 += "${PN}-gplv2-license" - -# For QualCommAthos -LICENSE:${PN}-ar3k = "Firmware-qualcommAthos_ar3k" -LICENSE:${PN}-ar3k-license = "Firmware-qualcommAthos_ar3k" -LICENSE:${PN}-ath10k = "Firmware-qualcommAthos_ath10k" -LICENSE:${PN}-ath10k-license = "Firmware-qualcommAthos_ath10k" -LICENSE:${PN}-qca = "Firmware-qualcommAthos_ath10k" - -FILES:${PN}-ar3k-license = "${nonarch_base_libdir}/firmware/LICENSE.QualcommAtheros_ar3k" -FILES:${PN}-ar3k = " \ - ${nonarch_base_libdir}/firmware/ar3k \ -" - -FILES:${PN}-ath10k-license = "${nonarch_base_libdir}/firmware/LICENSE.QualcommAtheros_ath10k" -FILES:${PN}-ath10k = " \ - ${nonarch_base_libdir}/firmware/ath10k \ -" - -FILES:${PN}-ath11k = " \ - ${nonarch_base_libdir}/firmware/ath11k \ -" - -FILES:${PN}-qca = " \ - ${nonarch_base_libdir}/firmware/qca \ -" - -RDEPENDS:${PN}-ar3k += "${PN}-ar3k-license" -RDEPENDS:${PN}-ath10k += "${PN}-ath10k-license" -RDEPENDS:${PN}-ath11k += "${PN}-ath10k-license" -RDEPENDS:${PN}-qca += "${PN}-ath10k-license" - -# For ralink -LICENSE:${PN}-ralink = "Firmware-ralink-firmware" -LICENSE:${PN}-ralink-license = "Firmware-ralink-firmware" - -FILES:${PN}-ralink-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink-firmware.txt" -FILES:${PN}-ralink = " \ - ${nonarch_base_libdir}/firmware/rt*.bin \ -" - -RDEPENDS:${PN}-ralink += "${PN}-ralink-license" - -# For mediatek MT7601U -LICENSE:${PN}-mt7601u = "Firmware-ralink_a_mediatek_company_firmware" -LICENSE:${PN}-mt7601u-license = "Firmware-ralink_a_mediatek_company_firmware" - -FILES:${PN}-mt7601u-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware" -FILES:${PN}-mt7601u = " \ - ${nonarch_base_libdir}/firmware/mt7601u.bin \ -" - -RDEPENDS:${PN}-mt7601u += "${PN}-mt7601u-license" - -# For radeon -LICENSE:${PN}-radeon = "Firmware-radeon" -LICENSE:${PN}-radeon-license = "Firmware-radeon" - -FILES:${PN}-radeon-license = "${nonarch_base_libdir}/firmware/LICENSE.radeon" -FILES:${PN}-radeon = " \ - ${nonarch_base_libdir}/firmware/radeon \ -" - -RDEPENDS:${PN}-radeon += "${PN}-radeon-license" - -# For lontium -LICENSE:${PN}-lt9611uxc = "Firmware-Lontium" - -FILES:${PN}-lontium-license = "${nonarch_base_libdir}/firmware/LICENSE.Lontium" -FILES:${PN}-lt9611uxc = "${nonarch_base_libdir}/firmware/lt9611uxc_fw.bin" - -# For marvell -LICENSE:${PN}-pcie8897 = "Firmware-Marvell" -LICENSE:${PN}-pcie8997 = "Firmware-Marvell" -LICENSE:${PN}-sd8686 = "Firmware-Marvell" -LICENSE:${PN}-sd8688 = "Firmware-Marvell" -LICENSE:${PN}-sd8787 = "Firmware-Marvell" -LICENSE:${PN}-sd8797 = "Firmware-Marvell" -LICENSE:${PN}-sd8801 = "Firmware-Marvell" -LICENSE:${PN}-sd8887 = "Firmware-Marvell" -LICENSE:${PN}-sd8897 = "Firmware-Marvell" -LICENSE:${PN}-sd8997 = "Firmware-Marvell" -LICENSE:${PN}-usb8997 = "Firmware-Marvell" -LICENSE:${PN}-marvell-license = "Firmware-Marvell" - -FILES:${PN}-marvell-license = "${nonarch_base_libdir}/firmware/LICENCE.Marvell" -FILES:${PN}-pcie8897 = " \ - ${nonarch_base_libdir}/firmware/mrvl/pcie8897_uapsta.bin \ -" -FILES:${PN}-pcie8997 = " \ - ${nonarch_base_libdir}/firmware/mrvl/pcie8997_wlan_v4.bin \ - ${nonarch_base_libdir}/firmware/mrvl/pcieuart8997_combo_v4.bin \ - ${nonarch_base_libdir}/firmware/mrvl/pcieusb8997_combo_v4.bin \ -" -FILES:${PN}-sd8686 = " \ - ${nonarch_base_libdir}/firmware/libertas/sd8686_v9* \ - ${nonarch_base_libdir}/firmware/sd8686* \ -" -FILES:${PN}-sd8688 = " \ - ${nonarch_base_libdir}/firmware/libertas/sd8688* \ - ${nonarch_base_libdir}/firmware/mrvl/sd8688* \ -" -FILES:${PN}-sd8787 = " \ - ${nonarch_base_libdir}/firmware/mrvl/sd8787_uapsta.bin \ -" -FILES:${PN}-sd8797 = " \ - ${nonarch_base_libdir}/firmware/mrvl/sd8797_uapsta.bin \ -" -FILES:${PN}-sd8801 = " \ - ${nonarch_base_libdir}/firmware/mrvl/sd8801_uapsta.bin \ -" -FILES:${PN}-sd8887 = " \ - ${nonarch_base_libdir}/firmware/mrvl/sd8887_uapsta.bin \ -" -FILES:${PN}-sd8897 = " \ - ${nonarch_base_libdir}/firmware/mrvl/sd8897_uapsta.bin \ -" -do_install:append() { - # The kernel 5.6.x driver still uses the old name, provide a symlink for - # older kernels - ln -fs sdsd8997_combo_v4.bin ${D}${nonarch_base_libdir}/firmware/mrvl/sd8997_uapsta.bin -} -FILES:${PN}-sd8997 = " \ - ${nonarch_base_libdir}/firmware/mrvl/sd8997_uapsta.bin \ - ${nonarch_base_libdir}/firmware/mrvl/sdsd8997_combo_v4.bin \ -" -FILES:${PN}-usb8997 = " \ - ${nonarch_base_libdir}/firmware/mrvl/usbusb8997_combo_v4.bin \ -" - -RDEPENDS:${PN}-sd8686 += "${PN}-marvell-license" -RDEPENDS:${PN}-sd8688 += "${PN}-marvell-license" -RDEPENDS:${PN}-sd8787 += "${PN}-marvell-license" -RDEPENDS:${PN}-sd8797 += "${PN}-marvell-license" -RDEPENDS:${PN}-sd8801 += "${PN}-marvell-license" -RDEPENDS:${PN}-sd8887 += "${PN}-marvell-license" -RDEPENDS:${PN}-sd8897 += "${PN}-marvell-license" -RDEPENDS:${PN}-sd8997 += "${PN}-marvell-license" -RDEPENDS:${PN}-usb8997 += "${PN}-marvell-license" - -# For netronome -LICENSE:${PN}-netronome = "Firmware-netronome" - -FILES:${PN}-netronome-license = " \ - ${nonarch_base_libdir}/firmware/LICENCE.Netronome \ -" -FILES:${PN}-netronome = " \ - ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0081*.nffw \ - ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0096*.nffw \ - ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0097*.nffw \ - ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0099*.nffw \ - ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0058-0011_2x40.nffw \ - ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0058-0012_2x40.nffw \ - ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0078-0011_1x100.nffw \ - ${nonarch_base_libdir}/firmware/netronome/bpf \ - ${nonarch_base_libdir}/firmware/netronome/flower \ - ${nonarch_base_libdir}/firmware/netronome/nic \ - ${nonarch_base_libdir}/firmware/netronome/nic-sriov \ -" - -RDEPENDS:${PN}-netronome += "${PN}-netronome-license" - -# For Nvidia -LICENSE:${PN}-nvidia-gpu = "Firmware-nvidia" -LICENSE:${PN}-nvidia-tegra = "Firmware-nvidia" -LICENSE:${PN}-nvidia-tegra-k1 = "Firmware-nvidia" -LICENSE:${PN}-nvidia-license = "Firmware-nvidia" - -FILES:${PN}-nvidia-gpu = "${nonarch_base_libdir}/firmware/nvidia" -FILES:${PN}-nvidia-tegra = " \ - ${nonarch_base_libdir}/firmware/nvidia/tegra* \ - ${nonarch_base_libdir}/firmware/nvidia/gm20b \ - ${nonarch_base_libdir}/firmware/nvidia/gp10b \ -" -FILES:${PN}-nvidia-tegra-k1 = " \ - ${nonarch_base_libdir}/firmware/nvidia/tegra124 \ - ${nonarch_base_libdir}/firmware/nvidia/gk20a \ -" -FILES:${PN}-nvidia-license = "${nonarch_base_libdir}/firmware/LICENCE.nvidia" - -RDEPENDS:${PN}-nvidia-gpu += "${PN}-nvidia-license" -RDEPENDS:${PN}-nvidia-tegra += "${PN}-nvidia-license" -RDEPENDS:${PN}-nvidia-tegra-k1 += "${PN}-nvidia-license" - -# For RSI RS911x WiFi -LICENSE:${PN}-rs9113 = "WHENCE" -LICENSE:${PN}-rs9116 = "WHENCE" - -FILES:${PN}-rs9113 = " ${nonarch_base_libdir}/firmware/rsi/rs9113*.rps " -FILES:${PN}-rs9116 = " ${nonarch_base_libdir}/firmware/rsi/rs9116*.rps " - -RDEPENDS:${PN}-rs9113 += "${PN}-whence-license" -RDEPENDS:${PN}-rs9116 += "${PN}-whence-license" - -# For rtl -LICENSE:${PN}-rtl8188 = "Firmware-rtlwifi_firmware" -LICENSE:${PN}-rtl8192cu = "Firmware-rtlwifi_firmware" -LICENSE:${PN}-rtl8192ce = "Firmware-rtlwifi_firmware" -LICENSE:${PN}-rtl8192su = "Firmware-rtlwifi_firmware" -LICENSE:${PN}-rtl8723 = "Firmware-rtlwifi_firmware" -LICENSE:${PN}-rtl8821 = "Firmware-rtlwifi_firmware" -LICENSE:${PN}-rtl-license = "Firmware-rtlwifi_firmware" -LICENSE:${PN}-rtl8168 = "WHENCE" - -FILES:${PN}-rtl-license = " \ - ${nonarch_base_libdir}/firmware/LICENCE.rtlwifi_firmware.txt \ -" -FILES:${PN}-rtl8188 = " \ - ${nonarch_base_libdir}/firmware/rtlwifi/rtl8188*.bin \ -" -FILES:${PN}-rtl8192cu = " \ - ${nonarch_base_libdir}/firmware/rtlwifi/rtl8192cufw*.bin \ -" -FILES:${PN}-rtl8192ce = " \ - ${nonarch_base_libdir}/firmware/rtlwifi/rtl8192cfw*.bin \ -" -FILES:${PN}-rtl8192su = " \ - ${nonarch_base_libdir}/firmware/rtlwifi/rtl8712u.bin \ -" -FILES:${PN}-rtl8723 = " \ - ${nonarch_base_libdir}/firmware/rtlwifi/rtl8723*.bin \ -" -FILES:${PN}-rtl8821 = " \ - ${nonarch_base_libdir}/firmware/rtlwifi/rtl8821*.bin \ -" -FILES:${PN}-rtl8168 = " \ - ${nonarch_base_libdir}/firmware/rtl_nic/rtl8168*.fw \ -" - -RDEPENDS:${PN}-rtl8188 += "${PN}-rtl-license" -RDEPENDS:${PN}-rtl8192ce += "${PN}-rtl-license" -RDEPENDS:${PN}-rtl8192cu += "${PN}-rtl-license" -RDEPENDS:${PN}-rtl8192su = "${PN}-rtl-license" -RDEPENDS:${PN}-rtl8723 += "${PN}-rtl-license" -RDEPENDS:${PN}-rtl8821 += "${PN}-rtl-license" -RDEPENDS:${PN}-rtl8168 += "${PN}-whence-license" - -# For ti-connectivity -LICENSE:${PN}-wlcommon = "Firmware-ti-connectivity" -LICENSE:${PN}-wl12xx = "Firmware-ti-connectivity" -LICENSE:${PN}-wl18xx = "Firmware-ti-connectivity" -LICENSE:${PN}-ti-connectivity-license = "Firmware-ti-connectivity" - -FILES:${PN}-ti-connectivity-license = "${nonarch_base_libdir}/firmware/LICENCE.ti-connectivity" -# wl18xx optionally needs wl1271-nvs.bin (which itself is a symlink to -# wl127x-nvs.bin) - see linux/drivers/net/wireless/ti/wlcore/sdio.c -# and drivers/net/wireless/ti/wlcore/spi.c. -# While they're optional and actually only used to override the MAC -# address on wl18xx, driver loading will delay (by udev timout - 60s) -# if not there. So let's make it available always. Because it's a -# symlink, both need to go to wlcommon. -FILES:${PN}-wlcommon = " \ - ${nonarch_base_libdir}/firmware/ti-connectivity/TI* \ - ${nonarch_base_libdir}/firmware/ti-connectivity/wl127x-nvs.bin \ - ${nonarch_base_libdir}/firmware/ti-connectivity/wl1271-nvs.bin \ -" -FILES:${PN}-wl12xx = " \ - ${nonarch_base_libdir}/firmware/ti-connectivity/wl12* \ -" -FILES:${PN}-wl18xx = " \ - ${nonarch_base_libdir}/firmware/ti-connectivity/wl18* \ -" - -RDEPENDS:${PN}-wl12xx = "${PN}-ti-connectivity-license ${PN}-wlcommon" -RDEPENDS:${PN}-wl18xx = "${PN}-ti-connectivity-license ${PN}-wlcommon" - -# For vt6656 -LICENSE:${PN}-vt6656 = "Firmware-via_vt6656" -LICENSE:${PN}-vt6656-license = "Firmware-via_vt6656" - -FILES:${PN}-vt6656-license = "${nonarch_base_libdir}/firmware/LICENCE.via_vt6656" -FILES:${PN}-vt6656 = " \ - ${nonarch_base_libdir}/firmware/vntwusb.fw \ -" - -RDEPENDS:${PN}-vt6656 = "${PN}-vt6656-license" - -# For broadcom - -# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo -e " \${PN}-$pkg \\"; done | sort -u - -LICENSE:${PN}-broadcom-license = "Firmware-broadcom_bcm43xx" -FILES:${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx" - -# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo "$i - $pkg"; echo -e "FILES:\${PN}-$pkg = \"\${nonarch_base_libdir}/firmware/brcm/$i\""; done | grep ^FILES - -FILES:${PN}-bcm43xx = "${nonarch_base_libdir}/firmware/brcm/bcm43xx-0.fw" -FILES:${PN}-bcm43xx-hdr = "${nonarch_base_libdir}/firmware/brcm/bcm43xx_hdr-0.fw" -FILES:${PN}-bcm4329-fullmac = "${nonarch_base_libdir}/firmware/brcm/bcm4329-fullmac-4.bin" -FILES:${PN}-bcm43236b = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43236b.bin" -FILES:${PN}-bcm4329 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4329-sdio.bin" -FILES:${PN}-bcm4330 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4330-sdio.*" -FILES:${PN}-bcm4334 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4334-sdio.bin" -FILES:${PN}-bcm4335 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4335-sdio.bin" -FILES:${PN}-bcm4339 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4339-sdio.bin \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac4339-sdio.bin \ -" -FILES:${PN}-bcm43241b0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b0-sdio.bin" -FILES:${PN}-bcm43241b4 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b4-sdio.bin" -FILES:${PN}-bcm43241b5 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b5-sdio.bin" -FILES:${PN}-bcm43242a = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43242a.bin" -FILES:${PN}-bcm43143 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43143.bin \ - ${nonarch_base_libdir}/firmware/brcm/brcmfmac43143-sdio.bin \ -" -FILES:${PN}-bcm43430a0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430a0-sdio.*" -FILES:${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.* \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio.* \ -" -FILES:${PN}-bcm4350c2 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350c2-pcie.bin" -FILES:${PN}-bcm4350 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350-pcie.bin" -FILES:${PN}-bcm4356 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-sdio.* \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac4356-sdio.* \ -" -FILES:${PN}-bcm43569 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43569.bin" -FILES:${PN}-bcm43570 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43570-pcie.bin \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac43570-pcie.bin \ -" -FILES:${PN}-bcm4358 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4358-pcie.bin" -FILES:${PN}-bcm43602 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.bin \ - ${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.ap.bin \ -" -FILES:${PN}-bcm4366b = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4366b-pcie.bin" -FILES:${PN}-bcm4366c = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4366c-pcie.bin" -FILES:${PN}-bcm4371 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4371-pcie.bin" - -# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo -e "LICENSE:\${PN}-$pkg = \"Firmware-broadcom_bcm43xx\"\nRDEPENDS_\${PN}-$pkg += \"\${PN}-broadcom-license\""; done -# Currently 1st one and last 6 have cypress LICENSE - -LICENSE:${PN}-bcm43xx = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43xx += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43xx-hdr = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43xx-hdr += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4329-fullmac = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4329-fullmac += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43236b = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43236b += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4329 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4329 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4330 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4330 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4334 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4334 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4335 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4335 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4339 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4339 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43241b0 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43241b0 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43241b4 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43241b4 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43241b5 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43241b5 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43242a = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43242a += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43143 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43143 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43430a0 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43430a0 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43455 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43455 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4350c2 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4350c2 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4350 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4350 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4356 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4356 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43569 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43569 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43570 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43570 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4358 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4358 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm43602 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm43602 += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4366b = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4366b += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4366c = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4366c += "${PN}-broadcom-license" -LICENSE:${PN}-bcm4371 = "Firmware-broadcom_bcm43xx" -RDEPENDS:${PN}-bcm4371 += "${PN}-broadcom-license" - -# For broadcom cypress - -LICENSE:${PN}-cypress-license = "Firmware-cypress" -FILES:${PN}-cypress-license = "${nonarch_base_libdir}/firmware/LICENCE.cypress" - -FILES:${PN}-bcm-0bb4-0306 = "${nonarch_base_libdir}/firmware/brcm/BCM-0bb4-0306.hcd" -FILES:${PN}-bcm43340 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43340-sdio.* \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac43340-sdio.*" -FILES:${PN}-bcm43362 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43362-sdio.* \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac43362-sdio.*" -FILES:${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.* \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.*" -FILES:${PN}-bcm4354 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4354-sdio.bin \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac4354-sdio.bin \ -" -FILES:${PN}-bcm4356-pcie = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-pcie.* \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac4356-pcie.* \ -" -FILES:${PN}-bcm4373 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4373-sdio.bin \ - ${nonarch_base_libdir}/firmware/brcm/brcmfmac4373.bin \ - ${nonarch_base_libdir}/firmware/cypress/cyfmac4373-sdio.bin \ - ${nonarch_base_libdir}/firmware/brcm/brcmfmac4373-sdio.clm_blob \ -" - -LICENSE:${PN}-bcm-0bb4-0306 = "Firmware-cypress" -RDEPENDS:${PN}-bcm-0bb4-0306 += "${PN}-cypress-license" -LICENSE:${PN}-bcm43340 = "Firmware-cypress" -RDEPENDS:${PN}-bcm43340 += "${PN}-cypress-license" -LICENSE:${PN}-bcm43362 = "Firmware-cypress" -RDEPENDS:${PN}-bcm43362 += "${PN}-cypress-license" -LICENSE:${PN}-bcm43430 = "Firmware-cypress" -RDEPENDS:${PN}-bcm43430 += "${PN}-cypress-license" -LICENSE:${PN}-bcm4354 = "Firmware-cypress" -RDEPENDS:${PN}-bcm4354 += "${PN}-cypress-license" -LICENSE:${PN}-bcm4356-pcie = "Firmware-cypress" -RDEPENDS:${PN}-bcm4356-pcie += "${PN}-cypress-license" -LICENSE:${PN}-bcm4373 = "Firmware-cypress" -RDEPENDS:${PN}-bcm4373 += "${PN}-cypress-license" - -# For Broadcom bnx2-mips -# -# which is a separate case to the other Broadcom firmwares since its -# license is contained in the shared WHENCE file. - -LICENSE:${PN}-bnx2-mips = "WHENCE" -LICENSE:${PN}-whence-license = "WHENCE" - -FILES:${PN}-bnx2-mips = "${nonarch_base_libdir}/firmware/bnx2/bnx2-mips-09-6.2.1b.fw" -FILES:${PN}-whence-license = "${nonarch_base_libdir}/firmware/WHENCE" - -RDEPENDS:${PN}-bnx2-mips += "${PN}-whence-license" - -# For imx-sdma -LICENSE:${PN}-imx-sdma-imx6q = "Firmware-imx-sdma_firmware" -LICENSE:${PN}-imx-sdma-imx7d = "Firmware-imx-sdma_firmware" -LICENSE:${PN}-imx-sdma-license = "Firmware-imx-sdma_firmware" - -FILES:${PN}-imx-sdma-imx6q = "${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx6q.bin" - -RPROVIDES:${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q" -RREPLACES:${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q" -RCONFLICTS:${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q" - -FILES:${PN}-imx-sdma-imx7d = "${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx7d.bin" - -FILES:${PN}-imx-sdma-license = "${nonarch_base_libdir}/firmware/LICENSE.sdma_firmware" - -RDEPENDS:${PN}-imx-sdma-imx6q += "${PN}-imx-sdma-license" -RDEPENDS:${PN}-imx-sdma-imx7d += "${PN}-imx-sdma-license" - -# For iwlwifi -LICENSE:${PN}-iwlwifi = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-135-6 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-3160-7 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-3160-8 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-3160-9 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-3160-10 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-3160-12 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-3160-13 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-3160-16 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-3160-17 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-6000-4 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-6000g2a-5 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-6000g2a-6 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-6000g2b-5 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-6000g2b-6 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-6050-4 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-6050-5 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-7260 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-7265 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-7265d = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-8000c = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-8265 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-9000 = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-misc = "Firmware-iwlwifi_firmware" -LICENSE:${PN}-iwlwifi-license = "Firmware-iwlwifi_firmware" - - -FILES:${PN}-iwlwifi-license = "${nonarch_base_libdir}/firmware/LICENCE.iwlwifi_firmware" -FILES:${PN}-iwlwifi-135-6 = "${nonarch_base_libdir}/firmware/iwlwifi-135-6.ucode" -FILES:${PN}-iwlwifi-3160-7 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-7.ucode" -FILES:${PN}-iwlwifi-3160-8 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-8.ucode" -FILES:${PN}-iwlwifi-3160-9 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-9.ucode" -FILES:${PN}-iwlwifi-3160-10 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-10.ucode" -FILES:${PN}-iwlwifi-3160-12 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-12.ucode" -FILES:${PN}-iwlwifi-3160-13 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-13.ucode" -FILES:${PN}-iwlwifi-3160-16 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-16.ucode" -FILES:${PN}-iwlwifi-3160-17 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-17.ucode" -FILES:${PN}-iwlwifi-6000-4 = "${nonarch_base_libdir}/firmware/iwlwifi-6000-4.ucode" -FILES:${PN}-iwlwifi-6000g2a-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2a-5.ucode" -FILES:${PN}-iwlwifi-6000g2a-6 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2a-6.ucode" -FILES:${PN}-iwlwifi-6000g2b-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2b-5.ucode" -FILES:${PN}-iwlwifi-6000g2b-6 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2b-6.ucode" -FILES:${PN}-iwlwifi-6050-4 = "${nonarch_base_libdir}/firmware/iwlwifi-6050-4.ucode" -FILES:${PN}-iwlwifi-6050-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6050-5.ucode" -FILES:${PN}-iwlwifi-7260 = "${nonarch_base_libdir}/firmware/iwlwifi-7260-*.ucode" -FILES:${PN}-iwlwifi-7265 = "${nonarch_base_libdir}/firmware/iwlwifi-7265-*.ucode" -FILES:${PN}-iwlwifi-7265d = "${nonarch_base_libdir}/firmware/iwlwifi-7265D-*.ucode" -FILES:${PN}-iwlwifi-8000c = "${nonarch_base_libdir}/firmware/iwlwifi-8000C-*.ucode" -FILES:${PN}-iwlwifi-8265 = "${nonarch_base_libdir}/firmware/iwlwifi-8265-*.ucode" -FILES:${PN}-iwlwifi-9000 = "${nonarch_base_libdir}/firmware/iwlwifi-9000-*.ucode" -FILES:${PN}-iwlwifi-misc = "${nonarch_base_libdir}/firmware/iwlwifi-*.ucode" - -RDEPENDS:${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-3160-7 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-3160-8 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-3160-9 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-3160-10 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-3160-12 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-3160-13 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-3160-16 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-3160-17 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-6000-4 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-6000g2b-5 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-6050-4 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-6050-5 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-7260 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-7265 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-7265d = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-8000c = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-8265 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-9000 = "${PN}-iwlwifi-license" -RDEPENDS:${PN}-iwlwifi-misc = "${PN}-iwlwifi-license" - -# -iwlwifi-misc is a "catch all" package that includes all the iwlwifi -# firmwares that are not already included in other -iwlwifi- packages. -# -iwlwifi is a virtual package that depends upon all iwlwifi packages. -# These are distinct in order to allow the -misc firmwares to be installed -# without pulling in every other iwlwifi package. -ALLOW_EMPTY:${PN}-iwlwifi = "1" -ALLOW_EMPTY:${PN}-iwlwifi-misc = "1" - -# Handle package updating for the newly merged iwlwifi groupings -RPROVIDES:${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9" -RREPLACES:${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9" -RCONFLICTS:${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9" - -RPROVIDES:${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9" -RREPLACES:${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9" -RCONFLICTS:${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9" - -# For ibt -LICENSE:${PN}-ibt-license = "Firmware-ibt_firmware" -LICENSE:${PN}-ibt-hw-37-7 = "Firmware-ibt_firmware" -LICENSE:${PN}-ibt-hw-37-8 = "Firmware-ibt_firmware" -LICENSE:${PN}-ibt-11-5 = "Firmware-ibt_firmware" -LICENSE:${PN}-ibt-12-16 = "Firmware-ibt_firmware" -LICENSE:${PN}-ibt-17 = "Firmware-ibt_firmware" -LICENSE:${PN}-ibt-20 = "Firmware-ibt_firmware" -LICENSE:${PN}-ibt-misc = "Firmware-ibt_firmware" - -FILES:${PN}-ibt-license = "${nonarch_base_libdir}/firmware/LICENCE.ibt_firmware" -FILES:${PN}-ibt-hw-37-7 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.7*.bseq" -FILES:${PN}-ibt-hw-37-8 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.8*.bseq" -FILES:${PN}-ibt-11-5 = "${nonarch_base_libdir}/firmware/intel/ibt-11-5.sfi ${nonarch_base_libdir}/firmware/intel/ibt-11-5.ddc" -FILES:${PN}-ibt-12-16 = "${nonarch_base_libdir}/firmware/intel/ibt-12-16.sfi ${nonarch_base_libdir}/firmware/intel/ibt-12-16.ddc" -FILES:${PN}-ibt-17 = "${nonarch_base_libdir}/firmware/intel/ibt-17-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-17-*.ddc" -FILES:${PN}-ibt-20 = "${nonarch_base_libdir}/firmware/intel/ibt-20-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-20-*.ddc" -FILES:${PN}-ibt-misc = "${nonarch_base_libdir}/firmware/intel/ibt-*" - -RDEPENDS:${PN}-ibt-hw-37-7 = "${PN}-ibt-license" -RDEPENDS:${PN}-ibt-hw-37.8 = "${PN}-ibt-license" -RDEPENDS:${PN}-ibt-11-5 = "${PN}-ibt-license" -RDEPENDS:${PN}-ibt-12-16 = "${PN}-ibt-license" -RDEPENDS:${PN}-ibt-17 = "${PN}-ibt-license" -RDEPENDS:${PN}-ibt-20 = "${PN}-ibt-license" -RDEPENDS:${PN}-ibt-misc = "${PN}-ibt-license" - -ALLOW_EMPTY:${PN}-ibt= "1" -ALLOW_EMPTY:${PN}-ibt-misc = "1" - -LICENSE:${PN}-i915 = "Firmware-i915" -LICENSE:${PN}-i915-license = "Firmware-i915" -FILES:${PN}-i915-license = "${nonarch_base_libdir}/firmware/LICENSE.i915" -FILES:${PN}-i915 = "${nonarch_base_libdir}/firmware/i915" -RDEPENDS:${PN}-i915 = "${PN}-i915-license" - -LICENSE:${PN}-ice = "Firmware-ice" -LICENSE:${PN}-ice-license = "Firmware-ice" -FILES:${PN}-ice-license = "${nonarch_base_libdir}/firmware/LICENSE.ice" -FILES:${PN}-ice = "${nonarch_base_libdir}/firmware/intel/ice" -RDEPENDS:${PN}-ice = "${PN}-ice-license" - -FILES:${PN}-adsp-sst-license = "${nonarch_base_libdir}/firmware/LICENCE.adsp_sst" -LICENSE:${PN}-adsp-sst = "Firmware-adsp_sst" -LICENSE:${PN}-adsp-sst-license = "Firmware-adsp_sst" -FILES:${PN}-adsp-sst = "${nonarch_base_libdir}/firmware/intel/dsp_fw*" -RDEPENDS:${PN}-adsp-sst = "${PN}-adsp-sst-license" - -# For QAT -LICENSE:${PN}-qat = "Firmware-qat" -LICENSE:${PN}-qat-license = "Firmware-qat" -FILES:${PN}-qat-license = "${nonarch_base_libdir}/firmware/LICENCE.qat_firmware" -FILES:${PN}-qat = "${nonarch_base_libdir}/firmware/qat*.bin" -RDEPENDS:${PN}-qat = "${PN}-qat-license" - -# For QCOM VPU/GPU and SDM845 -LICENSE:${PN}-qcom-license = "Firmware-qcom" -FILES:${PN}-qcom-license = "${nonarch_base_libdir}/firmware/LICENSE.qcom ${nonarch_base_libdir}/firmware/qcom/NOTICE.txt" -FILES:${PN}-qcom-venus-1.8 = "${nonarch_base_libdir}/firmware/qcom/venus-1.8/*" -FILES:${PN}-qcom-venus-4.2 = "${nonarch_base_libdir}/firmware/qcom/venus-4.2/*" -FILES:${PN}-qcom-venus-5.2 = "${nonarch_base_libdir}/firmware/qcom/venus-5.2/*" -FILES:${PN}-qcom-venus-5.4 = "${nonarch_base_libdir}/firmware/qcom/venus-5.4/*" -FILES:${PN}-qcom-vpu-1.0 = "${nonarch_base_libdir}/firmware/qcom/vpu-1.0/*" -FILES:${PN}-qcom-vpu-2.0 = "${nonarch_base_libdir}/firmware/qcom/vpu-2.0/*" -FILES:${PN}-qcom-adreno-a3xx = "${nonarch_base_libdir}/firmware/qcom/a300_*.fw ${nonarch_base_libdir}/firmware/a300_*.fw" -FILES:${PN}-qcom-adreno-a530 = "${nonarch_base_libdir}/firmware/qcom/a530*.*" -FILES:${PN}-qcom-adreno-a630 = "${nonarch_base_libdir}/firmware/qcom/a630*.* ${nonarch_base_libdir}/firmware/qcom/sdm845/a630*.*" -FILES:${PN}-qcom-adreno-a650 = "${nonarch_base_libdir}/firmware/qcom/a650*.* ${nonarch_base_libdir}/firmware/qcom/sm8250/a650*.*" -FILES:${PN}-qcom-adreno-a660 = "${nonarch_base_libdir}/firmware/qcom/a660*.*" -FILES:${PN}-qcom-sdm845-audio = "${nonarch_base_libdir}/firmware/qcom/sdm845/adsp*.*" -FILES:${PN}-qcom-sdm845-compute = "${nonarch_base_libdir}/firmware/qcom/sdm845/cdsp*.*" -FILES:${PN}-qcom-sdm845-modem = "${nonarch_base_libdir}/firmware/qcom/sdm845/mba.mbn ${nonarch_base_libdir}/firmware/qcom/sdm845/modem*.* ${nonarch_base_libdir}/firmware/qcom/sdm845/wlanmdsp.mbn" -FILES:${PN}-qcom-sm8250-audio = "${nonarch_base_libdir}/firmware/qcom/sm8250/adsp*.*" -FILES:${PN}-qcom-sm8250-compute = "${nonarch_base_libdir}/firmware/qcom/sm8250/cdsp*.*" -RDEPENDS:${PN}-qcom-venus-1.8 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-venus-4.2 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-venus-5.2 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-venus-5.4 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-vpu-1.0 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-vpu-2.0 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-adreno-a3xx = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-adreno-a530 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-adreno-a630 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-adreno-a650 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-adreno-a660 = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-sdm845-audio = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-sdm845-compute = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-sdm845-modem = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-sm8250-audio = "${PN}-qcom-license" -RDEPENDS:${PN}-qcom-sm8250-compute = "${PN}-qcom-license" - -FILES:${PN}-liquidio = "${nonarch_base_libdir}/firmware/liquidio" - -# For Amlogic VDEC -LICENSE:${PN}-amlogic-vdec = "Firmware-amlogic_vdec" -FILES:${PN}-amlogic-vdec-license = "${nonarch_base_libdir}/firmware/LICENSE.amlogic_vdec" -FILES:${PN}-amlogic-vdec = "${nonarch_base_libdir}/firmware/meson/vdec/*" -RDEPENDS:${PN}-amlogic-vdec = "${PN}-amlogic-vdec-license" - -# For other firmwares -# Maybe split out to separate packages when needed. -LICENSE:${PN} = "\ - Firmware-Abilis \ - & Firmware-agere \ - & Firmware-amdgpu \ - & Firmware-amd-ucode \ - & Firmware-amlogic_vdec \ - & Firmware-atmel \ - & Firmware-ca0132 \ - & Firmware-cavium \ - & Firmware-chelsio_firmware \ - & Firmware-cw1200 \ - & Firmware-dib0700 \ - & Firmware-e100 \ - & Firmware-ene_firmware \ - & Firmware-fw_sst_0f28 \ - & Firmware-go7007 \ - & Firmware-hfi1_firmware \ - & Firmware-i2400m \ - & Firmware-ibt_firmware \ - & Firmware-it913x \ - & Firmware-IntcSST2 \ - & Firmware-kaweth \ - & Firmware-moxa \ - & Firmware-myri10ge_firmware \ - & Firmware-nvidia \ - & Firmware-OLPC \ - & Firmware-ath9k-htc \ - & Firmware-phanfw \ - & Firmware-qat \ - & Firmware-qcom \ - & Firmware-qla1280 \ - & Firmware-qla2xxx \ - & Firmware-r8a779x_usb3 \ - & Firmware-radeon \ - & Firmware-ralink_a_mediatek_company_firmware \ - & Firmware-ralink-firmware \ - & Firmware-imx-sdma_firmware \ - & Firmware-siano \ - & Firmware-tda7706-firmware \ - & Firmware-ti-connectivity \ - & Firmware-ti-keystone \ - & Firmware-ueagle-atm4-firmware \ - & Firmware-wl1251 \ - & Firmware-xc4000 \ - & Firmware-xc5000 \ - & Firmware-xc5000c \ - & WHENCE \ -" - -FILES:${PN}-license += "${nonarch_base_libdir}/firmware/LICEN*" -FILES:${PN} += "${nonarch_base_libdir}/firmware/*" -RDEPENDS:${PN} += "${PN}-license" -RDEPENDS:${PN} += "${PN}-whence-license" - -# Make linux-firmware depend on all of the split-out packages. -# Make linux-firmware-iwlwifi depend on all of the split-out iwlwifi packages. -# Make linux-firmware-ibt depend on all of the split-out ibt packages. -python populate_packages:prepend () { - firmware_pkgs = oe.utils.packages_filter_out_system(d) - d.appendVar('RRECOMMENDS:linux-firmware', ' ' + ' '.join(firmware_pkgs)) - - iwlwifi_pkgs = filter(lambda x: x.find('-iwlwifi-') != -1, firmware_pkgs) - d.appendVar('RRECOMMENDS:linux-firmware-iwlwifi', ' ' + ' '.join(iwlwifi_pkgs)) - - ibt_pkgs = filter(lambda x: x.find('-ibt-') != -1, firmware_pkgs) - d.appendVar('RRECOMMENDS:linux-firmware-ibt', ' ' + ' '.join(ibt_pkgs)) -} - -# Firmware files are generally not ran on the CPU, so they can be -# allarch despite being architecture specific -INSANE_SKIP = "arch" diff --git a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220509.bb b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220509.bb new file mode 100644 index 0000000000..ed6cdb5c16 --- /dev/null +++ b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220509.bb @@ -0,0 +1,1068 @@ +SUMMARY = "Firmware files for use with Linux kernel" +HOMEPAGE = "https://www.kernel.org/" +DESCRIPTION = "Linux firmware is a package distributed alongside the Linux kernel \ +that contains firmware binary blobs necessary for partial or full functionality \ +of certain hardware devices." +SECTION = "kernel" + +LICENSE = "\ + Firmware-Abilis \ + & Firmware-adsp_sst \ + & Firmware-agere \ + & Firmware-amdgpu \ + & Firmware-amd-ucode \ + & Firmware-amlogic_vdec \ + & Firmware-atheros_firmware \ + & Firmware-atmel \ + & Firmware-broadcom_bcm43xx \ + & Firmware-ca0132 \ + & Firmware-cavium \ + & Firmware-chelsio_firmware \ + & Firmware-cw1200 \ + & Firmware-cypress \ + & Firmware-dib0700 \ + & Firmware-e100 \ + & Firmware-ene_firmware \ + & Firmware-fw_sst_0f28 \ + & Firmware-go7007 \ + & Firmware-GPLv2 \ + & Firmware-hfi1_firmware \ + & Firmware-i2400m \ + & Firmware-i915 \ + & Firmware-ibt_firmware \ + & Firmware-ice \ + & Firmware-it913x \ + & Firmware-iwlwifi_firmware \ + & Firmware-IntcSST2 \ + & Firmware-kaweth \ + & Firmware-Lontium \ + & Firmware-Marvell \ + & Firmware-moxa \ + & Firmware-myri10ge_firmware \ + & Firmware-netronome \ + & Firmware-nvidia \ + & Firmware-OLPC \ + & Firmware-ath9k-htc \ + & Firmware-phanfw \ + & Firmware-qat \ + & Firmware-qcom \ + & Firmware-qla1280 \ + & Firmware-qla2xxx \ + & Firmware-qualcommAthos_ar3k \ + & Firmware-qualcommAthos_ath10k \ + & Firmware-r8a779x_usb3 \ + & Firmware-radeon \ + & Firmware-ralink_a_mediatek_company_firmware \ + & Firmware-ralink-firmware \ + & Firmware-rtlwifi_firmware \ + & Firmware-imx-sdma_firmware \ + & Firmware-siano \ + & Firmware-tda7706-firmware \ + & Firmware-ti-connectivity \ + & Firmware-ti-keystone \ + & Firmware-ueagle-atm4-firmware \ + & Firmware-via_vt6656 \ + & Firmware-wl1251 \ + & Firmware-xc4000 \ + & Firmware-xc5000 \ + & Firmware-xc5000c \ + & WHENCE \ +" + +LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ + file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \ + file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \ + file://LICENSE.amdgpu;md5=44c1166d052226cb2d6c8d7400090203 \ + file://LICENSE.amd-ucode;md5=3c5399dc9148d7f0e1f41e34b69cf14f \ + file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \ + file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \ + file://LICENSE.atmel;md5=aa74ac0c60595dee4d4e239107ea77a3 \ + file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ + file://LICENCE.ca0132;md5=209b33e66ee5be0461f13d31da392198 \ + file://LICENCE.cadence;md5=009f46816f6956cfb75ede13d3e1cee0 \ + file://LICENCE.cavium;md5=c37aaffb1ebe5939b2580d073a95daea \ + file://LICENCE.chelsio_firmware;md5=819aa8c3fa453f1b258ed8d168a9d903 \ + file://LICENCE.cw1200;md5=f0f770864e7a8444a5c5aa9d12a3a7ed \ + file://LICENCE.cypress;md5=48cd9436c763bf873961f9ed7b5c147b \ + file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \ + file://LICENCE.e100;md5=ec0f84136766df159a3ae6d02acdf5a8 \ + file://LICENCE.ene_firmware;md5=ed67f0f62f8f798130c296720b7d3921 \ + file://LICENCE.fw_sst_0f28;md5=6353931c988ad52818ae733ac61cd293 \ + file://LICENCE.go7007;md5=c0bb9f6aaaba55b0529ee9b30aa66beb \ + file://GPL-2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSE.hfi1_firmware;md5=5e7b6e586ce7339d12689e49931ad444 \ + file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \ + file://LICENSE.i915;md5=2b0b2e0d20984affd4490ba2cba02570 \ + file://LICENCE.ibt_firmware;md5=fdbee1ddfe0fb7ab0b2fcd6b454a366b \ + file://LICENSE.ice;md5=742ab4850f2670792940e6d15c974b2f \ + file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \ + file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 \ + file://LICENCE.iwlwifi_firmware;md5=2ce6786e0fc11ac6e36b54bb9b799f1b \ + file://LICENCE.kaweth;md5=b1d876e562f4b3b8d391ad8395dfe03f \ + file://LICENSE.Lontium;md5=4ec8dc582ff7295f39e2ca6a7b0be2b6 \ + file://LICENCE.Marvell;md5=28b6ed8bd04ba105af6e4dcd6e997772 \ + file://LICENCE.mediatek;md5=7c1976b63217d76ce47d0a11d8a79cf2 \ + file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \ + file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \ + file://LICENCE.Netronome;md5=4add08f2577086d44447996503cddf5f \ + file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \ + file://LICENCE.NXP;md5=58bb8ba632cd729b9ba6183bc6aed36f \ + file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \ + file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \ + file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \ + file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \ + file://LICENSE.qcom;md5=164e3362a538eb11d3ac51e8e134294b \ + file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \ + file://LICENCE.qla2xxx;md5=505855e921b75f1be4a437ad9b79dff0 \ + file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \ + file://LICENSE.QualcommAtheros_ath10k;md5=cb42b686ee5f5cb890275e4321db60a8 \ + file://LICENCE.r8a779x_usb3;md5=4c1671656153025d7076105a5da7e498 \ + file://LICENSE.radeon;md5=68ec28bacb3613200bca44f404c69b16 \ + file://LICENCE.ralink_a_mediatek_company_firmware;md5=728f1a85fd53fd67fa8d7afb080bc435 \ + file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \ + file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \ + file://LICENSE.sdma_firmware;md5=51e8c19ecc2270f4b8ea30341ad63ce9 \ + file://LICENCE.siano;md5=4556c1bf830067f12ca151ad953ec2a5 \ + file://LICENCE.tda7706-firmware.txt;md5=835997cf5e3c131d0dddd695c7d9103e \ + file://LICENCE.ti-connectivity;md5=c5e02be633f1499c109d1652514d85ec \ + file://LICENCE.ti-keystone;md5=3a86335d32864b0bef996bee26cc0f2c \ + file://LICENCE.ueagle-atm4-firmware;md5=4ed7ea6b507ccc583b9d594417714118 \ + file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \ + file://LICENCE.wl1251;md5=ad3f81922bb9e197014bb187289d3b5b \ + file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \ + file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ + file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \ + file://WHENCE;md5=d3eb82686904888f8bbbe8d865371404 \ + " + +# These are not common licenses, set NO_GENERIC_LICENSE for them +# so that the license files will be copied from fetched source +NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENCE.Abilis" +NO_GENERIC_LICENSE[Firmware-adsp_sst] = "LICENCE.adsp_sst" +NO_GENERIC_LICENSE[Firmware-agere] = "LICENCE.agere" +NO_GENERIC_LICENSE[Firmware-amdgpu] = "LICENSE.amdgpu" +NO_GENERIC_LICENSE[Firmware-amd-ucode] = "LICENSE.amd-ucode" +NO_GENERIC_LICENSE[Firmware-amlogic_vdec] = "LICENSE.amlogic_vdec" +NO_GENERIC_LICENSE[Firmware-atheros_firmware] = "LICENCE.atheros_firmware" +NO_GENERIC_LICENSE[Firmware-atmel] = "LICENSE.atmel" +NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx] = "LICENCE.broadcom_bcm43xx" +NO_GENERIC_LICENSE[Firmware-ca0132] = "LICENCE.ca0132" +NO_GENERIC_LICENSE[Firmware-cadence] = "LICENCE.cadence" +NO_GENERIC_LICENSE[Firmware-cavium] = "LICENCE.cavium" +NO_GENERIC_LICENSE[Firmware-chelsio_firmware] = "LICENCE.chelsio_firmware" +NO_GENERIC_LICENSE[Firmware-cw1200] = "LICENCE.cw1200" +NO_GENERIC_LICENSE[Firmware-cypress] = "LICENCE.cypress" +NO_GENERIC_LICENSE[Firmware-dib0700] = "LICENSE.dib0700" +NO_GENERIC_LICENSE[Firmware-e100] = "LICENCE.e100" +NO_GENERIC_LICENSE[Firmware-ene_firmware] = "LICENCE.ene_firmware" +NO_GENERIC_LICENSE[Firmware-fw_sst_0f28] = "LICENCE.fw_sst_0f28" +NO_GENERIC_LICENSE[Firmware-go7007] = "LICENCE.go7007" +NO_GENERIC_LICENSE[Firmware-GPLv2] = "GPL-2" +NO_GENERIC_LICENSE[Firmware-hfi1_firmware] = "LICENSE.hfi1_firmware" +NO_GENERIC_LICENSE[Firmware-i2400m] = "LICENCE.i2400m" +NO_GENERIC_LICENSE[Firmware-i915] = "LICENSE.i915" +NO_GENERIC_LICENSE[Firmware-ibt_firmware] = "LICENCE.ibt_firmware" +NO_GENERIC_LICENSE[Firmware-ice] = "LICENSE.ice" +NO_GENERIC_LICENSE[Firmware-IntcSST2] = "LICENCE.IntcSST2" +NO_GENERIC_LICENSE[Firmware-it913x] = "LICENCE.it913x" +NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware" +NO_GENERIC_LICENSE[Firmware-kaweth] = "LICENCE.kaweth" +NO_GENERIC_LICENSE[Firmware-Lontium] = "LICENSE.Lontium" +NO_GENERIC_LICENSE[Firmware-Marvell] = "LICENCE.Marvell" +NO_GENERIC_LICENSE[Firmware-mediatek] = "LICENCE.mediatek" +NO_GENERIC_LICENSE[Firmware-moxa] = "LICENCE.moxa" +NO_GENERIC_LICENSE[Firmware-myri10ge_firmware] = "LICENCE.myri10ge_firmware" +NO_GENERIC_LICENSE[Firmware-netronome] = "LICENCE.Netronome" +NO_GENERIC_LICENSE[Firmware-nvidia] = "LICENCE.nvidia" +NO_GENERIC_LICENSE[Firmware-OLPC] = "LICENCE.OLPC" +NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware" +NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw" +NO_GENERIC_LICENSE[Firmware-qat] = "LICENCE.qat_firmware" +NO_GENERIC_LICENSE[Firmware-qcom] = "LICENSE.qcom" +NO_GENERIC_LICENSE[Firmware-qla1280] = "LICENCE.qla1280" +NO_GENERIC_LICENSE[Firmware-qla2xxx] = "LICENCE.qla2xxx" +NO_GENERIC_LICENSE[Firmware-qualcommAthos_ar3k] = "LICENSE.QualcommAtheros_ar3k" +NO_GENERIC_LICENSE[Firmware-qualcommAthos_ath10k] = "LICENSE.QualcommAtheros_ath10k" +NO_GENERIC_LICENSE[Firmware-r8a779x_usb3] = "LICENCE.r8a779x_usb3" +NO_GENERIC_LICENSE[Firmware-radeon] = "LICENSE.radeon" +NO_GENERIC_LICENSE[Firmware-ralink_a_mediatek_company_firmware] = "LICENCE.ralink_a_mediatek_company_firmware" +NO_GENERIC_LICENSE[Firmware-ralink-firmware] = "LICENCE.ralink-firmware.txt" +NO_GENERIC_LICENSE[Firmware-rtlwifi_firmware] = "LICENCE.rtlwifi_firmware.txt" +NO_GENERIC_LICENSE[Firmware-siano] = "LICENCE.siano" +NO_GENERIC_LICENSE[Firmware-imx-sdma_firmware] = "LICENSE.sdma_firmware" +NO_GENERIC_LICENSE[Firmware-tda7706-firmware] = "LICENCE.tda7706-firmware.txt" +NO_GENERIC_LICENSE[Firmware-ti-connectivity] = "LICENCE.ti-connectivity" +NO_GENERIC_LICENSE[Firmware-ti-keystone] = "LICENCE.ti-keystone" +NO_GENERIC_LICENSE[Firmware-ueagle-atm4-firmware] = "LICENCE.ueagle-atm4-firmware" +NO_GENERIC_LICENSE[Firmware-via_vt6656] = "LICENCE.via_vt6656" +NO_GENERIC_LICENSE[Firmware-wl1251] = "LICENCE.wl1251" +NO_GENERIC_LICENSE[Firmware-xc4000] = "LICENCE.xc4000" +NO_GENERIC_LICENSE[Firmware-xc5000] = "LICENCE.xc5000" +NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c" +NO_GENERIC_LICENSE[WHENCE] = "WHENCE" + +PE = "1" + +SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz" + +SRC_URI[sha256sum] = "376e0b3d7b4f8aaa2abf7f5ab74803dcf14b06b94e3d841b1467cd9a2848255e" + +inherit allarch + +CLEANBROKEN = "1" + +do_compile() { + : +} + +do_install() { + oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' install + cp GPL-2 LICEN[CS]E.* WHENCE ${D}${nonarch_base_libdir}/firmware/ +} + + +PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \ + ${PN}-mt7601u-license ${PN}-mt7601u \ + ${PN}-radeon-license ${PN}-radeon \ + ${PN}-marvell-license ${PN}-pcie8897 ${PN}-pcie8997 \ + ${PN}-sd8686 ${PN}-sd8688 ${PN}-sd8787 ${PN}-sd8797 ${PN}-sd8801 \ + ${PN}-sd8887 ${PN}-sd8897 ${PN}-sd8997 ${PN}-usb8997 \ + ${PN}-ti-connectivity-license ${PN}-wlcommon ${PN}-wl12xx ${PN}-wl18xx \ + ${PN}-vt6656-license ${PN}-vt6656 \ + ${PN}-rs9113 ${PN}-rs9116 \ + ${PN}-rtl-license ${PN}-rtl8188 ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su ${PN}-rtl8723 ${PN}-rtl8821 \ + ${PN}-rtl8168 \ + ${PN}-cypress-license \ + ${PN}-broadcom-license \ + ${PN}-bcm-0bb4-0306 \ + ${PN}-bcm43143 \ + ${PN}-bcm43236b \ + ${PN}-bcm43241b0 \ + ${PN}-bcm43241b4 \ + ${PN}-bcm43241b5 \ + ${PN}-bcm43242a \ + ${PN}-bcm4329 \ + ${PN}-bcm4329-fullmac \ + ${PN}-bcm4330 \ + ${PN}-bcm4334 \ + ${PN}-bcm43340 \ + ${PN}-bcm4335 \ + ${PN}-bcm43362 \ + ${PN}-bcm4339 \ + ${PN}-bcm43430 \ + ${PN}-bcm43430a0 \ + ${PN}-bcm43455 \ + ${PN}-bcm4350 \ + ${PN}-bcm4350c2 \ + ${PN}-bcm4354 \ + ${PN}-bcm4356 \ + ${PN}-bcm4356-pcie \ + ${PN}-bcm43569 \ + ${PN}-bcm43570 \ + ${PN}-bcm4358 \ + ${PN}-bcm43602 \ + ${PN}-bcm4366b \ + ${PN}-bcm4366c \ + ${PN}-bcm4371 \ + ${PN}-bcm4373 \ + ${PN}-bcm43xx \ + ${PN}-bcm43xx-hdr \ + ${PN}-atheros-license ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k \ + ${PN}-gplv2-license ${PN}-carl9170 \ + ${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k ${PN}-ath11k ${PN}-qca \ + \ + ${PN}-imx-sdma-license ${PN}-imx-sdma-imx6q ${PN}-imx-sdma-imx7d \ + \ + ${PN}-iwlwifi-license ${PN}-iwlwifi \ + ${PN}-iwlwifi-135-6 \ + ${PN}-iwlwifi-3160-7 ${PN}-iwlwifi-3160-8 ${PN}-iwlwifi-3160-9 \ + ${PN}-iwlwifi-3160-10 ${PN}-iwlwifi-3160-12 ${PN}-iwlwifi-3160-13 \ + ${PN}-iwlwifi-3160-16 ${PN}-iwlwifi-3160-17 \ + ${PN}-iwlwifi-6000-4 ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2a-6 \ + ${PN}-iwlwifi-6000g2b-5 ${PN}-iwlwifi-6000g2b-6 \ + ${PN}-iwlwifi-6050-4 ${PN}-iwlwifi-6050-5 \ + ${PN}-iwlwifi-7260 \ + ${PN}-iwlwifi-7265 \ + ${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \ + ${PN}-iwlwifi-9000 \ + ${PN}-iwlwifi-misc \ + ${PN}-ibt-license ${PN}-ibt \ + ${PN}-ibt-11-5 ${PN}-ibt-12-16 ${PN}-ibt-hw-37-7 ${PN}-ibt-hw-37-8 \ + ${PN}-ibt-17 \ + ${PN}-ibt-20 \ + ${PN}-ibt-misc \ + ${PN}-i915-license ${PN}-i915 \ + ${PN}-ice-license ${PN}-ice \ + ${PN}-adsp-sst-license ${PN}-adsp-sst \ + ${PN}-bnx2-mips \ + ${PN}-liquidio \ + ${PN}-nvidia-license \ + ${PN}-nvidia-tegra-k1 ${PN}-nvidia-tegra \ + ${PN}-nvidia-gpu \ + ${PN}-netronome-license ${PN}-netronome \ + ${PN}-qat ${PN}-qat-license \ + ${PN}-qcom-license \ + ${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 ${PN}-qcom-venus-5.2 ${PN}-qcom-venus-5.4 \ + ${PN}-qcom-vpu-1.0 ${PN}-qcom-vpu-2.0 \ + ${PN}-qcom-adreno-a3xx ${PN}-qcom-adreno-a530 \ + ${PN}-qcom-adreno-a630 ${PN}-qcom-adreno-a650 ${PN}-qcom-adreno-a660 \ + ${PN}-qcom-sdm845-audio ${PN}-qcom-sdm845-compute ${PN}-qcom-sdm845-modem \ + ${PN}-qcom-sm8250-audio ${PN}-qcom-sm8250-compute \ + ${PN}-amlogic-vdec-license ${PN}-amlogic-vdec \ + ${PN}-lt9611uxc ${PN}-lontium-license \ + ${PN}-whence-license \ + ${PN}-license \ + " + +# For atheros +LICENSE:${PN}-ar9170 = "Firmware-atheros_firmware" +LICENSE:${PN}-ath6k = "Firmware-atheros_firmware" +LICENSE:${PN}-ath9k = "Firmware-atheros_firmware" +LICENSE:${PN}-atheros-license = "Firmware-atheros_firmware" + +FILES:${PN}-atheros-license = "${nonarch_base_libdir}/firmware/LICENCE.atheros_firmware" +FILES:${PN}-ar9170 = " \ + ${nonarch_base_libdir}/firmware/ar9170*.fw \ +" +FILES:${PN}-ath6k = " \ + ${nonarch_base_libdir}/firmware/ath6k \ +" +FILES:${PN}-ath9k = " \ + ${nonarch_base_libdir}/firmware/ar9271.fw \ + ${nonarch_base_libdir}/firmware/ar7010*.fw \ + ${nonarch_base_libdir}/firmware/htc_9271.fw \ + ${nonarch_base_libdir}/firmware/htc_7010.fw \ + ${nonarch_base_libdir}/firmware/ath9k_htc/htc_7010-1.4.0.fw \ + ${nonarch_base_libdir}/firmware/ath9k_htc/htc_9271-1.4.0.fw \ +" + +RDEPENDS:${PN}-ar9170 += "${PN}-atheros-license" +RDEPENDS:${PN}-ath6k += "${PN}-atheros-license" +RDEPENDS:${PN}-ath9k += "${PN}-atheros-license" + +# For carl9170 +LICENSE:${PN}-carl9170 = "Firmware-GPLv2" +LICENSE:${PN}-gplv2-license = "Firmware-GPLv2" + +FILES:${PN}-gplv2-license = "${nonarch_base_libdir}/firmware/GPL-2" +FILES:${PN}-carl9170 = " \ + ${nonarch_base_libdir}/firmware/carl9170*.fw \ +" + +RDEPENDS:${PN}-carl9170 += "${PN}-gplv2-license" + +# For QualCommAthos +LICENSE:${PN}-ar3k = "Firmware-qualcommAthos_ar3k & Firmware-atheros_firmware" +LICENSE:${PN}-ar3k-license = "Firmware-qualcommAthos_ar3k" +LICENSE:${PN}-ath10k = "Firmware-qualcommAthos_ath10k" +LICENSE:${PN}-ath10k-license = "Firmware-qualcommAthos_ath10k" +LICENSE:${PN}-qca = "Firmware-qualcommAthos_ath10k" + +FILES:${PN}-ar3k-license = "${nonarch_base_libdir}/firmware/LICENSE.QualcommAtheros_ar3k" +FILES:${PN}-ar3k = " \ + ${nonarch_base_libdir}/firmware/ar3k \ +" + +FILES:${PN}-ath10k-license = "${nonarch_base_libdir}/firmware/LICENSE.QualcommAtheros_ath10k" +FILES:${PN}-ath10k = " \ + ${nonarch_base_libdir}/firmware/ath10k \ +" + +FILES:${PN}-ath11k = " \ + ${nonarch_base_libdir}/firmware/ath11k \ +" + +FILES:${PN}-qca = " \ + ${nonarch_base_libdir}/firmware/qca \ +" + +RDEPENDS:${PN}-ar3k += "${PN}-ar3k-license ${PN}-atheros-license" +RDEPENDS:${PN}-ath10k += "${PN}-ath10k-license" +RDEPENDS:${PN}-ath11k += "${PN}-ath10k-license" +RDEPENDS:${PN}-qca += "${PN}-ath10k-license" + +# For ralink +LICENSE:${PN}-ralink = "Firmware-ralink-firmware" +LICENSE:${PN}-ralink-license = "Firmware-ralink-firmware" + +FILES:${PN}-ralink-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink-firmware.txt" +FILES:${PN}-ralink = " \ + ${nonarch_base_libdir}/firmware/rt*.bin \ +" + +RDEPENDS:${PN}-ralink += "${PN}-ralink-license" + +# For mediatek MT7601U +LICENSE:${PN}-mt7601u = "Firmware-ralink_a_mediatek_company_firmware" +LICENSE:${PN}-mt7601u-license = "Firmware-ralink_a_mediatek_company_firmware" + +FILES:${PN}-mt7601u-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware" +FILES:${PN}-mt7601u = " \ + ${nonarch_base_libdir}/firmware/mt7601u.bin \ +" + +RDEPENDS:${PN}-mt7601u += "${PN}-mt7601u-license" + +# For radeon +LICENSE:${PN}-radeon = "Firmware-radeon" +LICENSE:${PN}-radeon-license = "Firmware-radeon" + +FILES:${PN}-radeon-license = "${nonarch_base_libdir}/firmware/LICENSE.radeon" +FILES:${PN}-radeon = " \ + ${nonarch_base_libdir}/firmware/radeon \ +" + +RDEPENDS:${PN}-radeon += "${PN}-radeon-license" + +# For lontium +LICENSE:${PN}-lt9611uxc = "Firmware-Lontium" + +FILES:${PN}-lontium-license = "${nonarch_base_libdir}/firmware/LICENSE.Lontium" +FILES:${PN}-lt9611uxc = "${nonarch_base_libdir}/firmware/lt9611uxc_fw.bin" + +# For marvell +LICENSE:${PN}-pcie8897 = "Firmware-Marvell" +LICENSE:${PN}-pcie8997 = "Firmware-Marvell" +LICENSE:${PN}-sd8686 = "Firmware-Marvell" +LICENSE:${PN}-sd8688 = "Firmware-Marvell" +LICENSE:${PN}-sd8787 = "Firmware-Marvell" +LICENSE:${PN}-sd8797 = "Firmware-Marvell" +LICENSE:${PN}-sd8801 = "Firmware-Marvell" +LICENSE:${PN}-sd8887 = "Firmware-Marvell" +LICENSE:${PN}-sd8897 = "Firmware-Marvell" +LICENSE:${PN}-sd8997 = "Firmware-Marvell" +LICENSE:${PN}-usb8997 = "Firmware-Marvell" +LICENSE:${PN}-marvell-license = "Firmware-Marvell" + +FILES:${PN}-marvell-license = "${nonarch_base_libdir}/firmware/LICENCE.Marvell" +FILES:${PN}-pcie8897 = " \ + ${nonarch_base_libdir}/firmware/mrvl/pcie8897_uapsta.bin \ +" +FILES:${PN}-pcie8997 = " \ + ${nonarch_base_libdir}/firmware/mrvl/pcie8997_wlan_v4.bin \ + ${nonarch_base_libdir}/firmware/mrvl/pcieuart8997_combo_v4.bin \ + ${nonarch_base_libdir}/firmware/mrvl/pcieusb8997_combo_v4.bin \ +" +FILES:${PN}-sd8686 = " \ + ${nonarch_base_libdir}/firmware/libertas/sd8686_v9* \ + ${nonarch_base_libdir}/firmware/sd8686* \ +" +FILES:${PN}-sd8688 = " \ + ${nonarch_base_libdir}/firmware/libertas/sd8688* \ + ${nonarch_base_libdir}/firmware/mrvl/sd8688* \ +" +FILES:${PN}-sd8787 = " \ + ${nonarch_base_libdir}/firmware/mrvl/sd8787_uapsta.bin \ +" +FILES:${PN}-sd8797 = " \ + ${nonarch_base_libdir}/firmware/mrvl/sd8797_uapsta.bin \ +" +FILES:${PN}-sd8801 = " \ + ${nonarch_base_libdir}/firmware/mrvl/sd8801_uapsta.bin \ +" +FILES:${PN}-sd8887 = " \ + ${nonarch_base_libdir}/firmware/mrvl/sd8887_uapsta.bin \ +" +FILES:${PN}-sd8897 = " \ + ${nonarch_base_libdir}/firmware/mrvl/sd8897_uapsta.bin \ +" +do_install:append() { + # The kernel 5.6.x driver still uses the old name, provide a symlink for + # older kernels + ln -fs sdsd8997_combo_v4.bin ${D}${nonarch_base_libdir}/firmware/mrvl/sd8997_uapsta.bin +} +FILES:${PN}-sd8997 = " \ + ${nonarch_base_libdir}/firmware/mrvl/sd8997_uapsta.bin \ + ${nonarch_base_libdir}/firmware/mrvl/sdsd8997_combo_v4.bin \ +" +FILES:${PN}-usb8997 = " \ + ${nonarch_base_libdir}/firmware/mrvl/usbusb8997_combo_v4.bin \ +" + +RDEPENDS:${PN}-sd8686 += "${PN}-marvell-license" +RDEPENDS:${PN}-sd8688 += "${PN}-marvell-license" +RDEPENDS:${PN}-sd8787 += "${PN}-marvell-license" +RDEPENDS:${PN}-sd8797 += "${PN}-marvell-license" +RDEPENDS:${PN}-sd8801 += "${PN}-marvell-license" +RDEPENDS:${PN}-sd8887 += "${PN}-marvell-license" +RDEPENDS:${PN}-sd8897 += "${PN}-marvell-license" +RDEPENDS:${PN}-sd8997 += "${PN}-marvell-license" +RDEPENDS:${PN}-usb8997 += "${PN}-marvell-license" + +# For netronome +LICENSE:${PN}-netronome = "Firmware-netronome" + +FILES:${PN}-netronome-license = " \ + ${nonarch_base_libdir}/firmware/LICENCE.Netronome \ +" +FILES:${PN}-netronome = " \ + ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0081*.nffw \ + ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0096*.nffw \ + ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0097*.nffw \ + ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0099*.nffw \ + ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0058-0011_2x40.nffw \ + ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0058-0012_2x40.nffw \ + ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0078-0011_1x100.nffw \ + ${nonarch_base_libdir}/firmware/netronome/bpf \ + ${nonarch_base_libdir}/firmware/netronome/flower \ + ${nonarch_base_libdir}/firmware/netronome/nic \ + ${nonarch_base_libdir}/firmware/netronome/nic-sriov \ +" + +RDEPENDS:${PN}-netronome += "${PN}-netronome-license" + +# For Nvidia +LICENSE:${PN}-nvidia-gpu = "Firmware-nvidia" +LICENSE:${PN}-nvidia-tegra = "Firmware-nvidia" +LICENSE:${PN}-nvidia-tegra-k1 = "Firmware-nvidia" +LICENSE:${PN}-nvidia-license = "Firmware-nvidia" + +FILES:${PN}-nvidia-gpu = "${nonarch_base_libdir}/firmware/nvidia" +FILES:${PN}-nvidia-tegra = " \ + ${nonarch_base_libdir}/firmware/nvidia/tegra* \ + ${nonarch_base_libdir}/firmware/nvidia/gm20b \ + ${nonarch_base_libdir}/firmware/nvidia/gp10b \ +" +FILES:${PN}-nvidia-tegra-k1 = " \ + ${nonarch_base_libdir}/firmware/nvidia/tegra124 \ + ${nonarch_base_libdir}/firmware/nvidia/gk20a \ +" +FILES:${PN}-nvidia-license = "${nonarch_base_libdir}/firmware/LICENCE.nvidia" + +RDEPENDS:${PN}-nvidia-gpu += "${PN}-nvidia-license" +RDEPENDS:${PN}-nvidia-tegra += "${PN}-nvidia-license" +RDEPENDS:${PN}-nvidia-tegra-k1 += "${PN}-nvidia-license" + +# For RSI RS911x WiFi +LICENSE:${PN}-rs9113 = "WHENCE" +LICENSE:${PN}-rs9116 = "WHENCE" + +FILES:${PN}-rs9113 = " ${nonarch_base_libdir}/firmware/rsi/rs9113*.rps " +FILES:${PN}-rs9116 = " ${nonarch_base_libdir}/firmware/rsi/rs9116*.rps " + +RDEPENDS:${PN}-rs9113 += "${PN}-whence-license" +RDEPENDS:${PN}-rs9116 += "${PN}-whence-license" + +# For rtl +LICENSE:${PN}-rtl8188 = "Firmware-rtlwifi_firmware" +LICENSE:${PN}-rtl8192cu = "Firmware-rtlwifi_firmware" +LICENSE:${PN}-rtl8192ce = "Firmware-rtlwifi_firmware" +LICENSE:${PN}-rtl8192su = "Firmware-rtlwifi_firmware" +LICENSE:${PN}-rtl8723 = "Firmware-rtlwifi_firmware" +LICENSE:${PN}-rtl8821 = "Firmware-rtlwifi_firmware" +LICENSE:${PN}-rtl-license = "Firmware-rtlwifi_firmware" +LICENSE:${PN}-rtl8168 = "WHENCE" + +FILES:${PN}-rtl-license = " \ + ${nonarch_base_libdir}/firmware/LICENCE.rtlwifi_firmware.txt \ +" +FILES:${PN}-rtl8188 = " \ + ${nonarch_base_libdir}/firmware/rtlwifi/rtl8188*.bin \ +" +FILES:${PN}-rtl8192cu = " \ + ${nonarch_base_libdir}/firmware/rtlwifi/rtl8192cufw*.bin \ +" +FILES:${PN}-rtl8192ce = " \ + ${nonarch_base_libdir}/firmware/rtlwifi/rtl8192cfw*.bin \ +" +FILES:${PN}-rtl8192su = " \ + ${nonarch_base_libdir}/firmware/rtlwifi/rtl8712u.bin \ +" +FILES:${PN}-rtl8723 = " \ + ${nonarch_base_libdir}/firmware/rtlwifi/rtl8723*.bin \ +" +FILES:${PN}-rtl8821 = " \ + ${nonarch_base_libdir}/firmware/rtlwifi/rtl8821*.bin \ +" +FILES:${PN}-rtl8168 = " \ + ${nonarch_base_libdir}/firmware/rtl_nic/rtl8168*.fw \ +" + +RDEPENDS:${PN}-rtl8188 += "${PN}-rtl-license" +RDEPENDS:${PN}-rtl8192ce += "${PN}-rtl-license" +RDEPENDS:${PN}-rtl8192cu += "${PN}-rtl-license" +RDEPENDS:${PN}-rtl8192su = "${PN}-rtl-license" +RDEPENDS:${PN}-rtl8723 += "${PN}-rtl-license" +RDEPENDS:${PN}-rtl8821 += "${PN}-rtl-license" +RDEPENDS:${PN}-rtl8168 += "${PN}-whence-license" + +# For ti-connectivity +LICENSE:${PN}-wlcommon = "Firmware-ti-connectivity" +LICENSE:${PN}-wl12xx = "Firmware-ti-connectivity" +LICENSE:${PN}-wl18xx = "Firmware-ti-connectivity" +LICENSE:${PN}-ti-connectivity-license = "Firmware-ti-connectivity" + +FILES:${PN}-ti-connectivity-license = "${nonarch_base_libdir}/firmware/LICENCE.ti-connectivity" +# wl18xx optionally needs wl1271-nvs.bin (which itself is a symlink to +# wl127x-nvs.bin) - see linux/drivers/net/wireless/ti/wlcore/sdio.c +# and drivers/net/wireless/ti/wlcore/spi.c. +# While they're optional and actually only used to override the MAC +# address on wl18xx, driver loading will delay (by udev timout - 60s) +# if not there. So let's make it available always. Because it's a +# symlink, both need to go to wlcommon. +FILES:${PN}-wlcommon = " \ + ${nonarch_base_libdir}/firmware/ti-connectivity/TI* \ + ${nonarch_base_libdir}/firmware/ti-connectivity/wl127x-nvs.bin \ + ${nonarch_base_libdir}/firmware/ti-connectivity/wl1271-nvs.bin \ +" +FILES:${PN}-wl12xx = " \ + ${nonarch_base_libdir}/firmware/ti-connectivity/wl12* \ +" +FILES:${PN}-wl18xx = " \ + ${nonarch_base_libdir}/firmware/ti-connectivity/wl18* \ +" + +RDEPENDS:${PN}-wl12xx = "${PN}-ti-connectivity-license ${PN}-wlcommon" +RDEPENDS:${PN}-wl18xx = "${PN}-ti-connectivity-license ${PN}-wlcommon" + +# For vt6656 +LICENSE:${PN}-vt6656 = "Firmware-via_vt6656" +LICENSE:${PN}-vt6656-license = "Firmware-via_vt6656" + +FILES:${PN}-vt6656-license = "${nonarch_base_libdir}/firmware/LICENCE.via_vt6656" +FILES:${PN}-vt6656 = " \ + ${nonarch_base_libdir}/firmware/vntwusb.fw \ +" + +RDEPENDS:${PN}-vt6656 = "${PN}-vt6656-license" + +# For broadcom + +# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo -e " \${PN}-$pkg \\"; done | sort -u + +LICENSE:${PN}-broadcom-license = "Firmware-broadcom_bcm43xx" +FILES:${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx" + +# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo "$i - $pkg"; echo -e "FILES:\${PN}-$pkg = \"\${nonarch_base_libdir}/firmware/brcm/$i\""; done | grep ^FILES + +FILES:${PN}-bcm43xx = "${nonarch_base_libdir}/firmware/brcm/bcm43xx-0.fw" +FILES:${PN}-bcm43xx-hdr = "${nonarch_base_libdir}/firmware/brcm/bcm43xx_hdr-0.fw" +FILES:${PN}-bcm4329-fullmac = "${nonarch_base_libdir}/firmware/brcm/bcm4329-fullmac-4.bin" +FILES:${PN}-bcm43236b = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43236b.bin" +FILES:${PN}-bcm4329 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4329-sdio.bin" +FILES:${PN}-bcm4330 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4330-sdio.*" +FILES:${PN}-bcm4334 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4334-sdio.bin" +FILES:${PN}-bcm4335 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4335-sdio.bin" +FILES:${PN}-bcm4339 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4339-sdio.bin \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac4339-sdio.bin \ +" +FILES:${PN}-bcm43241b0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b0-sdio.bin" +FILES:${PN}-bcm43241b4 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b4-sdio.bin" +FILES:${PN}-bcm43241b5 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b5-sdio.bin" +FILES:${PN}-bcm43242a = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43242a.bin" +FILES:${PN}-bcm43143 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43143.bin \ + ${nonarch_base_libdir}/firmware/brcm/brcmfmac43143-sdio.bin \ +" +FILES:${PN}-bcm43430a0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430a0-sdio.*" +FILES:${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.* \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio.* \ +" +FILES:${PN}-bcm4350c2 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350c2-pcie.bin" +FILES:${PN}-bcm4350 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350-pcie.bin" +FILES:${PN}-bcm4356 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-sdio.* \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac4356-sdio.* \ +" +FILES:${PN}-bcm43569 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43569.bin" +FILES:${PN}-bcm43570 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43570-pcie.bin \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43570-pcie.bin \ +" +FILES:${PN}-bcm4358 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4358-pcie.bin" +FILES:${PN}-bcm43602 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.bin \ + ${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.ap.bin \ +" +FILES:${PN}-bcm4366b = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4366b-pcie.bin" +FILES:${PN}-bcm4366c = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4366c-pcie.bin" +FILES:${PN}-bcm4371 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4371-pcie.bin" + +# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo -e "LICENSE:\${PN}-$pkg = \"Firmware-broadcom_bcm43xx\"\nRDEPENDS_\${PN}-$pkg += \"\${PN}-broadcom-license\""; done +# Currently 1st one and last 6 have cypress LICENSE + +LICENSE:${PN}-bcm43xx = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43xx += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43xx-hdr = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43xx-hdr += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4329-fullmac = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4329-fullmac += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43236b = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43236b += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4329 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4329 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4330 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4330 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4334 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4334 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4335 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4335 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4339 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4339 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43241b0 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43241b0 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43241b4 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43241b4 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43241b5 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43241b5 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43242a = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43242a += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43143 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43143 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43430a0 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43430a0 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43455 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43455 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4350c2 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4350c2 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4350 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4350 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4356 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4356 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43569 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43569 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43570 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43570 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4358 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4358 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm43602 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm43602 += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4366b = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4366b += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4366c = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4366c += "${PN}-broadcom-license" +LICENSE:${PN}-bcm4371 = "Firmware-broadcom_bcm43xx" +RDEPENDS:${PN}-bcm4371 += "${PN}-broadcom-license" + +# For broadcom cypress + +LICENSE:${PN}-cypress-license = "Firmware-cypress" +FILES:${PN}-cypress-license = "${nonarch_base_libdir}/firmware/LICENCE.cypress" + +FILES:${PN}-bcm-0bb4-0306 = "${nonarch_base_libdir}/firmware/brcm/BCM-0bb4-0306.hcd" +FILES:${PN}-bcm43340 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43340-sdio.* \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43340-sdio.*" +FILES:${PN}-bcm43362 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43362-sdio.* \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43362-sdio.*" +FILES:${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.* \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.*" +FILES:${PN}-bcm4354 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4354-sdio.bin \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac4354-sdio.bin \ +" +FILES:${PN}-bcm4356-pcie = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-pcie.* \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac4356-pcie.* \ +" +FILES:${PN}-bcm4373 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4373-sdio.bin \ + ${nonarch_base_libdir}/firmware/brcm/brcmfmac4373.bin \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac4373-sdio.bin \ + ${nonarch_base_libdir}/firmware/brcm/brcmfmac4373-sdio.clm_blob \ +" + +LICENSE:${PN}-bcm-0bb4-0306 = "Firmware-cypress" +RDEPENDS:${PN}-bcm-0bb4-0306 += "${PN}-cypress-license" +LICENSE:${PN}-bcm43340 = "Firmware-cypress" +RDEPENDS:${PN}-bcm43340 += "${PN}-cypress-license" +LICENSE:${PN}-bcm43362 = "Firmware-cypress" +RDEPENDS:${PN}-bcm43362 += "${PN}-cypress-license" +LICENSE:${PN}-bcm43430 = "Firmware-cypress" +RDEPENDS:${PN}-bcm43430 += "${PN}-cypress-license" +LICENSE:${PN}-bcm4354 = "Firmware-cypress" +RDEPENDS:${PN}-bcm4354 += "${PN}-cypress-license" +LICENSE:${PN}-bcm4356-pcie = "Firmware-cypress" +RDEPENDS:${PN}-bcm4356-pcie += "${PN}-cypress-license" +LICENSE:${PN}-bcm4373 = "Firmware-cypress" +RDEPENDS:${PN}-bcm4373 += "${PN}-cypress-license" + +# For Broadcom bnx2-mips +# +# which is a separate case to the other Broadcom firmwares since its +# license is contained in the shared WHENCE file. + +LICENSE:${PN}-bnx2-mips = "WHENCE" +LICENSE:${PN}-whence-license = "WHENCE" + +FILES:${PN}-bnx2-mips = "${nonarch_base_libdir}/firmware/bnx2/bnx2-mips-09-6.2.1b.fw" +FILES:${PN}-whence-license = "${nonarch_base_libdir}/firmware/WHENCE" + +RDEPENDS:${PN}-bnx2-mips += "${PN}-whence-license" + +# For imx-sdma +LICENSE:${PN}-imx-sdma-imx6q = "Firmware-imx-sdma_firmware" +LICENSE:${PN}-imx-sdma-imx7d = "Firmware-imx-sdma_firmware" +LICENSE:${PN}-imx-sdma-license = "Firmware-imx-sdma_firmware" + +FILES:${PN}-imx-sdma-imx6q = "${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx6q.bin" + +RPROVIDES:${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q" +RREPLACES:${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q" +RCONFLICTS:${PN}-imx-sdma-imx6q = "firmware-imx-sdma-imx6q" + +FILES:${PN}-imx-sdma-imx7d = "${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx7d.bin" + +FILES:${PN}-imx-sdma-license = "${nonarch_base_libdir}/firmware/LICENSE.sdma_firmware" + +RDEPENDS:${PN}-imx-sdma-imx6q += "${PN}-imx-sdma-license" +RDEPENDS:${PN}-imx-sdma-imx7d += "${PN}-imx-sdma-license" + +# For iwlwifi +LICENSE:${PN}-iwlwifi = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-135-6 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-3160-7 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-3160-8 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-3160-9 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-3160-10 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-3160-12 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-3160-13 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-3160-16 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-3160-17 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-6000-4 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-6000g2a-5 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-6000g2a-6 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-6000g2b-5 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-6000g2b-6 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-6050-4 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-6050-5 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-7260 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-7265 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-7265d = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-8000c = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-8265 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-9000 = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-misc = "Firmware-iwlwifi_firmware" +LICENSE:${PN}-iwlwifi-license = "Firmware-iwlwifi_firmware" + + +FILES:${PN}-iwlwifi-license = "${nonarch_base_libdir}/firmware/LICENCE.iwlwifi_firmware" +FILES:${PN}-iwlwifi-135-6 = "${nonarch_base_libdir}/firmware/iwlwifi-135-6.ucode" +FILES:${PN}-iwlwifi-3160-7 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-7.ucode" +FILES:${PN}-iwlwifi-3160-8 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-8.ucode" +FILES:${PN}-iwlwifi-3160-9 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-9.ucode" +FILES:${PN}-iwlwifi-3160-10 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-10.ucode" +FILES:${PN}-iwlwifi-3160-12 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-12.ucode" +FILES:${PN}-iwlwifi-3160-13 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-13.ucode" +FILES:${PN}-iwlwifi-3160-16 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-16.ucode" +FILES:${PN}-iwlwifi-3160-17 = "${nonarch_base_libdir}/firmware/iwlwifi-3160-17.ucode" +FILES:${PN}-iwlwifi-6000-4 = "${nonarch_base_libdir}/firmware/iwlwifi-6000-4.ucode" +FILES:${PN}-iwlwifi-6000g2a-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2a-5.ucode" +FILES:${PN}-iwlwifi-6000g2a-6 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2a-6.ucode" +FILES:${PN}-iwlwifi-6000g2b-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2b-5.ucode" +FILES:${PN}-iwlwifi-6000g2b-6 = "${nonarch_base_libdir}/firmware/iwlwifi-6000g2b-6.ucode" +FILES:${PN}-iwlwifi-6050-4 = "${nonarch_base_libdir}/firmware/iwlwifi-6050-4.ucode" +FILES:${PN}-iwlwifi-6050-5 = "${nonarch_base_libdir}/firmware/iwlwifi-6050-5.ucode" +FILES:${PN}-iwlwifi-7260 = "${nonarch_base_libdir}/firmware/iwlwifi-7260-*.ucode" +FILES:${PN}-iwlwifi-7265 = "${nonarch_base_libdir}/firmware/iwlwifi-7265-*.ucode" +FILES:${PN}-iwlwifi-7265d = "${nonarch_base_libdir}/firmware/iwlwifi-7265D-*.ucode" +FILES:${PN}-iwlwifi-8000c = "${nonarch_base_libdir}/firmware/iwlwifi-8000C-*.ucode" +FILES:${PN}-iwlwifi-8265 = "${nonarch_base_libdir}/firmware/iwlwifi-8265-*.ucode" +FILES:${PN}-iwlwifi-9000 = "${nonarch_base_libdir}/firmware/iwlwifi-9000-*.ucode" +FILES:${PN}-iwlwifi-misc = "${nonarch_base_libdir}/firmware/iwlwifi-*.ucode" + +RDEPENDS:${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-3160-7 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-3160-8 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-3160-9 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-3160-10 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-3160-12 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-3160-13 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-3160-16 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-3160-17 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-6000-4 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-6000g2b-5 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-6050-4 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-6050-5 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-7260 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-7265 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-7265d = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-8000c = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-8265 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-9000 = "${PN}-iwlwifi-license" +RDEPENDS:${PN}-iwlwifi-misc = "${PN}-iwlwifi-license" + +# -iwlwifi-misc is a "catch all" package that includes all the iwlwifi +# firmwares that are not already included in other -iwlwifi- packages. +# -iwlwifi is a virtual package that depends upon all iwlwifi packages. +# These are distinct in order to allow the -misc firmwares to be installed +# without pulling in every other iwlwifi package. +ALLOW_EMPTY:${PN}-iwlwifi = "1" +ALLOW_EMPTY:${PN}-iwlwifi-misc = "1" + +# Handle package updating for the newly merged iwlwifi groupings +RPROVIDES:${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9" +RREPLACES:${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9" +RCONFLICTS:${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9" + +RPROVIDES:${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9" +RREPLACES:${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9" +RCONFLICTS:${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9" + +# For ibt +LICENSE:${PN}-ibt-license = "Firmware-ibt_firmware" +LICENSE:${PN}-ibt-hw-37-7 = "Firmware-ibt_firmware" +LICENSE:${PN}-ibt-hw-37-8 = "Firmware-ibt_firmware" +LICENSE:${PN}-ibt-11-5 = "Firmware-ibt_firmware" +LICENSE:${PN}-ibt-12-16 = "Firmware-ibt_firmware" +LICENSE:${PN}-ibt-17 = "Firmware-ibt_firmware" +LICENSE:${PN}-ibt-20 = "Firmware-ibt_firmware" +LICENSE:${PN}-ibt-misc = "Firmware-ibt_firmware" + +FILES:${PN}-ibt-license = "${nonarch_base_libdir}/firmware/LICENCE.ibt_firmware" +FILES:${PN}-ibt-hw-37-7 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.7*.bseq" +FILES:${PN}-ibt-hw-37-8 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.8*.bseq" +FILES:${PN}-ibt-11-5 = "${nonarch_base_libdir}/firmware/intel/ibt-11-5.sfi ${nonarch_base_libdir}/firmware/intel/ibt-11-5.ddc" +FILES:${PN}-ibt-12-16 = "${nonarch_base_libdir}/firmware/intel/ibt-12-16.sfi ${nonarch_base_libdir}/firmware/intel/ibt-12-16.ddc" +FILES:${PN}-ibt-17 = "${nonarch_base_libdir}/firmware/intel/ibt-17-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-17-*.ddc" +FILES:${PN}-ibt-20 = "${nonarch_base_libdir}/firmware/intel/ibt-20-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-20-*.ddc" +FILES:${PN}-ibt-misc = "${nonarch_base_libdir}/firmware/intel/ibt-*" + +RDEPENDS:${PN}-ibt-hw-37-7 = "${PN}-ibt-license" +RDEPENDS:${PN}-ibt-hw-37.8 = "${PN}-ibt-license" +RDEPENDS:${PN}-ibt-11-5 = "${PN}-ibt-license" +RDEPENDS:${PN}-ibt-12-16 = "${PN}-ibt-license" +RDEPENDS:${PN}-ibt-17 = "${PN}-ibt-license" +RDEPENDS:${PN}-ibt-20 = "${PN}-ibt-license" +RDEPENDS:${PN}-ibt-misc = "${PN}-ibt-license" + +ALLOW_EMPTY:${PN}-ibt= "1" +ALLOW_EMPTY:${PN}-ibt-misc = "1" + +LICENSE:${PN}-i915 = "Firmware-i915" +LICENSE:${PN}-i915-license = "Firmware-i915" +FILES:${PN}-i915-license = "${nonarch_base_libdir}/firmware/LICENSE.i915" +FILES:${PN}-i915 = "${nonarch_base_libdir}/firmware/i915" +RDEPENDS:${PN}-i915 = "${PN}-i915-license" + +LICENSE:${PN}-ice = "Firmware-ice" +LICENSE:${PN}-ice-license = "Firmware-ice" +FILES:${PN}-ice-license = "${nonarch_base_libdir}/firmware/LICENSE.ice" +FILES:${PN}-ice = "${nonarch_base_libdir}/firmware/intel/ice" +RDEPENDS:${PN}-ice = "${PN}-ice-license" + +FILES:${PN}-adsp-sst-license = "${nonarch_base_libdir}/firmware/LICENCE.adsp_sst" +LICENSE:${PN}-adsp-sst = "Firmware-adsp_sst" +LICENSE:${PN}-adsp-sst-license = "Firmware-adsp_sst" +FILES:${PN}-adsp-sst = "${nonarch_base_libdir}/firmware/intel/dsp_fw*" +RDEPENDS:${PN}-adsp-sst = "${PN}-adsp-sst-license" + +# For QAT +LICENSE:${PN}-qat = "Firmware-qat" +LICENSE:${PN}-qat-license = "Firmware-qat" +FILES:${PN}-qat-license = "${nonarch_base_libdir}/firmware/LICENCE.qat_firmware" +FILES:${PN}-qat = "${nonarch_base_libdir}/firmware/qat*.bin" +RDEPENDS:${PN}-qat = "${PN}-qat-license" + +# For QCOM VPU/GPU and SDM845 +LICENSE:${PN}-qcom-license = "Firmware-qcom" +FILES:${PN}-qcom-license = "${nonarch_base_libdir}/firmware/LICENSE.qcom ${nonarch_base_libdir}/firmware/qcom/NOTICE.txt" +FILES:${PN}-qcom-venus-1.8 = "${nonarch_base_libdir}/firmware/qcom/venus-1.8/*" +FILES:${PN}-qcom-venus-4.2 = "${nonarch_base_libdir}/firmware/qcom/venus-4.2/*" +FILES:${PN}-qcom-venus-5.2 = "${nonarch_base_libdir}/firmware/qcom/venus-5.2/*" +FILES:${PN}-qcom-venus-5.4 = "${nonarch_base_libdir}/firmware/qcom/venus-5.4/*" +FILES:${PN}-qcom-vpu-1.0 = "${nonarch_base_libdir}/firmware/qcom/vpu-1.0/*" +FILES:${PN}-qcom-vpu-2.0 = "${nonarch_base_libdir}/firmware/qcom/vpu-2.0/*" +FILES:${PN}-qcom-adreno-a3xx = "${nonarch_base_libdir}/firmware/qcom/a300_*.fw ${nonarch_base_libdir}/firmware/a300_*.fw" +FILES:${PN}-qcom-adreno-a530 = "${nonarch_base_libdir}/firmware/qcom/a530*.*" +FILES:${PN}-qcom-adreno-a630 = "${nonarch_base_libdir}/firmware/qcom/a630*.* ${nonarch_base_libdir}/firmware/qcom/sdm845/a630*.*" +FILES:${PN}-qcom-adreno-a650 = "${nonarch_base_libdir}/firmware/qcom/a650*.* ${nonarch_base_libdir}/firmware/qcom/sm8250/a650*.*" +FILES:${PN}-qcom-adreno-a660 = "${nonarch_base_libdir}/firmware/qcom/a660*.*" +FILES:${PN}-qcom-sdm845-audio = "${nonarch_base_libdir}/firmware/qcom/sdm845/adsp*.*" +FILES:${PN}-qcom-sdm845-compute = "${nonarch_base_libdir}/firmware/qcom/sdm845/cdsp*.*" +FILES:${PN}-qcom-sdm845-modem = "${nonarch_base_libdir}/firmware/qcom/sdm845/mba.mbn ${nonarch_base_libdir}/firmware/qcom/sdm845/modem*.* ${nonarch_base_libdir}/firmware/qcom/sdm845/wlanmdsp.mbn" +FILES:${PN}-qcom-sm8250-audio = "${nonarch_base_libdir}/firmware/qcom/sm8250/adsp*.*" +FILES:${PN}-qcom-sm8250-compute = "${nonarch_base_libdir}/firmware/qcom/sm8250/cdsp*.*" +RDEPENDS:${PN}-qcom-venus-1.8 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-venus-4.2 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-venus-5.2 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-venus-5.4 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-vpu-1.0 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-vpu-2.0 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-adreno-a3xx = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-adreno-a530 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-adreno-a630 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-adreno-a650 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-adreno-a660 = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-sdm845-audio = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-sdm845-compute = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-sdm845-modem = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-sm8250-audio = "${PN}-qcom-license" +RDEPENDS:${PN}-qcom-sm8250-compute = "${PN}-qcom-license" + +FILES:${PN}-liquidio = "${nonarch_base_libdir}/firmware/liquidio" + +# For Amlogic VDEC +LICENSE:${PN}-amlogic-vdec = "Firmware-amlogic_vdec" +FILES:${PN}-amlogic-vdec-license = "${nonarch_base_libdir}/firmware/LICENSE.amlogic_vdec" +FILES:${PN}-amlogic-vdec = "${nonarch_base_libdir}/firmware/meson/vdec/*" +RDEPENDS:${PN}-amlogic-vdec = "${PN}-amlogic-vdec-license" + +# For other firmwares +# Maybe split out to separate packages when needed. +LICENSE:${PN} = "\ + Firmware-Abilis \ + & Firmware-agere \ + & Firmware-amdgpu \ + & Firmware-amd-ucode \ + & Firmware-amlogic_vdec \ + & Firmware-atmel \ + & Firmware-ca0132 \ + & Firmware-cavium \ + & Firmware-chelsio_firmware \ + & Firmware-cw1200 \ + & Firmware-dib0700 \ + & Firmware-e100 \ + & Firmware-ene_firmware \ + & Firmware-fw_sst_0f28 \ + & Firmware-go7007 \ + & Firmware-hfi1_firmware \ + & Firmware-i2400m \ + & Firmware-ibt_firmware \ + & Firmware-it913x \ + & Firmware-IntcSST2 \ + & Firmware-kaweth \ + & Firmware-moxa \ + & Firmware-myri10ge_firmware \ + & Firmware-nvidia \ + & Firmware-OLPC \ + & Firmware-ath9k-htc \ + & Firmware-phanfw \ + & Firmware-qat \ + & Firmware-qcom \ + & Firmware-qla1280 \ + & Firmware-qla2xxx \ + & Firmware-r8a779x_usb3 \ + & Firmware-radeon \ + & Firmware-ralink_a_mediatek_company_firmware \ + & Firmware-ralink-firmware \ + & Firmware-imx-sdma_firmware \ + & Firmware-siano \ + & Firmware-tda7706-firmware \ + & Firmware-ti-connectivity \ + & Firmware-ti-keystone \ + & Firmware-ueagle-atm4-firmware \ + & Firmware-wl1251 \ + & Firmware-xc4000 \ + & Firmware-xc5000 \ + & Firmware-xc5000c \ + & WHENCE \ +" + +FILES:${PN}-license += "${nonarch_base_libdir}/firmware/LICEN*" +FILES:${PN} += "${nonarch_base_libdir}/firmware/*" +RDEPENDS:${PN} += "${PN}-license" +RDEPENDS:${PN} += "${PN}-whence-license" + +# Make linux-firmware depend on all of the split-out packages. +# Make linux-firmware-iwlwifi depend on all of the split-out iwlwifi packages. +# Make linux-firmware-ibt depend on all of the split-out ibt packages. +python populate_packages:prepend () { + firmware_pkgs = oe.utils.packages_filter_out_system(d) + d.appendVar('RRECOMMENDS:linux-firmware', ' ' + ' '.join(firmware_pkgs)) + + iwlwifi_pkgs = filter(lambda x: x.find('-iwlwifi-') != -1, firmware_pkgs) + d.appendVar('RRECOMMENDS:linux-firmware-iwlwifi', ' ' + ' '.join(iwlwifi_pkgs)) + + ibt_pkgs = filter(lambda x: x.find('-ibt-') != -1, firmware_pkgs) + d.appendVar('RRECOMMENDS:linux-firmware-ibt', ' ' + ' '.join(ibt_pkgs)) +} + +# Firmware files are generally not ran on the CPU, so they can be +# allarch despite being architecture specific +INSANE_SKIP = "arch" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb index a8b6aa203d..62d7494b88 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb @@ -11,13 +11,13 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "7f96d3fd60eea0ab38afdf07b3fc7c8c9f501802" -SRCREV_meta ?= "24ab54209a8822aad92afe2c51ea5b95f5175394" +SRCREV_machine ?= "88b754b80392e1f1ac7df46595f9712edc8aec02" +SRCREV_meta ?= "7767ab05bd3e525a287a7f9bfd780005b5eb25a3" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}" -LINUX_VERSION ?= "5.10.107" +LINUX_VERSION ?= "5.10.113" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb index 758260c3d8..e0c693fed2 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb @@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "5.10.107" +LINUX_VERSION ?= "5.10.113" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" @@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine:qemuarm ?= "d47f1b40f2f77d0c810defd853c69eb39cb84bf5" -SRCREV_machine ?= "1ae0844c6a36151066744e43fd30db3a946bc21d" -SRCREV_meta ?= "24ab54209a8822aad92afe2c51ea5b95f5175394" +SRCREV_machine:qemuarm ?= "7dacc8332b0bc5600d97583f45b841c9724f2191" +SRCREV_machine ?= "8dc46fa883d7b9a3412791f6731096e2e516d949" +SRCREV_meta ?= "7767ab05bd3e525a287a7f9bfd780005b5eb25a3" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb index 9c1bd26b36..e05a4769d1 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb @@ -13,17 +13,17 @@ KBRANCH:qemux86 ?= "v5.10/standard/base" KBRANCH:qemux86-64 ?= "v5.10/standard/base" KBRANCH:qemumips64 ?= "v5.10/standard/mti-malta64" -SRCREV_machine:qemuarm ?= "2ef8231651bb6a4c79b307f59a794b92238546ec" -SRCREV_machine:qemuarm64 ?= "00684b441f15d202c5849eed164a9b3b94a5c1e8" -SRCREV_machine:qemumips ?= "661a4f517906253e074fe301d68ff1e6b6968e9f" -SRCREV_machine:qemuppc ?= "bff933cb7a11019c64e6034c48ab79453f75b99e" -SRCREV_machine:qemuriscv64 ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27" -SRCREV_machine:qemuriscv32 ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27" -SRCREV_machine:qemux86 ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27" -SRCREV_machine:qemux86-64 ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27" -SRCREV_machine:qemumips64 ?= "7a89b456542ff1fa0ab71fa4a2ae6f04281f3a2d" -SRCREV_machine ?= "763c0dbc0458ebcb1d06afe2f324925f0f61bd27" -SRCREV_meta ?= "24ab54209a8822aad92afe2c51ea5b95f5175394" +SRCREV_machine:qemuarm ?= "6092497574895b1179a3c7a9e07c7f40c2d4c136" +SRCREV_machine:qemuarm64 ?= "97ad6c5f9ffdb6b108cbbf99d9061dd0fe03e4e8" +SRCREV_machine:qemumips ?= "e53b2d1867f7bdc2c0cc904a15992178688c3ad4" +SRCREV_machine:qemuppc ?= "b12ed76165bfc9fe2b99fcc224b5e0134b7b533f" +SRCREV_machine:qemuriscv64 ?= "a8b4c628f382412e5e7df5750f2be711df95fa06" +SRCREV_machine:qemuriscv32 ?= "a8b4c628f382412e5e7df5750f2be711df95fa06" +SRCREV_machine:qemux86 ?= "a8b4c628f382412e5e7df5750f2be711df95fa06" +SRCREV_machine:qemux86-64 ?= "a8b4c628f382412e5e7df5750f2be711df95fa06" +SRCREV_machine:qemumips64 ?= "07580586b738406b4dec9bf91d4eecdb933f2a07" +SRCREV_machine ?= "a8b4c628f382412e5e7df5750f2be711df95fa06" +SRCREV_meta ?= "7767ab05bd3e525a287a7f9bfd780005b5eb25a3" # remap qemuarm to qemuarma15 for the 5.8 kernel # KMACHINE:qemuarm ?= "qemuarma15" @@ -32,7 +32,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -LINUX_VERSION ?= "5.10.107" +LINUX_VERSION ?= "5.10.113" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" @@ -53,6 +53,9 @@ KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc" KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES:append:powerpc =" arch/powerpc/powerpc-debug.scc" +KERNEL_FEATURES:append:powerpc64 =" arch/powerpc/powerpc-debug.scc" +KERNEL_FEATURES:append:powerpc64le =" arch/powerpc/powerpc-debug.scc" KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}" diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-compaction-migratepages-event-name.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-compaction-migratepages-event-name.patch new file mode 100644 index 0000000000..e988f7a3d5 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-compaction-migratepages-event-name.patch @@ -0,0 +1,37 @@ +From c312bda00d2dc10ce5f6c1189acbefee5c6c8c6c Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Tue, 29 Mar 2022 16:34:07 -0400 +Subject: [PATCH 01/10] Fix: compaction migratepages event name + +The commit "fix: mm: compaction: fix the migration stats in trace_mm_compaction_migratepages() (v5.17)" + +Triggers this warning: + + LTTng: event provider mismatch: The event name needs to start with provider name + _ + one or more letter, provider: compaction, event name: mm_compaction_migratepages + +Upstream-Status: Backport + +Signed-off-by: Mathieu Desnoyers +Change-Id: I01c7485af765084dafb33bf33ae392e60bfbf1e7 +--- + include/instrumentation/events/compaction.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/include/instrumentation/events/compaction.h b/include/instrumentation/events/compaction.h +index 340e41f5..15964537 100644 +--- a/include/instrumentation/events/compaction.h ++++ b/include/instrumentation/events/compaction.h +@@ -98,7 +98,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template, + #endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */ + + #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) +-LTTNG_TRACEPOINT_EVENT(mm_compaction_migratepages, ++LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, ++ ++ compaction_migratepages, + + TP_PROTO(unsigned long nr_all, + unsigned int nr_succeeded), +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch deleted file mode 100644 index 4e52e5f122..0000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch +++ /dev/null @@ -1,394 +0,0 @@ -From 8be4c8a38ee1e297578e094a6e4c143ec5259aba Mon Sep 17 00:00:00 2001 -From: Michael Jeanson -Date: Mon, 13 Sep 2021 12:00:38 -0400 -Subject: [PATCH 1/2] fix: cpu/hotplug: Remove deprecated CPU-hotplug - functions. (v5.15) - -The CPU-hotplug functions get|put_online_cpus() were deprecated in v4.13 -and removed in v5.15. - -See upstream commits : - -commit 8c854303ce0e38e5bbedd725ff39da7e235865d8 -Author: Sebastian Andrzej Siewior -Date: Tue Aug 3 16:16:21 2021 +0200 - - cpu/hotplug: Remove deprecated CPU-hotplug functions. - - No users in tree use the deprecated CPU-hotplug functions anymore. - - Remove them. - -Introduced in v4.13 : - - commit 8f553c498e1772cccb39a114da4a498d22992758 - Author: Thomas Gleixner - Date: Wed May 24 10:15:12 2017 +0200 - - cpu/hotplug: Provide cpus_read|write_[un]lock() - - The counting 'rwsem' hackery of get|put_online_cpus() is going to be - replaced by percpu rwsem. - - Rename the functions to make it clear that it's locking and not some - refcount style interface. These new functions will be used for the - preparatory patches which make the code ready for the percpu rwsem - conversion. - - Rename all instances in the cpu hotplug code while at it. - -Upstream-Status: backport [https://git.lttng.org/?p=lttng-modules.git;a=commit;h=ffcc873470121ef1ebb110df3d9038a38d9cb7cb] - -Change-Id: I5a37cf5afc075a402b7347989fac637dfa60a1ed -Signed-off-by: Michael Jeanson -Signed-off-by: Mathieu Desnoyers ---- - include/wrapper/cpu.h | 44 +++++++++++++++++++++++ - src/lib/ringbuffer/ring_buffer_backend.c | 8 ++--- - src/lib/ringbuffer/ring_buffer_frontend.c | 17 ++++----- - src/lib/ringbuffer/ring_buffer_iterator.c | 15 ++++---- - src/lttng-context-perf-counters.c | 11 +++--- - src/lttng-statedump-impl.c | 6 ++-- - 6 files changed, 74 insertions(+), 27 deletions(-) - create mode 100644 include/wrapper/cpu.h - -diff --git a/include/wrapper/cpu.h b/include/wrapper/cpu.h -new file mode 100644 -index 00000000..cbee1962 ---- /dev/null -+++ b/include/wrapper/cpu.h -@@ -0,0 +1,44 @@ -+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) -+ * -+ * wrapper/cpu.h -+ * -+ * Copyright (C) 2021 Michael Jeanson -+ */ -+ -+#ifndef _LTTNG_WRAPPER_CPU_H -+#define _LTTNG_WRAPPER_CPU_H -+ -+#include -+#include -+ -+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0)) -+ -+static inline -+void lttng_cpus_read_lock(void) -+{ -+ cpus_read_lock(); -+} -+ -+static inline -+void lttng_cpus_read_unlock(void) -+{ -+ cpus_read_unlock(); -+} -+ -+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0) */ -+ -+static inline -+void lttng_cpus_read_lock(void) -+{ -+ get_online_cpus(); -+} -+ -+static inline -+void lttng_cpus_read_unlock(void) -+{ -+ put_online_cpus(); -+} -+ -+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0) */ -+ -+#endif /* _LTTNG_WRAPPER_CPU_H */ -diff --git a/src/lib/ringbuffer/ring_buffer_backend.c b/src/lib/ringbuffer/ring_buffer_backend.c -index 26efb2bc..9a339be0 100644 ---- a/src/lib/ringbuffer/ring_buffer_backend.c -+++ b/src/lib/ringbuffer/ring_buffer_backend.c -@@ -12,10 +12,10 @@ - #include - #include - #include --#include - #include - #include - -+#include - #include - #include /* for wrapper_vmalloc_sync_mappings() */ - #include -@@ -445,14 +445,14 @@ int channel_backend_init(struct channel_backend *chanb, - chanb->cpu_hp_notifier.priority = 5; - register_hotcpu_notifier(&chanb->cpu_hp_notifier); - -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(i) { - ret = lib_ring_buffer_create(per_cpu_ptr(chanb->buf, i), - chanb, i); - if (ret) - goto free_bufs; /* cpu hotplug locked */ - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #else - for_each_possible_cpu(i) { - ret = lib_ring_buffer_create(per_cpu_ptr(chanb->buf, i), -@@ -485,7 +485,7 @@ free_bufs: - */ - #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ - #ifdef CONFIG_HOTPLUG_CPU -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - unregister_hotcpu_notifier(&chanb->cpu_hp_notifier); - #endif - #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ -diff --git a/src/lib/ringbuffer/ring_buffer_frontend.c b/src/lib/ringbuffer/ring_buffer_frontend.c -index e9056118..87a575d0 100644 ---- a/src/lib/ringbuffer/ring_buffer_frontend.c -+++ b/src/lib/ringbuffer/ring_buffer_frontend.c -@@ -48,6 +48,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -724,7 +725,7 @@ static void channel_unregister_notifiers(struct lttng_kernel_ring_buffer_channel - int cpu; - - #ifdef CONFIG_HOTPLUG_CPU -- get_online_cpus(); -+ lttng_cpus_read_lock(); - chan->cpu_hp_enable = 0; - for_each_online_cpu(cpu) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, -@@ -732,7 +733,7 @@ static void channel_unregister_notifiers(struct lttng_kernel_ring_buffer_channel - lib_ring_buffer_stop_switch_timer(buf); - lib_ring_buffer_stop_read_timer(buf); - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - unregister_cpu_notifier(&chan->cpu_hp_notifier); - #else - for_each_possible_cpu(cpu) { -@@ -772,14 +773,14 @@ void lib_ring_buffer_set_quiescent_channel(struct lttng_kernel_ring_buffer_chann - const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config; - - if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_channel_cpu(cpu, chan) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, - cpu); - - lib_ring_buffer_set_quiescent(buf); - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - } else { - struct lttng_kernel_ring_buffer *buf = chan->backend.buf; - -@@ -794,14 +795,14 @@ void lib_ring_buffer_clear_quiescent_channel(struct lttng_kernel_ring_buffer_cha - const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config; - - if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_channel_cpu(cpu, chan) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, - cpu); - - lib_ring_buffer_clear_quiescent(buf); - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - } else { - struct lttng_kernel_ring_buffer *buf = chan->backend.buf; - -@@ -899,7 +900,7 @@ struct lttng_kernel_ring_buffer_channel *channel_create(const struct lttng_kerne - chan->cpu_hp_notifier.priority = 6; - register_cpu_notifier(&chan->cpu_hp_notifier); - -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(cpu) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, - cpu); -@@ -909,7 +910,7 @@ struct lttng_kernel_ring_buffer_channel *channel_create(const struct lttng_kerne - spin_unlock(&per_cpu(ring_buffer_nohz_lock, cpu)); - } - chan->cpu_hp_enable = 1; -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #else - for_each_possible_cpu(cpu) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, -diff --git a/src/lib/ringbuffer/ring_buffer_iterator.c b/src/lib/ringbuffer/ring_buffer_iterator.c -index 25839af6..60c95ca6 100644 ---- a/src/lib/ringbuffer/ring_buffer_iterator.c -+++ b/src/lib/ringbuffer/ring_buffer_iterator.c -@@ -10,6 +10,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -440,13 +441,13 @@ int channel_iterator_init(struct lttng_kernel_ring_buffer_channel *chan) - chan->hp_iter_notifier.priority = 10; - register_cpu_notifier(&chan->hp_iter_notifier); - -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(cpu) { - buf = per_cpu_ptr(chan->backend.buf, cpu); - lib_ring_buffer_iterator_init(chan, buf); - } - chan->hp_iter_enable = 1; -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #else - for_each_possible_cpu(cpu) { - buf = per_cpu_ptr(chan->backend.buf, cpu); -@@ -519,7 +520,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan) - CHAN_WARN_ON(chan, config->output != RING_BUFFER_ITERATOR); - - if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -- get_online_cpus(); -+ lttng_cpus_read_lock(); - /* Allow CPU hotplug to keep track of opened reader */ - chan->iter.read_open = 1; - for_each_channel_cpu(cpu, chan) { -@@ -529,7 +530,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan) - goto error; - buf->iter.read_open = 1; - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - } else { - buf = channel_get_ring_buffer(config, chan, 0); - ret = lib_ring_buffer_iterator_open(buf); -@@ -538,7 +539,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan) - error: - /* Error should always happen on CPU 0, hence no close is required. */ - CHAN_WARN_ON(chan, cpu != 0); -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - return ret; - } - EXPORT_SYMBOL_GPL(channel_iterator_open); -@@ -550,7 +551,7 @@ void channel_iterator_release(struct lttng_kernel_ring_buffer_channel *chan) - int cpu; - - if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_channel_cpu(cpu, chan) { - buf = channel_get_ring_buffer(config, chan, cpu); - if (buf->iter.read_open) { -@@ -559,7 +560,7 @@ void channel_iterator_release(struct lttng_kernel_ring_buffer_channel *chan) - } - } - chan->iter.read_open = 0; -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - } else { - buf = channel_get_ring_buffer(config, chan, 0); - lib_ring_buffer_iterator_release(buf); -diff --git a/src/lttng-context-perf-counters.c b/src/lttng-context-perf-counters.c -index b0227d47..372f05e0 100644 ---- a/src/lttng-context-perf-counters.c -+++ b/src/lttng-context-perf-counters.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -97,10 +98,10 @@ void lttng_destroy_perf_counter_ctx_field(void *priv) - { - int cpu; - -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(cpu) - perf_event_release_kernel(events[cpu]); -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #ifdef CONFIG_HOTPLUG_CPU - unregister_cpu_notifier(&perf_field->nb); - #endif -@@ -304,7 +305,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, - perf_field->nb.priority = 0; - register_cpu_notifier(&perf_field->nb); - #endif -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(cpu) { - events[cpu] = wrapper_perf_event_create_kernel_counter(attr, - cpu, NULL, overflow_callback); -@@ -317,7 +318,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, - goto counter_busy; - } - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - perf_field->hp_enable = 1; - } - #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ -@@ -351,7 +352,7 @@ counter_error: - if (events[cpu] && !IS_ERR(events[cpu])) - perf_event_release_kernel(events[cpu]); - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #ifdef CONFIG_HOTPLUG_CPU - unregister_cpu_notifier(&perf_field->nb); - #endif -diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c -index 4dfbca0b..2b42783a 100644 ---- a/src/lttng-statedump-impl.c -+++ b/src/lttng-statedump-impl.c -@@ -23,7 +23,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -34,6 +33,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -770,7 +770,7 @@ int do_lttng_statedump(struct lttng_kernel_session *session) - * is to guarantee that each CPU has been in a state where is was in - * syscall mode (i.e. not in a trap, an IRQ or a soft IRQ). - */ -- get_online_cpus(); -+ lttng_cpus_read_lock(); - atomic_set(&kernel_threads_to_run, num_online_cpus()); - for_each_online_cpu(cpu) { - INIT_DELAYED_WORK(&cpu_work[cpu], lttng_statedump_work_func); -@@ -778,7 +778,7 @@ int do_lttng_statedump(struct lttng_kernel_session *session) - } - /* Wait for all threads to run */ - __wait_event(statedump_wq, (atomic_read(&kernel_threads_to_run) == 0)); -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - /* Our work is done */ - trace_lttng_statedump_end(session); - return 0; --- -2.19.1 - diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch new file mode 100644 index 0000000000..00367eebf8 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch @@ -0,0 +1,48 @@ +From a7eb2e3d0a4beb1ee80b132927641dd05ef2d542 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Mon, 4 Apr 2022 15:49:32 -0400 +Subject: [PATCH 02/10] Fix: tracepoint event: allow same provider and event + name + +Using the same name for the provider (TRACE_SYSTEM) and event name +causes a compilation error because the same identifiers are emitted +twice. + +Fix this by prefixing the provider identifier with +"__provider_event_desc___". + +Upstream-Status: Backport + +Signed-off-by: Mathieu Desnoyers +Change-Id: I8cdf8f859e35b8bd5c19737860d12f1ed546dfc2 +--- + include/lttng/tracepoint-event-impl.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/lttng/tracepoint-event-impl.h b/include/lttng/tracepoint-event-impl.h +index 38b1dc43..dcb22247 100644 +--- a/include/lttng/tracepoint-event-impl.h ++++ b/include/lttng/tracepoint-event-impl.h +@@ -1255,7 +1255,7 @@ static const struct lttng_kernel_event_desc __event_desc___##_map = { \ + #define TP_ID1(_token, _system) _token##_system + #define TP_ID(_token, _system) TP_ID1(_token, _system) + +-static const struct lttng_kernel_event_desc * const TP_ID(__event_desc___, TRACE_SYSTEM)[] = { ++static const struct lttng_kernel_event_desc * const TP_ID(__provider_event_desc___, TRACE_SYSTEM)[] = { + #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + }; + +@@ -1274,8 +1274,8 @@ static const struct lttng_kernel_event_desc * const TP_ID(__event_desc___, TRACE + /* non-const because list head will be modified when registered. */ + static __used struct lttng_kernel_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = { + .provider_name = __stringify(TRACE_SYSTEM), +- .event_desc = TP_ID(__event_desc___, TRACE_SYSTEM), +- .nr_events = ARRAY_SIZE(TP_ID(__event_desc___, TRACE_SYSTEM)), ++ .event_desc = TP_ID(__provider_event_desc___, TRACE_SYSTEM), ++ .nr_events = ARRAY_SIZE(TP_ID(__provider_event_desc___, TRACE_SYSTEM)), + .head = { NULL, NULL }, + .lazy_init_head = { NULL, NULL }, + .lazy = 0, +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch deleted file mode 100644 index 5b5edc5319..0000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch +++ /dev/null @@ -1,829 +0,0 @@ -From c570be0da77e963d77bac099d468bc0cd5f1bd63 Mon Sep 17 00:00:00 2001 -From: Michael Jeanson -Date: Mon, 13 Sep 2021 14:16:22 -0400 -Subject: [PATCH 2/2] fix: Revert "Makefile: Enable -Wimplicit-fallthrough for - Clang" (v5.15) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Starting with v5.15, "-Wimplicit-fallthrough=5" was added to the build -flags which requires the use of "__attribute__((__fallthrough__))" to -annotate fallthrough case statements. - -See upstream commit by the man himself: - - commit d936eb23874433caa3e3d841cfa16f5434b85dcf - Author: Linus Torvalds - Date: Thu Jul 15 18:05:31 2021 -0700 - - Revert "Makefile: Enable -Wimplicit-fallthrough for Clang" - - This reverts commit b7eb335e26a9c7f258c96b3962c283c379d3ede0. - - It turns out that the problem with the clang -Wimplicit-fallthrough - warning is not about the kernel source code, but about clang itself, and - that the warning is unusable until clang fixes its broken ways. - - In particular, when you enable this warning for clang, you not only get - warnings about implicit fallthroughs. You also get this: - - warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] - - which is completely broken becasue it - - (a) doesn't even tell you where the problem is (seriously: no line - numbers, no filename, no nothing). - - (b) is fundamentally broken anyway, because there are perfectly valid - reasons to have a fallthrough statement even if it turns out that - it can perhaps not be reached. - - In the kernel, an example of that second case is code in the scheduler: - - switch (state) { - case cpuset: - if (IS_ENABLED(CONFIG_CPUSETS)) { - cpuset_cpus_allowed_fallback(p); - state = possible; - break; - } - fallthrough; - case possible: - - where if CONFIG_CPUSETS is enabled you actually never hit the - fallthrough case at all. But that in no way makes the fallthrough - wrong. - - So the warning is completely broken, and enabling it for clang is a very - bad idea. - - In the meantime, we can keep the gcc option enabled, and make the gcc - build use - - -Wimplicit-fallthrough=5 - - which means that we will at least continue to require a proper - fallthrough statement, and that gcc won't silently accept the magic - comment versions. Because gcc does this all correctly, and while the odd - "=5" part is kind of obscure, it's documented in [1]: - - "-Wimplicit-fallthrough=5 doesn’t recognize any comments as - fallthrough comments, only attributes disable the warning" - - so if clang ever fixes its bad behavior we can try enabling it there again. - -Upstream-Status: backport [https://git.lttng.org/?p=lttng-modules.git;a=commit;h=c190d76e8c7b44d62b3651ab845b765c1b1f8104] - -Change-Id: Iea69849592fb69ac04fb9bb28efcd6b8dce8ba88 -Signed-off-by: Michael Jeanson -Signed-off-by: Mathieu Desnoyers ---- - include/counter/counter-api.h | 4 +- - include/lttng/events-internal.h | 11 ++- - include/wrapper/compiler_attributes.h | 34 +++++++ - src/lib/counter/counter.c | 13 ++- - src/lttng-abi.c | 91 ++++++++++++------ - src/lttng-bytecode-interpreter.c | 4 +- - src/lttng-bytecode-specialize.c | 5 +- - src/lttng-events.c | 129 +++++++++++++++++--------- - src/lttng-string-utils.c | 3 +- - src/probes/lttng-kretprobes.c | 7 +- - 10 files changed, 215 insertions(+), 86 deletions(-) - create mode 100644 include/wrapper/compiler_attributes.h - -diff --git a/include/counter/counter-api.h b/include/counter/counter-api.h -index fbc65818..c9f2b141 100644 ---- a/include/counter/counter-api.h -+++ b/include/counter/counter-api.h -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - #include - - /* -@@ -256,7 +257,8 @@ static __always_inline int lttng_counter_add(const struct lib_counter_config *co - const size_t *dimension_indexes, int64_t v) - { - switch (config->alloc) { -- case COUNTER_ALLOC_PER_CPU: /* Fallthrough */ -+ case COUNTER_ALLOC_PER_CPU: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: - return __lttng_counter_add_percpu(config, counter, dimension_indexes, v); - case COUNTER_ALLOC_GLOBAL: -diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h -index cd560de8..ca2190c4 100644 ---- a/include/lttng/events-internal.h -+++ b/include/lttng/events-internal.h -@@ -8,6 +8,8 @@ - #ifndef _LTTNG_EVENTS_INTERNAL_H - #define _LTTNG_EVENTS_INTERNAL_H - -+#include -+ - #include - - struct lttng_syscall_filter; -@@ -561,9 +563,12 @@ static inline bool lttng_kernel_type_is_bytewise_integer(const struct lttng_kern - if (!type_integer) - return false; - switch (type_integer->size) { -- case 8: /* Fall-through. */ -- case 16: /* Fall-through. */ -- case 32: /* Fall-through. */ -+ case 8: -+ lttng_fallthrough; -+ case 16: -+ lttng_fallthrough; -+ case 32: -+ lttng_fallthrough; - case 64: - break; - default: -diff --git a/include/wrapper/compiler_attributes.h b/include/wrapper/compiler_attributes.h -new file mode 100644 -index 00000000..c2c96e76 ---- /dev/null -+++ b/include/wrapper/compiler_attributes.h -@@ -0,0 +1,34 @@ -+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) -+ * -+ * wrapper/compiler_attributes.h -+ * -+ * Copyright (C) 2021 Michael Jeanson -+ */ -+ -+#ifndef _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H -+#define _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H -+ -+#include -+ -+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0)) -+#include -+#endif -+ -+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0)) -+ -+/* -+ * Use the kernel provided fallthrough attribute macro. -+ */ -+#define lttng_fallthrough fallthrough -+ -+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0) */ -+ -+/* -+ * Fallback to the comment for kernels pre 5.15 that don't build with -+ * '-Wimplicit-fallthrough=5'. -+ */ -+#define lttng_fallthrough do {} while (0) /* fallthrough */ -+ -+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0) */ -+ -+#endif /* _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H */ -diff --git a/src/lib/counter/counter.c b/src/lib/counter/counter.c -index a4500a0e..bf038aac 100644 ---- a/src/lib/counter/counter.c -+++ b/src/lib/counter/counter.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -324,7 +325,8 @@ int lttng_counter_aggregate(const struct lib_counter_config *config, - *underflow = false; - - switch (config->alloc) { -- case COUNTER_ALLOC_GLOBAL: /* Fallthrough */ -+ case COUNTER_ALLOC_GLOBAL: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: - /* Read global counter. */ - ret = lttng_counter_read(config, counter, dimension_indexes, -@@ -342,7 +344,8 @@ int lttng_counter_aggregate(const struct lib_counter_config *config, - switch (config->alloc) { - case COUNTER_ALLOC_GLOBAL: - break; -- case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Fallthrough */ -+ case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU: - //TODO: integrate with CPU hotplug and online cpus - for (cpu = 0; cpu < num_possible_cpus(); cpu++) { -@@ -448,7 +451,8 @@ int lttng_counter_clear(const struct lib_counter_config *config, - int cpu, ret; - - switch (config->alloc) { -- case COUNTER_ALLOC_GLOBAL: /* Fallthrough */ -+ case COUNTER_ALLOC_GLOBAL: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: - /* Clear global counter. */ - ret = lttng_counter_clear_cpu(config, counter, dimension_indexes, -1); -@@ -462,7 +466,8 @@ int lttng_counter_clear(const struct lib_counter_config *config, - switch (config->alloc) { - case COUNTER_ALLOC_GLOBAL: - break; -- case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Fallthrough */ -+ case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU: - //TODO: integrate with CPU hotplug and online cpus - for (cpu = 0; cpu < num_possible_cpus(); cpu++) { -diff --git a/src/lttng-abi.c b/src/lttng-abi.c -index cc453894..eac1afd1 100644 ---- a/src/lttng-abi.c -+++ b/src/lttng-abi.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1332,7 +1333,8 @@ long lttng_metadata_ring_buffer_ioctl(struct file *filp, - */ - return -ENOSYS; - } -- case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */ -+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH: - { - struct lttng_metadata_stream *stream = filp->private_data; -@@ -1441,7 +1443,8 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp, - */ - return -ENOSYS; - } -- case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */ -+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH: - { - struct lttng_metadata_stream *stream = filp->private_data; -@@ -1758,8 +1761,10 @@ int lttng_abi_validate_event_param(struct lttng_kernel_abi_event *event_param) - switch (event_param->instrumentation) { - case LTTNG_KERNEL_ABI_SYSCALL: - switch (event_param->u.syscall.entryexit) { -- case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: /* Fall-through */ -- case LTTNG_KERNEL_ABI_SYSCALL_EXIT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT: - break; - default: -@@ -1783,20 +1788,26 @@ int lttng_abi_validate_event_param(struct lttng_kernel_abi_event *event_param) - switch (event_param->u.kretprobe.entryexit) { - case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT: - break; -- case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: /* Fall-through */ -- case LTTNG_KERNEL_ABI_SYSCALL_EXIT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT: -+ lttng_fallthrough; - default: - return -EINVAL; - } - break; - -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - return -EINVAL; - } -@@ -1830,18 +1841,23 @@ int lttng_abi_create_event(struct file *channel_file, - } - - switch (event_param->instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - fops = <tng_event_recorder_enabler_fops; - break; -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - fops = <tng_event_recorder_event_fops; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - return -EINVAL; - } -@@ -1867,7 +1883,8 @@ int lttng_abi_create_event(struct file *channel_file, - goto event_error; - - switch (event_param->instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - { - struct lttng_event_enabler *event_enabler; -@@ -1887,8 +1904,10 @@ int lttng_abi_create_event(struct file *channel_file, - break; - } - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - { - struct lttng_kernel_event_recorder *event; -@@ -1908,8 +1927,10 @@ int lttng_abi_create_event(struct file *channel_file, - break; - } - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - ret = -EINVAL; - goto event_error; -@@ -2043,18 +2064,23 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file, - } - - switch (event_notifier_param->event.instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - fops = <tng_event_notifier_enabler_fops; - break; -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - fops = <tng_event_notifier_event_fops; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - ret = -EINVAL; - goto inval_instr; -@@ -2086,7 +2112,8 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file, - goto event_notifier_error; - - switch (event_notifier_param->event.instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - { - struct lttng_event_notifier_enabler *enabler; -@@ -2110,8 +2137,10 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file, - break; - } - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - { - struct lttng_kernel_event_notifier *event_notifier; -@@ -2135,8 +2164,10 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file, - break; - } - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - ret = -EINVAL; - goto event_notifier_error; -diff --git a/src/lttng-bytecode-interpreter.c b/src/lttng-bytecode-interpreter.c -index b46a23b7..a2a932c6 100644 ---- a/src/lttng-bytecode-interpreter.c -+++ b/src/lttng-bytecode-interpreter.c -@@ -7,6 +7,7 @@ - * Copyright (C) 2010-2016 Mathieu Desnoyers - */ - -+#include - #include - #include - #include -@@ -421,7 +422,8 @@ static int dynamic_get_index(struct lttng_kernel_probe_ctx *lttng_probe_ctx, - } - break; - case LOAD_ROOT_CONTEXT: -- case LOAD_ROOT_APP_CONTEXT: /* Fall-through */ -+ lttng_fallthrough; -+ case LOAD_ROOT_APP_CONTEXT: - { - ret = context_get_index(lttng_probe_ctx, - &stack_top->u.ptr, -diff --git a/src/lttng-bytecode-specialize.c b/src/lttng-bytecode-specialize.c -index c4b9d04b..f8b5f19d 100644 ---- a/src/lttng-bytecode-specialize.c -+++ b/src/lttng-bytecode-specialize.c -@@ -8,6 +8,8 @@ - */ - - #include -+#include -+ - #include - #include - #include -@@ -271,7 +273,8 @@ static int specialize_get_index(struct bytecode_runtime *runtime, - } - case OBJECT_TYPE_STRUCT: - /* Only generated by the specialize phase. */ -- case OBJECT_TYPE_VARIANT: /* Fall-through */ -+ case OBJECT_TYPE_VARIANT: -+ lttng_fallthrough; - default: - printk(KERN_WARNING "LTTng: bytecode: Unexpected get index type %d", - (int) stack_top->load.object_type); -diff --git a/src/lttng-events.c b/src/lttng-events.c -index e785fe4d..230e3934 100644 ---- a/src/lttng-events.c -+++ b/src/lttng-events.c -@@ -28,6 +28,7 @@ - #include - #include - -+#include - #include - #include /* for wrapper_vmalloc_sync_mappings() */ - #include -@@ -659,12 +660,14 @@ int lttng_event_enable(struct lttng_kernel_event_common *event) - goto end; - } - switch (event->priv->instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - ret = -EINVAL; - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - WRITE_ONCE(event->enabled, 1); - break; -@@ -673,8 +676,10 @@ int lttng_event_enable(struct lttng_kernel_event_common *event) - ret = lttng_kretprobes_event_enable_state(event, 1); - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -719,12 +724,14 @@ int lttng_event_disable(struct lttng_kernel_event_common *event) - goto end; - } - switch (event->priv->instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - ret = -EINVAL; - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - WRITE_ONCE(event->enabled, 0); - break; -@@ -733,8 +740,10 @@ int lttng_event_disable(struct lttng_kernel_event_common *event) - ret = lttng_kretprobes_event_enable_state(event, 0); - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -873,15 +882,20 @@ struct lttng_kernel_event_recorder *_lttng_kernel_event_recorder_create(struct l - event_name = event_desc->event_name; - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_UPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - event_name = event_param->name; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -1093,8 +1107,10 @@ struct lttng_kernel_event_recorder *_lttng_kernel_event_recorder_create(struct l - WARN_ON_ONCE(!ret); - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -1141,15 +1157,20 @@ struct lttng_kernel_event_notifier *_lttng_event_notifier_create( - event_name = event_desc->event_name; - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_UPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - event_name = event_notifier_param->event.name; - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -1296,9 +1317,12 @@ struct lttng_kernel_event_notifier *_lttng_event_notifier_create( - WARN_ON_ONCE(!ret); - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -1423,14 +1447,18 @@ void register_event(struct lttng_kernel_event_recorder *event_recorder) - ret = lttng_syscall_filter_enable_event(event_recorder->chan, event_recorder); - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_UPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_KRETPROBE: - ret = 0; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1481,7 +1509,8 @@ int _lttng_event_unregister(struct lttng_kernel_event_recorder *event_recorder) - ret = 0; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1512,14 +1541,18 @@ void register_event_notifier(struct lttng_kernel_event_notifier *event_notifier) - ret = lttng_syscall_filter_enable_event_notifier(event_notifier); - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - ret = 0; - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1559,9 +1592,12 @@ int _lttng_event_notifier_unregister( - ret = lttng_syscall_filter_disable_event_notifier(event_notifier); - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1614,8 +1650,10 @@ void _lttng_event_destroy(struct lttng_kernel_event_common *event) - lttng_uprobes_destroy_event_private(event_recorder); - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1647,9 +1685,12 @@ void _lttng_event_destroy(struct lttng_kernel_event_common *event) - lttng_uprobes_destroy_event_notifier_private(event_notifier); - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -2713,7 +2754,8 @@ void lttng_session_sync_event_enablers(struct lttng_kernel_session *session) - int nr_filters = 0; - - switch (event_recorder_priv->parent.instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - /* Enable events */ - list_for_each_entry(enabler_ref, -@@ -2807,7 +2849,8 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group - int nr_filters = 0, nr_captures = 0; - - switch (event_notifier_priv->parent.instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - /* Enable event_notifiers */ - list_for_each_entry(enabler_ref, -@@ -3877,7 +3920,7 @@ int print_escaped_ctf_string(struct lttng_kernel_session *session, const char *s - if (ret) - goto error; - /* We still print the current char */ -- /* Fallthrough */ -+ lttng_fallthrough; - default: - ret = lttng_metadata_printf(session, "%c", cur); - break; -diff --git a/src/lttng-string-utils.c b/src/lttng-string-utils.c -index d9447903..65946193 100644 ---- a/src/lttng-string-utils.c -+++ b/src/lttng-string-utils.c -@@ -4,6 +4,7 @@ - */ - - #include -+#include - - #include - -@@ -302,7 +303,7 @@ retry: - p = pattern_get_char_at_cb(p_at, - pattern_get_char_at_cb_data); - -- /* Fall-through. */ -+ lttng_fallthrough; - default: - /* - * Default case which will compare the escaped -diff --git a/src/probes/lttng-kretprobes.c b/src/probes/lttng-kretprobes.c -index 0fa6a1bf..1d0a5ecb 100644 ---- a/src/probes/lttng-kretprobes.c -+++ b/src/probes/lttng-kretprobes.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -61,7 +62,8 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi, - return 0; - break; - } -- case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: /* Fall-through. */ -+ case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -90,7 +92,8 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi, - chan->ops->event_commit(&ctx); - break; - } -- case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: /* Fall-through. */ -+ case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } --- -2.19.1 - diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch new file mode 100644 index 0000000000..afe514de82 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch @@ -0,0 +1,183 @@ +From 8e52fd71e693619f7a58de2692e59f0c826e9988 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Mon, 4 Apr 2022 13:52:57 -0400 +Subject: [PATCH 03/10] fix: sched/tracing: Don't re-read p->state when + emitting sched_switch event (v5.18) + +See upstream commit : + + commit fa2c3254d7cfff5f7a916ab928a562d1165f17bb + Author: Valentin Schneider + Date: Thu Jan 20 16:25:19 2022 +0000 + + sched/tracing: Don't re-read p->state when emitting sched_switch event + + As of commit + + c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") + + the following sequence becomes possible: + + p->__state = TASK_INTERRUPTIBLE; + __schedule() + deactivate_task(p); + ttwu() + READ !p->on_rq + p->__state=TASK_WAKING + trace_sched_switch() + __trace_sched_switch_state() + task_state_index() + return 0; + + TASK_WAKING isn't in TASK_REPORT, so the task appears as TASK_RUNNING in + the trace event. + + Prevent this by pushing the value read from __schedule() down the trace + event. + +Upstream-Status: Backport + +Change-Id: I46743cd006be4b4d573cae2d77df7d6d16744d04 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/instrumentation/events/sched.h | 88 +++++++++++++++++++++++--- + 1 file changed, 78 insertions(+), 10 deletions(-) + +diff --git a/include/instrumentation/events/sched.h b/include/instrumentation/events/sched.h +index 91953a6f..339bec94 100644 +--- a/include/instrumentation/events/sched.h ++++ b/include/instrumentation/events/sched.h +@@ -20,7 +20,37 @@ + #ifndef _TRACE_SCHED_DEF_ + #define _TRACE_SCHED_DEF_ + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) ++ ++static inline long __trace_sched_switch_state(bool preempt, ++ unsigned int prev_state, ++ struct task_struct *p) ++{ ++ unsigned int state; ++ ++#ifdef CONFIG_SCHED_DEBUG ++ BUG_ON(p != current); ++#endif /* CONFIG_SCHED_DEBUG */ ++ ++ /* ++ * Preemption ignores task state, therefore preempted tasks are always ++ * RUNNING (we will not have dequeued if state != RUNNING). ++ */ ++ if (preempt) ++ return TASK_REPORT_MAX; ++ ++ /* ++ * task_state_index() uses fls() and returns a value from 0-8 range. ++ * Decrement it by 1 (except TASK_RUNNING state i.e 0) before using ++ * it for left shift operation to get the correct task->state ++ * mapping. ++ */ ++ state = __task_state_index(prev_state, p->exit_state); ++ ++ return state ? (1 << (state - 1)) : state; ++} ++ ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) + + static inline long __trace_sched_switch_state(bool preempt, struct task_struct *p) + { +@@ -321,43 +351,81 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup_new, + /* + * Tracepoint for task switches, performed by the scheduler: + */ ++ ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) + LTTNG_TRACEPOINT_EVENT(sched_switch, + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0)) + TP_PROTO(bool preempt, +- struct task_struct *prev, +- struct task_struct *next), ++ unsigned int prev_state, ++ struct task_struct *prev, ++ struct task_struct *next), + +- TP_ARGS(preempt, prev, next), ++ TP_ARGS(preempt, prev_state, prev, next), ++ ++ TP_FIELDS( ++ ctf_array_text(char, prev_comm, prev->comm, TASK_COMM_LEN) ++ ctf_integer(pid_t, prev_tid, prev->pid) ++ ctf_integer(int, prev_prio, prev->prio - MAX_RT_PRIO) ++#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM ++ ctf_enum(task_state, long, prev_state, __trace_sched_switch_state(preempt, prev_state, prev)) + #else +- TP_PROTO(struct task_struct *prev, ++ ctf_integer(long, prev_state, __trace_sched_switch_state(preempt, prev_state, prev)) ++#endif ++ ctf_array_text(char, next_comm, next->comm, TASK_COMM_LEN) ++ ctf_integer(pid_t, next_tid, next->pid) ++ ctf_integer(int, next_prio, next->prio - MAX_RT_PRIO) ++ ) ++) ++ ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0)) ++ ++LTTNG_TRACEPOINT_EVENT(sched_switch, ++ ++ TP_PROTO(bool preempt, ++ struct task_struct *prev, + struct task_struct *next), + +- TP_ARGS(prev, next), +-#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0)) */ ++ TP_ARGS(preempt, prev, next), + + TP_FIELDS( + ctf_array_text(char, prev_comm, prev->comm, TASK_COMM_LEN) + ctf_integer(pid_t, prev_tid, prev->pid) + ctf_integer(int, prev_prio, prev->prio - MAX_RT_PRIO) +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0)) + #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM + ctf_enum(task_state, long, prev_state, __trace_sched_switch_state(preempt, prev)) + #else + ctf_integer(long, prev_state, __trace_sched_switch_state(preempt, prev)) + #endif ++ ctf_array_text(char, next_comm, next->comm, TASK_COMM_LEN) ++ ctf_integer(pid_t, next_tid, next->pid) ++ ctf_integer(int, next_prio, next->prio - MAX_RT_PRIO) ++ ) ++) ++ + #else ++ ++LTTNG_TRACEPOINT_EVENT(sched_switch, ++ ++ TP_PROTO(struct task_struct *prev, ++ struct task_struct *next), ++ ++ TP_ARGS(prev, next), ++ ++ TP_FIELDS( ++ ctf_array_text(char, prev_comm, prev->comm, TASK_COMM_LEN) ++ ctf_integer(pid_t, prev_tid, prev->pid) ++ ctf_integer(int, prev_prio, prev->prio - MAX_RT_PRIO) + #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM + ctf_enum(task_state, long, prev_state, __trace_sched_switch_state(prev)) + #else + ctf_integer(long, prev_state, __trace_sched_switch_state(prev)) +-#endif + #endif + ctf_array_text(char, next_comm, next->comm, TASK_COMM_LEN) + ctf_integer(pid_t, next_tid, next->pid) + ctf_integer(int, next_prio, next->prio - MAX_RT_PRIO) + ) + ) ++#endif + + /* + * Tracepoint for a task being migrated: +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0004-fix-block-remove-genhd.h-v5.18.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-fix-block-remove-genhd.h-v5.18.patch new file mode 100644 index 0000000000..9248ffe4ff --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-fix-block-remove-genhd.h-v5.18.patch @@ -0,0 +1,45 @@ +From 868e0b6db59159197c2cec3550fa4ad5e6572bc5 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Mon, 4 Apr 2022 13:54:59 -0400 +Subject: [PATCH 04/10] fix: block: remove genhd.h (v5.18) + +See upstream commit : + + commit 322cbb50de711814c42fb088f6d31901502c711a + Author: Christoph Hellwig + Date: Mon Jan 24 10:39:13 2022 +0100 + + block: remove genhd.h + + There is no good reason to keep genhd.h separate from the main blkdev.h + header that includes it. So fold the contents of genhd.h into blkdev.h + and remove genhd.h entirely. + +Upstream-Status: Backport + +Change-Id: I7cf2aaa3a4c133320b95f2edde49f790f9515dbd +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/wrapper/genhd.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/include/wrapper/genhd.h b/include/wrapper/genhd.h +index 3c6dbcbe..4a59b68e 100644 +--- a/include/wrapper/genhd.h ++++ b/include/wrapper/genhd.h +@@ -12,7 +12,11 @@ + #ifndef _LTTNG_WRAPPER_GENHD_H + #define _LTTNG_WRAPPER_GENHD_H + ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) ++#include ++#else + #include ++#endif + + #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) + #define LTTNG_GENHD_FL_HIDDEN GENHD_FL_HIDDEN +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch new file mode 100644 index 0000000000..0751827613 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch @@ -0,0 +1,79 @@ +From 2bc7cb7193124d20aa4e1b5dbad0410bfb97a470 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Mon, 4 Apr 2022 14:12:13 -0400 +Subject: [PATCH 05/10] fix: scsi: block: Remove REQ_OP_WRITE_SAME support + (v5.18) + +See upstream commit : + + commit 73bd66d9c834220579c881a3eb020fd8917075d8 + Author: Christoph Hellwig + Date: Wed Feb 9 09:28:28 2022 +0100 + + scsi: block: Remove REQ_OP_WRITE_SAME support + + No more users of REQ_OP_WRITE_SAME or drivers implementing it are left, + so remove the infrastructure. + +Upstream-Status: Backport + +Change-Id: Ifbff71f79f8b590436fc7cb79f82d90c6e033d84 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/instrumentation/events/block.h | 32 ++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/include/instrumentation/events/block.h b/include/instrumentation/events/block.h +index 3e1104d7..050a59a2 100644 +--- a/include/instrumentation/events/block.h ++++ b/include/instrumentation/events/block.h +@@ -66,6 +66,37 @@ LTTNG_TRACEPOINT_ENUM(block_rq_type, + #define lttng_bio_op(bio) bio_op(bio) + #define lttng_bio_rw(bio) ((bio)->bi_opf) + ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) ++#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM ++#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ ++ ctf_enum(block_rq_type, type, rwbs, \ ++ ( (op) == REQ_OP_WRITE ? RWBS_FLAG_WRITE : \ ++ ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \ ++ ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \ ++ ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \ ++ ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \ ++ ( 0 )))))) \ ++ | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \ ++ | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \ ++ | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \ ++ | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \ ++ | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0)) ++#else ++#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ ++ ctf_integer(type, rwbs, \ ++ ( (op) == REQ_OP_WRITE ? RWBS_FLAG_WRITE : \ ++ ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \ ++ ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \ ++ ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \ ++ ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \ ++ ( 0 )))))) \ ++ | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \ ++ | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \ ++ | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \ ++ | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \ ++ | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0)) ++#endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */ ++#else + #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM + #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ + ctf_enum(block_rq_type, type, rwbs, \ +@@ -95,6 +126,7 @@ LTTNG_TRACEPOINT_ENUM(block_rq_type, + | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \ + | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0)) + #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */ ++#endif + + #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0)) + +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-remove-unused-tracepoints-v5.18.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-remove-unused-tracepoints-v5.18.patch new file mode 100644 index 0000000000..9c2f70d4af --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0006-fix-random-remove-unused-tracepoints-v5.18.patch @@ -0,0 +1,47 @@ +From 369d82bb1746447514c877088d7c5fd0f39140f8 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Mon, 4 Apr 2022 14:33:42 -0400 +Subject: [PATCH 06/10] fix: random: remove unused tracepoints (v5.18) + +See upstream commit : + + commit 14c174633f349cb41ea90c2c0aaddac157012f74 + Author: Jason A. Donenfeld + Date: Thu Feb 10 16:40:44 2022 +0100 + + random: remove unused tracepoints + + These explicit tracepoints aren't really used and show sign of aging. + It's work to keep these up to date, and before I attempted to keep them + up to date, they weren't up to date, which indicates that they're not + really used. These days there are better ways of introspecting anyway. + +Upstream-Status: Backport + +Change-Id: I3b8c3e2732e7efdd76ce63204ac53a48784d0df6 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + src/probes/Kbuild | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/probes/Kbuild b/src/probes/Kbuild +index e26b4359..8d6ff0f2 100644 +--- a/src/probes/Kbuild ++++ b/src/probes/Kbuild +@@ -187,8 +187,11 @@ ifneq ($(CONFIG_FRAME_WARN),0) + CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200 + endif + ++# Introduced in v3.6, remove in v5.18 + obj-$(CONFIG_LTTNG) += $(shell \ +- if [ $(VERSION) -ge 4 \ ++ if [ \( ! \( $(VERSION) -ge 6 -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) \) \ ++ -a \ ++ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \ +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch new file mode 100644 index 0000000000..effd37ffe1 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch @@ -0,0 +1,72 @@ +From 3c46ddc134621dba65030263aa321dd6bdae3ba3 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Mon, 4 Apr 2022 15:02:10 -0400 +Subject: [PATCH 07/10] fix: kprobes: Use rethook for kretprobe if possible + (v5.18) + +See upstream commit : + + commit 73f9b911faa74ac5107879de05c9489c419f41bb + Author: Masami Hiramatsu + Date: Sat Mar 26 11:27:05 2022 +0900 + + kprobes: Use rethook for kretprobe if possible + + Use rethook for kretprobe function return hooking if the arch sets + CONFIG_HAVE_RETHOOK=y. In this case, CONFIG_KRETPROBE_ON_RETHOOK is + set to 'y' automatically, and the kretprobe internal data fields + switches to use rethook. If not, it continues to use kretprobe + specific function return hooks. + +Upstream-Status: Backport + +Change-Id: I2b7670dc04e4769c1e3c372582ad2f555f6d7a66 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/wrapper/kprobes.h | 17 +++++++++++++++++ + src/probes/lttng-kretprobes.c | 2 +- + 2 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/include/wrapper/kprobes.h b/include/wrapper/kprobes.h +index b546d615..51d32b7c 100644 +--- a/include/wrapper/kprobes.h ++++ b/include/wrapper/kprobes.h +@@ -29,4 +29,21 @@ struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri) + + #endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */ + ++ ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) ++static inline ++unsigned long lttng_get_kretprobe_retaddr(struct kretprobe_instance *ri) ++{ ++ return get_kretprobe_retaddr(ri); ++} ++ ++#else ++ ++static inline ++unsigned long lttng_get_kretprobe_retaddr(struct kretprobe_instance *ri) ++{ ++ return (unsigned long) ri->ret_addr; ++} ++#endif ++ + #endif /* _LTTNG_WRAPPER_KPROBES_H */ +diff --git a/src/probes/lttng-kretprobes.c b/src/probes/lttng-kretprobes.c +index 5cb2e953..565df739 100644 +--- a/src/probes/lttng-kretprobes.c ++++ b/src/probes/lttng-kretprobes.c +@@ -81,7 +81,7 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi, + int ret; + + payload.ip = (unsigned long) lttng_get_kretprobe(krpi)->kp.addr; +- payload.parent_ip = (unsigned long) krpi->ret_addr; ++ payload.parent_ip = lttng_get_kretprobe_retaddr(krpi); + + lib_ring_buffer_ctx_init(&ctx, event_recorder, sizeof(payload), + lttng_alignof(payload), <tng_probe_ctx); +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch new file mode 100644 index 0000000000..13c504b859 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch @@ -0,0 +1,44 @@ +From e8d2f286b5b208ac8870d0a9c167b170e96169b3 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Mon, 4 Apr 2022 15:08:48 -0400 +Subject: [PATCH 08/10] fix: scsi: core: Remove (v5.18) + +See upstream commit : + + commit 26440303310591e29121964ede0048583cb3126d + Author: Christoph Hellwig + Date: Thu Feb 24 18:55:52 2022 +0100 + + scsi: core: Remove + + This header is empty now except for an include of , so + remove it. + +Upstream-Status: Backport + +Change-Id: Ic8ee3352f1e8bddfcd44c31be9b788db82f183aa +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/instrumentation/events/block.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/instrumentation/events/block.h b/include/instrumentation/events/block.h +index 050a59a2..882e6e08 100644 +--- a/include/instrumentation/events/block.h ++++ b/include/instrumentation/events/block.h +@@ -11,9 +11,9 @@ + #include + #include + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) ++#if LTTNG_KERNEL_RANGE(4,11,0, 5,18,0) + #include +-#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */ ++#endif /* LTTNG_KERNEL_RANGE(4,11,0, 5,18,0) */ + + #ifndef _TRACE_BLOCK_DEF_ + #define _TRACE_BLOCK_DEF_ +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0009-Rename-genhd-wrapper-to-blkdev.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0009-Rename-genhd-wrapper-to-blkdev.patch new file mode 100644 index 0000000000..90fec9dc58 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0009-Rename-genhd-wrapper-to-blkdev.patch @@ -0,0 +1,76 @@ +From 82fbf9d383ff9069808fb0f5f75c660098dbae52 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Tue, 5 Apr 2022 14:57:41 -0400 +Subject: [PATCH 09/10] Rename genhd wrapper to blkdev + +The genhd.h header was folded into blkdev.h in v5.18, rename our wrapper +to follow upstream. + +Upstream-Status: Backport + +Change-Id: I4ec94fb94d11712dd20f0680aea1de77fbfa9d17 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/wrapper/{genhd.h => blkdev.h} | 10 +++++----- + src/lttng-statedump-impl.c | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + rename include/wrapper/{genhd.h => blkdev.h} (93%) + +diff --git a/include/wrapper/genhd.h b/include/wrapper/blkdev.h +similarity index 93% +rename from include/wrapper/genhd.h +rename to include/wrapper/blkdev.h +index 4a59b68e..0d5ad90f 100644 +--- a/include/wrapper/genhd.h ++++ b/include/wrapper/blkdev.h +@@ -1,6 +1,6 @@ + /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) + * +- * wrapper/genhd.h ++ * wrapper/blkdev.h + * + * wrapper around block layer functions and data structures. Using + * KALLSYMS to get its address when available, else we need to have a +@@ -9,8 +9,8 @@ + * Copyright (C) 2011-2014 Mathieu Desnoyers + */ + +-#ifndef _LTTNG_WRAPPER_GENHD_H +-#define _LTTNG_WRAPPER_GENHD_H ++#ifndef _LTTNG_WRAPPER_BLKDEV_H ++#define _LTTNG_WRAPPER_BLKDEV_H + + #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) + #include +@@ -45,7 +45,7 @@ struct class *wrapper_get_block_class(void) + /* + * Canary function to check for 'block_class' at compile time. + * +- * From 'include/linux/genhd.h': ++ * From 'include/linux/blkdev.h': + * + * extern struct class block_class; + */ +@@ -104,4 +104,4 @@ struct device_type *wrapper_get_disk_type(void) + + #endif + +-#endif /* _LTTNG_WRAPPER_GENHD_H */ ++#endif /* _LTTNG_WRAPPER_BLKDEV_H */ +diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c +index 4d7b2921..0e753090 100644 +--- a/src/lttng-statedump-impl.c ++++ b/src/lttng-statedump-impl.c +@@ -41,7 +41,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch new file mode 100644 index 0000000000..892d3f0d23 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch @@ -0,0 +1,106 @@ +From f9208dc00756dfa0a2f191799722030bdf3f793d Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Mon, 4 Apr 2022 15:14:01 -0400 +Subject: [PATCH 10/10] fix: mm: compaction: cleanup the compaction trace + events (v5.18) + +See upstream commit : + + commit abd4349ff9b8d242376b67711254221f64f447c7 + Author: Baolin Wang + Date: Tue Mar 22 14:45:56 2022 -0700 + + mm: compaction: cleanup the compaction trace events + + As Steven suggested [1], we should access the pointers from the trace + event to avoid dereferencing them to the tracepoint function when the + tracepoint is disabled. + + [1] https://lkml.org/lkml/2021/11/3/409 + +Upstream-Status: Backport + +Change-Id: I6c08250df8596e8dbc76780ae5d95c899c12e6fe +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/instrumentation/events/compaction.h | 17 ++++++++++++++++- + src/probes/Kbuild | 17 ++++++++++++++++- + src/probes/lttng-probe-compaction.c | 5 +++++ + 3 files changed, 37 insertions(+), 2 deletions(-) + +diff --git a/include/instrumentation/events/compaction.h b/include/instrumentation/events/compaction.h +index 15964537..ecae39a8 100644 +--- a/include/instrumentation/events/compaction.h ++++ b/include/instrumentation/events/compaction.h +@@ -97,7 +97,22 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template, + + #endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */ + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) ++LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, ++ ++ compaction_migratepages, ++ ++ TP_PROTO(struct compact_control *cc, ++ unsigned int nr_succeeded), ++ ++ TP_ARGS(cc, nr_succeeded), ++ ++ TP_FIELDS( ++ ctf_integer(unsigned long, nr_migrated, nr_succeeded) ++ ctf_integer(unsigned long, nr_failed, cc->nr_migratepages - nr_succeeded) ++ ) ++) ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) + LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, + + compaction_migratepages, +diff --git a/src/probes/Kbuild b/src/probes/Kbuild +index 8d6ff0f2..54784477 100644 +--- a/src/probes/Kbuild ++++ b/src/probes/Kbuild +@@ -167,7 +167,22 @@ ifneq ($(CONFIG_BTRFS_FS),) + endif # $(wildcard $(btrfs_dep)) + endif # CONFIG_BTRFS_FS + +-obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o ++# A dependency on internal header 'mm/internal.h' was introduced in v5.18 ++compaction_dep = $(srctree)/mm/internal.h ++compaction_dep_wildcard = $(wildcard $(compaction_dep)) ++compaction_dep_check = $(shell \ ++if [ \( $(VERSION) -ge 6 \ ++ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) -a \ ++ -z "$(compaction_dep_wildcard)" ] ; then \ ++ echo "warn" ; \ ++else \ ++ echo "ok" ; \ ++fi ;) ++ifeq ($(compaction_dep_check),ok) ++ obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o ++else ++ $(warning Files $(compaction_dep) not found. Probe "compaction" is disabled. Use full kernel source tree to enable it.) ++endif # $(wildcard $(compaction_dep)) + + ifneq ($(CONFIG_EXT4_FS),) + ext4_dep = $(srctree)/fs/ext4/*.h +diff --git a/src/probes/lttng-probe-compaction.c b/src/probes/lttng-probe-compaction.c +index f8ddf384..ffaf45f0 100644 +--- a/src/probes/lttng-probe-compaction.c ++++ b/src/probes/lttng-probe-compaction.c +@@ -10,6 +10,11 @@ + + #include + #include ++#include ++ ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) ++#include "../mm/internal.h" ++#endif + + /* + * Create the tracepoint static inlines from the kernel to validate that our +-- +2.19.1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb deleted file mode 100644 index 6dfde8dcad..0000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb +++ /dev/null @@ -1,47 +0,0 @@ -SECTION = "devel" -SUMMARY = "Linux Trace Toolkit KERNEL MODULE" -DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" -HOMEPAGE = "https://lttng.org/" -LICENSE = "LGPLv2.1 & GPLv2 & MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4" - -inherit module - -include lttng-platforms.inc - -SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ - file://0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch \ - file://0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch \ - " -# Use :append here so that the patch is applied also when using devupstream -SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch" - -SRC_URI[sha256sum] = "5ebf2b3cd128b3a1c8afaea1e98d5a6f7f0676fd524fcf72361c34d9dc603356" - -export INSTALL_MOD_DIR="kernel/lttng-modules" - -EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'" - -MODULES_MODULE_SYMVERS_LOCATION = "src" - -do_install:append() { - # Delete empty directories to avoid QA failures if no modules were built - if [ -d ${D}/${nonarch_base_libdir} ]; then - find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \; - fi -} - -python do_package:prepend() { - if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')): - bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN')) -} - -BBCLASSEXTEND = "devupstream:target" -LIC_FILES_CHKSUM:class-devupstream = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4" -DEFAULT_PREFERENCE:class-devupstream = "-1" -SRC_URI:class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.13" - -SRCREV:class-devupstream = "c570be0da77e963d77bac099d468bc0cd5f1bd63" -PV:class-devupstream = "2.13.0+git${SRCPV}" -S:class-devupstream = "${WORKDIR}/git" -SRCREV_FORMAT ?= "lttng_git" diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.3.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.3.bb new file mode 100644 index 0000000000..c33920e0d0 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.3.bb @@ -0,0 +1,56 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit KERNEL MODULE" +DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" +HOMEPAGE = "https://lttng.org/" +LICENSE = "LGPLv2.1 & GPLv2 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4" + +inherit module + +include lttng-platforms.inc + +SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ + file://0001-Fix-compaction-migratepages-event-name.patch \ + file://0002-Fix-tracepoint-event-allow-same-provider-and-event-n.patch \ + file://0003-fix-sched-tracing-Don-t-re-read-p-state-when-emittin.patch \ + file://0004-fix-block-remove-genhd.h-v5.18.patch \ + file://0005-fix-scsi-block-Remove-REQ_OP_WRITE_SAME-support-v5.1.patch \ + file://0006-fix-random-remove-unused-tracepoints-v5.18.patch \ + file://0007-fix-kprobes-Use-rethook-for-kretprobe-if-possible-v5.patch \ + file://0008-fix-scsi-core-Remove-scsi-scsi_request.h-v5.18.patch \ + file://0009-Rename-genhd-wrapper-to-blkdev.patch \ + file://0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch \ + " + +# Use :append here so that the patch is applied also when using devupstream +SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch" + +SRC_URI[sha256sum] = "7cf1acbb50b84116acc9b4281b81dcc2643d6018bbd1e8514ad1270239896c4b" + +export INSTALL_MOD_DIR="kernel/lttng-modules" + +EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'" + +MODULES_MODULE_SYMVERS_LOCATION = "src" + +do_install:append() { + # Delete empty directories to avoid QA failures if no modules were built + if [ -d ${D}/${nonarch_base_libdir} ]; then + find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \; + fi +} + +python do_package:prepend() { + if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')): + bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN')) +} + +BBCLASSEXTEND = "devupstream:target" +LIC_FILES_CHKSUM:class-devupstream = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4" +DEFAULT_PREFERENCE:class-devupstream = "-1" +SRC_URI:class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.13" + +SRCREV:class-devupstream = "c570be0da77e963d77bac099d468bc0cd5f1bd63" +PV:class-devupstream = "2.13.0+git${SRCPV}" +S:class-devupstream = "${WORKDIR}/git" +SRCREV_FORMAT ?= "lttng_git" diff --git a/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py index 5ddf0f144f..09ba3328a7 100755 --- a/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py +++ b/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py @@ -33,10 +33,10 @@ if os.path.exists(outfile): with open(infile, 'r') as file: data = file.read() -preamble_regex = re.compile( '^(.*?)^struct', re.MULTILINE | re.DOTALL ) +preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL ) preamble = re.search( preamble_regex, data ) -struct_block_regex = re.compile( '^struct.*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) +struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL ) cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL ) name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL ) @@ -45,22 +45,25 @@ name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL ) # types and then their fields. entry_dict = {} for struct in re.findall( struct_block_regex, data ): - # print( "struct: %s %s" % (struct[0],struct[1]) ) - entry_dict[struct[1]] = {} - entry_dict[struct[1]]['type'] = struct[0] - entry_dict[struct[1]]['fields'] = {} - for entry in re.findall( field_regex, struct[2] ): + # print( "struct: %s %s %s" % (struct[0],struct[1],struct[2]) ) + entry_dict[struct[2]] = {} + entry_dict[struct[2]]['type_prefix'] = struct[0] + entry_dict[struct[2]]['type'] = struct[1] + entry_dict[struct[2]]['fields'] = {} + for entry in re.findall( field_regex, struct[3] ): #print( " entry: %s" % entry ) cpuid = re.search( cpuid_regex, entry ) if cpuid: #print( " cpuid found: %s" % cpuid.group(1) ) - entry_dict[struct[1]]['fields'][cpuid.group(1)] = entry - + entry_dict[struct[2]]['fields'][cpuid.group(1)] = entry + name = re.search( name_regex, entry ) if name: #print( " name found: %s" % name.group(1) ) - entry_dict[struct[1]]['fields'][name.group(1)] = entry - + entry_dict[struct[2]]['fields'][name.group(1)] = entry + + if not entry_dict[struct[2]]['fields']: + entry_dict[struct[2]]['fields']['0'] = entry # created ordered dictionaries from the captured values. These are ordered by # a sorted() iteration of the keys. We don't care about the order we read @@ -72,6 +75,7 @@ for struct in re.findall( struct_block_regex, data ): entry_dict_sorted = OrderedDict() for i in sorted(entry_dict.keys()): entry_dict_sorted[i] = {} + entry_dict_sorted[i]['type_prefix'] = entry_dict[i]['type_prefix'] entry_dict_sorted[i]['type'] = entry_dict[i]['type'] entry_dict_sorted[i]['fields'] = {} for f in sorted(entry_dict[i]['fields'].keys()): @@ -83,7 +87,7 @@ outf = open( outfile, 'w' ) print( preamble.group(1) ) outf.write( preamble.group(1) ) for d in entry_dict_sorted: - outf.write( "struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'],d) ) + outf.write( "%s %s %s[] = {\n" % (entry_dict_sorted[d]['type_prefix'], entry_dict_sorted[d]['type'],d) ) for f in entry_dict_sorted[d]['fields']: outf.write( entry_dict_sorted[d]['fields'][f] + '\n' ) diff --git a/poky/meta/recipes-kernel/wireless-regdb/wireless-regdb_2022.02.18.bb b/poky/meta/recipes-kernel/wireless-regdb/wireless-regdb_2022.02.18.bb deleted file mode 100644 index 801a6f0584..0000000000 --- a/poky/meta/recipes-kernel/wireless-regdb/wireless-regdb_2022.02.18.bb +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "Wireless Central Regulatory Domain Database" -HOMEPAGE = "https://wireless.wiki.kernel.org/en/developers/regulatory/crda" -SECTION = "net" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c" - -SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz" -SRC_URI[sha256sum] = "8828c25a4ee25020044004f57374bb9deac852809fad70f8d3d01770bf9ac97f" - -inherit bin_package allarch - -do_install() { - install -d -m0755 ${D}${nonarch_libdir}/crda - install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys - install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin - install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem - - install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db - install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s -} - -# Install static regulatory DB in /lib/firmware for kernel to load. -# This requires Linux kernel >= v4.15. -# For kernel <= v4.14, inherit the kernel_wireless_regdb.bbclass -# (in meta-networking) in kernel's recipe. -PACKAGES = "${PN}-static ${PN}" -RCONFLICTS:${PN} = "${PN}-static" - -FILES:${PN}-static = " \ - ${nonarch_base_libdir}/firmware/regulatory.db \ - ${nonarch_base_libdir}/firmware/regulatory.db.p7s \ -" - -# Native users might want to use the source of regulatory DB. -# This is for example used by Linux kernel <= v4.14 and -# kernel_wireless_regdb.bbclass in meta-networking. -do_install:append:class-native() { - install -m 0644 -D db.txt ${D}${libdir}/crda/db.txt -} - -RSUGGESTS:${PN} = "crda" - -BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-kernel/wireless-regdb/wireless-regdb_2022.04.08.bb b/poky/meta/recipes-kernel/wireless-regdb/wireless-regdb_2022.04.08.bb new file mode 100644 index 0000000000..cd42039680 --- /dev/null +++ b/poky/meta/recipes-kernel/wireless-regdb/wireless-regdb_2022.04.08.bb @@ -0,0 +1,43 @@ +SUMMARY = "Wireless Central Regulatory Domain Database" +HOMEPAGE = "https://wireless.wiki.kernel.org/en/developers/regulatory/crda" +SECTION = "net" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c" + +SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz" +SRC_URI[sha256sum] = "884ba2e3c1e8b98762b6dc25ff60b5ec75c8d33a39e019b3ed4aa615491460d3" + +inherit bin_package allarch + +do_install() { + install -d -m0755 ${D}${nonarch_libdir}/crda + install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys + install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin + install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem + + install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db + install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s +} + +# Install static regulatory DB in /lib/firmware for kernel to load. +# This requires Linux kernel >= v4.15. +# For kernel <= v4.14, inherit the kernel_wireless_regdb.bbclass +# (in meta-networking) in kernel's recipe. +PACKAGES = "${PN}-static ${PN}" +RCONFLICTS:${PN} = "${PN}-static" + +FILES:${PN}-static = " \ + ${nonarch_base_libdir}/firmware/regulatory.db \ + ${nonarch_base_libdir}/firmware/regulatory.db.p7s \ +" + +# Native users might want to use the source of regulatory DB. +# This is for example used by Linux kernel <= v4.14 and +# kernel_wireless_regdb.bbclass in meta-networking. +do_install:append:class-native() { + install -m 0644 -D db.txt ${D}${libdir}/crda/db.txt +} + +RSUGGESTS:${PN} = "crda" + +BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb b/poky/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb index 540f4f79f4..e6fe83a186 100644 --- a/poky/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb +++ b/poky/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb @@ -71,6 +71,7 @@ python do_compile() { } python do_install() { + d.delVarFlag("autotools_do_install", "cleandirs") for subdir in d.getVar("PACKAGECONFIG").split(): subdir = subdir.replace("--", "/") bb.note("Installing %s" % subdir) diff --git a/poky/meta/recipes-multimedia/libtiff/tiff/0002-tiffcrop-fix-issue-380-and-382-heap-buffer-overflow-.patch b/poky/meta/recipes-multimedia/libtiff/tiff/0002-tiffcrop-fix-issue-380-and-382-heap-buffer-overflow-.patch index d31e9650d1..812ffb232d 100644 --- a/poky/meta/recipes-multimedia/libtiff/tiff/0002-tiffcrop-fix-issue-380-and-382-heap-buffer-overflow-.patch +++ b/poky/meta/recipes-multimedia/libtiff/tiff/0002-tiffcrop-fix-issue-380-and-382-heap-buffer-overflow-.patch @@ -1,4 +1,5 @@ CVE: CVE-2022-0891 +CVE: CVE-2022-1056 Upstream-Status: Backport Signed-off-by: Ross Burton diff --git a/poky/meta/recipes-support/gmp/gmp_6.2.1.bb b/poky/meta/recipes-support/gmp/gmp_6.2.1.bb index e61582afdf..091a390511 100644 --- a/poky/meta/recipes-support/gmp/gmp_6.2.1.bb +++ b/poky/meta/recipes-support/gmp/gmp_6.2.1.bb @@ -2,9 +2,11 @@ require gmp.inc LICENSE = "GPLv2+ | LGPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYINGv3;md5=11cc2d3ee574f9d6b7ee797bdce4d423 \ " REVISION = "" diff --git a/poky/meta/recipes-support/vim/vim.inc b/poky/meta/recipes-support/vim/vim.inc index a05e91fe20..087153c1d6 100644 --- a/poky/meta/recipes-support/vim/vim.inc +++ b/poky/meta/recipes-support/vim/vim.inc @@ -11,7 +11,7 @@ RSUGGESTS:${PN} = "diffutils" LICENSE = "vim" LIC_FILES_CHKSUM = "file://LICENSE;md5=6b30ea4fa660c483b619924bc709ef99 \ - file://runtime/doc/uganda.txt;md5=a3f193c20c6faff93c69185d5d070535" + file://runtime/doc/uganda.txt;md5=daf48235bb824c77fe8ae88d5f575f74" SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ file://disable_acl_header_check.patch \ @@ -21,8 +21,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ file://racefix.patch \ " -PV .= ".4524" -SRCREV = "d8f8629b1bf566e1dada7515e9b146c69e5d9757" +PV .= ".4912" +SRCREV = "a7583c42cd6b64fd276a5d7bb0db5ce7bfafa730" # Do not consider .z in x.y.z, as that is updated with every commit UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+)\.0" diff --git a/poky/scripts/git b/poky/scripts/git new file mode 100755 index 0000000000..644055e540 --- /dev/null +++ b/poky/scripts/git @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Wrapper around 'git' that doesn't think we are root + +import os +import shutil +import sys + +os.environ['PSEUDO_UNLOAD'] = '1' + +# calculate path to the real 'git' +path = os.environ['PATH'] +# we need to remove our path but also any other copy of this script which +# may be present, e.g. eSDK. +replacements = [os.path.dirname(sys.argv[0])] +for p in path.split(":"): + if p.endswith("/scripts"): + replacements.append(p) +for r in replacements: + path = path.replace(r, '/ignoreme') +real_git = shutil.which('git', path=path) + +if len(sys.argv) == 1: + os.execl(real_git, 'git') + +os.execv(real_git, sys.argv) diff --git a/poky/scripts/lib/wic/plugins/source/rootfs.py b/poky/scripts/lib/wic/plugins/source/rootfs.py index 2e34e715ca..25bb41dd70 100644 --- a/poky/scripts/lib/wic/plugins/source/rootfs.py +++ b/poky/scripts/lib/wic/plugins/source/rootfs.py @@ -50,7 +50,7 @@ class RootfsPlugin(SourcePlugin): @staticmethod def __get_rootfs_dir(rootfs_dir): - if os.path.isdir(rootfs_dir): + if rootfs_dir and os.path.isdir(rootfs_dir): return os.path.realpath(rootfs_dir) image_rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", rootfs_dir) @@ -96,6 +96,9 @@ class RootfsPlugin(SourcePlugin): part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir) part.has_fstab = os.path.exists(os.path.join(part.rootfs_dir, "etc/fstab")) pseudo_dir = os.path.join(part.rootfs_dir, "../pseudo") + if not os.path.lexists(pseudo_dir): + pseudo_dir = os.path.join(cls.__get_rootfs_dir(None), '../pseudo') + if not os.path.lexists(pseudo_dir): logger.warn("%s folder does not exist. " "Usernames and permissions will be invalid " % pseudo_dir) diff --git a/poky/scripts/runqemu b/poky/scripts/runqemu index 66e035c9af..1663fd829d 100755 --- a/poky/scripts/runqemu +++ b/poky/scripts/runqemu @@ -805,7 +805,7 @@ class BaseConfig(object): self.set('QB_MEM', qb_mem) mach = self.get('MACHINE') - if not mach.startswith('qemumips'): + if not mach.startswith(('qemumips', 'qemux86')): self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M' self.qemu_opt_script += ' %s' % self.get('QB_MEM') -- cgit v1.2.3