diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2026-09-10 15:06:52 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 15:06:52 -0300 |
| commit | ba990f26cb6cbbc8b0ec4a719faf914adaf58fa6 (patch) | |
| tree | bf55cbf7a25bdd402dfd66be865d541648f596c3 | |
| parent | def11d13fc3b72f136385eb5a2c2c3e54fb9d581 (diff) | |
| parent | ace8929de3c377335bc7caf8532203d4ef5745e5 (diff) | |
| download | meta-freescale-ba990f26cb6cbbc8b0ec4a719faf914adaf58fa6.tar.gz | |
Merge pull request #2679 from lucianogdittgen/oelint-task-noanonpython
Remove or document the layer's anonymous python functions
| -rw-r--r-- | classes/image_populate_mfgtool.bbclass | 3 | ||||
| -rw-r--r-- | classes/qoriq_build_64bit_kernel.bbclass | 4 | ||||
| -rw-r--r-- | recipes-bsp/firmware-imx/imx-boot-firmware-files_8.32.bb | 10 | ||||
| -rw-r--r-- | recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb | 3 | ||||
| -rw-r--r-- | recipes-devtools/qemu/qemu-qoriq_4.2.bb | 6 | ||||
| -rw-r--r-- | recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | 60 | ||||
| -rw-r--r-- | recipes-graphics/mali/mali-imx.inc | 53 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-imx_6.18.bb | 3 |
8 files changed, 82 insertions, 60 deletions
diff --git a/classes/image_populate_mfgtool.bbclass b/classes/image_populate_mfgtool.bbclass index 43f5fd704..ee3d52226 100644 --- a/classes/image_populate_mfgtool.bbclass +++ b/classes/image_populate_mfgtool.bbclass | |||
| @@ -59,6 +59,9 @@ do_populate_mfgtool[dirs] += "${DEPLOY_DIR_IMAGE} ${WORKDIR}" | |||
| 59 | do_populate_mfgtool[recrdeptask] += "do_deploy" | 59 | do_populate_mfgtool[recrdeptask] += "do_deploy" |
| 60 | do_populate_mfgtool[depends] += "uuu-bin:do_populate_sysroot" | 60 | do_populate_mfgtool[depends] += "uuu-bin:do_populate_sysroot" |
| 61 | 61 | ||
| 62 | # MFGTOOLCONFIG is parsed like PACKAGECONFIG: BitBake cannot enumerate varflags | ||
| 63 | # declaratively, and do_populate_mfgtool[depends] must exist before the task graph. | ||
| 64 | # nooelint: oelint.task.noanonpython | ||
| 62 | python () { | 65 | python () { |
| 63 | depends = [] | 66 | depends = [] |
| 64 | deploy_files = "" | 67 | deploy_files = "" |
diff --git a/classes/qoriq_build_64bit_kernel.bbclass b/classes/qoriq_build_64bit_kernel.bbclass index ec71e64f7..ca4592a1d 100644 --- a/classes/qoriq_build_64bit_kernel.bbclass +++ b/classes/qoriq_build_64bit_kernel.bbclass | |||
| @@ -3,7 +3,9 @@ REQUIRED_DISTRO_FEATURES:append:e6500 = " multiarch" | |||
| 3 | 3 | ||
| 4 | # BUILD_64BIT_KERNEL is this class's interface, not a machine override: any | 4 | # BUILD_64BIT_KERNEL is this class's interface, not a machine override: any |
| 5 | # machine that sets it gets the promotion, and in-tree only e6500.inc does. | 5 | # machine that sets it gets the promotion, and in-tree only e6500.inc does. |
| 6 | # nooelint: oelint.vars.noncoreoverride | 6 | # KERNEL_CC, KERNEL_LD and KERNEL_AR are replaced only when the flag is set; |
| 7 | # expressing that declaratively means restating kernel.bbclass defaults here. | ||
| 8 | # nooelint: oelint.vars.noncoreoverride oelint.task.noanonpython | ||
| 7 | python () { | 9 | python () { |
| 8 | promote_kernel = d.getVar('BUILD_64BIT_KERNEL', False) | 10 | promote_kernel = d.getVar('BUILD_64BIT_KERNEL', False) |
| 9 | if promote_kernel == "1": | 11 | if promote_kernel == "1": |
diff --git a/recipes-bsp/firmware-imx/imx-boot-firmware-files_8.32.bb b/recipes-bsp/firmware-imx/imx-boot-firmware-files_8.32.bb index e0219ca8d..c56a9968f 100644 --- a/recipes-bsp/firmware-imx/imx-boot-firmware-files_8.32.bb +++ b/recipes-bsp/firmware-imx/imx-boot-firmware-files_8.32.bb | |||
| @@ -41,13 +41,9 @@ deploy_for_mx9() { | |||
| 41 | } | 41 | } |
| 42 | deploy_for_mx9[doc] = "Deploy the Synopsys DDR firmware used by the i.MX 9 boot container" | 42 | deploy_for_mx9[doc] = "Deploy the Synopsys DDR firmware used by the i.MX 9 boot container" |
| 43 | 43 | ||
| 44 | python () { | 44 | # do_deploy calls deploy_for_$soc through the shell, so BitBake cannot see the |
| 45 | # Manually add the required functions as dependencies otherwise they won't be included in the | 45 | # dependency on the function body by itself. |
| 46 | # final run script. | 46 | do_deploy[vardeps] += "${@' '.join('deploy_for_' + soc for soc in d.getVar('DEPLOY_FOR').split())}" |
| 47 | deploy_for = d.getVar('DEPLOY_FOR', True).split() | ||
| 48 | for soc in deploy_for: | ||
| 49 | d.appendVarFlag('do_deploy', 'vardeps', ' deploy_for_%s' % soc) | ||
| 50 | } | ||
| 51 | 47 | ||
| 52 | do_deploy () { | 48 | do_deploy () { |
| 53 | for soc in ${DEPLOY_FOR}; do | 49 | for soc in ${DEPLOY_FOR}; do |
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb b/recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb index 2dd3c782a..3375a01de 100644 --- a/recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb +++ b/recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb | |||
| @@ -39,6 +39,9 @@ inherit fsl-u-boot-localversion | |||
| 39 | B = "${UNPACKDIR}/build" | 39 | B = "${UNPACKDIR}/build" |
| 40 | LOCALVERSION = "+fsl" | 40 | LOCALVERSION = "+fsl" |
| 41 | 41 | ||
| 42 | # A machine in this family needs a multilib cross toolchain. When the | ||
| 43 | # configuration builds none, only a parse-time raise can drop the recipe. | ||
| 44 | # nooelint: oelint.task.noanonpython | ||
| 42 | python () { | 45 | python () { |
| 43 | if d.getVar("TCMODE") == "external-fsl": | 46 | if d.getVar("TCMODE") == "external-fsl": |
| 44 | return | 47 | return |
diff --git a/recipes-devtools/qemu/qemu-qoriq_4.2.bb b/recipes-devtools/qemu/qemu-qoriq_4.2.bb index 6beb41480..cdb9f69e1 100644 --- a/recipes-devtools/qemu/qemu-qoriq_4.2.bb +++ b/recipes-devtools/qemu/qemu-qoriq_4.2.bb | |||
| @@ -4,6 +4,8 @@ COMPATIBLE_MACHINE = "(qoriq)" | |||
| 4 | 4 | ||
| 5 | DEPENDS += "bison-native glib-2.0 pixman zlib" | 5 | DEPENDS += "bison-native glib-2.0 pixman zlib" |
| 6 | 6 | ||
| 7 | PROVIDES += "qemu" | ||
| 8 | |||
| 7 | SRC_URI = "gitsm://github.com/nxp-qoriq/qemu;protocol=https;nobranch=1 \ | 9 | SRC_URI = "gitsm://github.com/nxp-qoriq/qemu;protocol=https;nobranch=1 \ |
| 8 | file://powerpc_rom.bin \ | 10 | file://powerpc_rom.bin \ |
| 9 | file://run-ptest \ | 11 | file://run-ptest \ |
| @@ -12,8 +14,10 @@ SRC_URI = "gitsm://github.com/nxp-qoriq/qemu;protocol=https;nobranch=1 \ | |||
| 12 | 14 | ||
| 13 | SRCREV = "a46ddbbe661677dcfa342f00ab7ab71e5f6f1a09" | 15 | SRCREV = "a46ddbbe661677dcfa342f00ab7ab71e5f6f1a09" |
| 14 | 16 | ||
| 17 | # The rename must follow PACKAGES, not a copy of it: BitBake cannot generate | ||
| 18 | # RPROVIDES:<pkg> variable names declaratively. | ||
| 19 | # nooelint: oelint.task.noanonpython | ||
| 15 | python() { | 20 | python() { |
| 16 | d.appendVar('PROVIDES', ' ' + d.getVar('BPN').replace('-qoriq', '')) | ||
| 17 | pkgs = d.getVar('PACKAGES').split() | 21 | pkgs = d.getVar('PACKAGES').split() |
| 18 | for p in pkgs: | 22 | for p in pkgs: |
| 19 | if '-qoriq' in p: | 23 | if '-qoriq' in p: |
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc index 6876d7c57..a126d11af 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | |||
| @@ -73,7 +73,8 @@ PACKAGECONFIG ?= "" | |||
| 73 | # Enables valgrind annotations for libgal-imx | 73 | # Enables valgrind annotations for libgal-imx |
| 74 | PACKAGECONFIG[valgrind] = "" | 74 | PACKAGECONFIG[valgrind] = "" |
| 75 | 75 | ||
| 76 | # Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below | 76 | # Note: if you add a package here, see the Debian-rename block at the end of |
| 77 | # this file to prevent a naming conflict. | ||
| 77 | PACKAGES =+ "\ | 78 | PACKAGES =+ "\ |
| 78 | libgles1-imx libgles1-imx-dev \ | 79 | libgles1-imx libgles1-imx-dev \ |
| 79 | libgles2-imx libgles2-imx-dev \ | 80 | libgles2-imx libgles2-imx-dev \ |
| @@ -115,6 +116,9 @@ PACKAGES_VULKAN:mx8mm-nxp-bsp = "libvulkan-imx libvulkan-imx-dev" | |||
| 115 | # recognised even when the current parse does not activate those conditions. | 116 | # recognised even when the current parse does not activate those conditions. |
| 116 | PACKAGES_DYNAMIC += "^libgbm-imx ^libvulkan-imx ^libopenvx-imx" | 117 | PACKAGES_DYNAMIC += "^libgbm-imx ^libvulkan-imx ^libopenvx-imx" |
| 117 | 118 | ||
| 119 | # MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT is a machine capability flag that a | ||
| 120 | # machine conf may set on its own, so COMPATIBLE_MACHINE cannot express this skip. | ||
| 121 | # nooelint: oelint.task.noanonpython | ||
| 118 | python __anonymous () { | 122 | python __anonymous () { |
| 119 | has_vivante_kernel_driver_support = (d.getVar('MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT') or '0') | 123 | has_vivante_kernel_driver_support = (d.getVar('MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT') or '0') |
| 120 | if has_vivante_kernel_driver_support != '1': | 124 | if has_vivante_kernel_driver_support != '1': |
| @@ -134,33 +138,10 @@ INHIBIT_SYSROOT_STRIP = "1" | |||
| 134 | REALSOLIBS := "${SOLIBS}" | 138 | REALSOLIBS := "${SOLIBS}" |
| 135 | SOLIBS = "${SOLIBSDEV}" | 139 | SOLIBS = "${SOLIBSDEV}" |
| 136 | 140 | ||
| 137 | python __anonymous() { | 141 | # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have |
| 138 | # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have | 142 | # the source we cannot fix it. Disable the insane check for now. |
| 139 | # the source we cannot fix it. Disable the insane check for now. | 143 | # nooelint: oelint.vars.insaneskip |
| 140 | packages = d.getVar('PACKAGES').split() | 144 | INSANE_SKIP += "ldflags" |
| 141 | for p in packages: | ||
| 142 | d.appendVar("INSANE_SKIP:%s" % p, " ldflags") | ||
| 143 | |||
| 144 | # For the packages that make up the OpenGL interfaces, inject variables so that | ||
| 145 | # they don't get Debian-renamed (which would remove the -imx suffix). | ||
| 146 | for p in (("libegl", "libegl1"), | ||
| 147 | ("libgles1", "libglesv1-cm1"), ("libgles2", "libglesv2-2"), | ||
| 148 | ("libgles3",), ("libgbm",)): | ||
| 149 | fullp = p[0] + "-imx" | ||
| 150 | pkgs = "".join(' %s' % i for i in p) | ||
| 151 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
| 152 | d.appendVar("RREPLACES:" + fullp, pkgs) | ||
| 153 | d.appendVar("RPROVIDES:" + fullp, pkgs) | ||
| 154 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | ||
| 155 | |||
| 156 | # For -dev, the first element is both the Debian and original name | ||
| 157 | fullp += "-dev" | ||
| 158 | pkgs = p[0] + "-dev" | ||
| 159 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
| 160 | d.appendVar("RREPLACES:" + fullp, pkgs) | ||
| 161 | d.appendVar("RPROVIDES:" + fullp, pkgs) | ||
| 162 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | ||
| 163 | } | ||
| 164 | 145 | ||
| 165 | IS_MX6SL = "0" | 146 | IS_MX6SL = "0" |
| 166 | IS_MX6SL:mx6sl-nxp-bsp = "1" | 147 | IS_MX6SL:mx6sl-nxp-bsp = "1" |
| @@ -418,3 +399,26 @@ INSANE_SKIP:imx-gpu-viv-demos += "rpaths dev-deps" | |||
| 418 | # nooelint: oelint.vars.insaneskip | 399 | # nooelint: oelint.vars.insaneskip |
| 419 | INSANE_SKIP:append:libc-musl = " file-rdeps" | 400 | INSANE_SKIP:append:libc-musl = " file-rdeps" |
| 420 | 401 | ||
| 402 | # The OpenGL interface packages keep their -imx suffix: Debian renaming would | ||
| 403 | # drop it and collide with the generic mesa package names. | ||
| 404 | DEBIAN_NOAUTONAME:libegl-imx = "1" | ||
| 405 | DEBIAN_NOAUTONAME:libegl-imx-dev = "1" | ||
| 406 | DEBIAN_NOAUTONAME:libgles1-imx = "1" | ||
| 407 | DEBIAN_NOAUTONAME:libgles1-imx-dev = "1" | ||
| 408 | DEBIAN_NOAUTONAME:libgles2-imx = "1" | ||
| 409 | DEBIAN_NOAUTONAME:libgles2-imx-dev = "1" | ||
| 410 | DEBIAN_NOAUTONAME:libgles3-imx-dev = "1" | ||
| 411 | DEBIAN_NOAUTONAME:libgbm-imx = "1" | ||
| 412 | DEBIAN_NOAUTONAME:libgbm-imx-dev = "1" | ||
| 413 | |||
| 414 | # The generic names stay provided: consumers that dlopen a GL backend depend on | ||
| 415 | # them by name rather than through shlibs, as cogl-1.0 does for libgles2. | ||
| 416 | RPROVIDES:libegl-imx += "libegl" | ||
| 417 | RPROVIDES:libegl-imx-dev += "libegl-dev" | ||
| 418 | RPROVIDES:libgles1-imx += "libgles1" | ||
| 419 | RPROVIDES:libgles1-imx-dev += "libgles1-dev" | ||
| 420 | RPROVIDES:libgles2-imx += "libgles2" | ||
| 421 | RPROVIDES:libgles2-imx-dev += "libgles2-dev" | ||
| 422 | RPROVIDES:libgles3-imx-dev += "libgles3-dev" | ||
| 423 | RPROVIDES:libgbm-imx += "libgbm" | ||
| 424 | RPROVIDES:libgbm-imx-dev += "libgbm-dev" | ||
diff --git a/recipes-graphics/mali/mali-imx.inc b/recipes-graphics/mali/mali-imx.inc index 85658c494..4aed50c77 100644 --- a/recipes-graphics/mali/mali-imx.inc +++ b/recipes-graphics/mali/mali-imx.inc | |||
| @@ -92,30 +92,37 @@ ALLOW_EMPTY:${PN}-libgles1-dev = "1" | |||
| 92 | ALLOW_EMPTY:${PN}-libgles2-dev = "1" | 92 | ALLOW_EMPTY:${PN}-libgles2-dev = "1" |
| 93 | ALLOW_EMPTY:${PN}-libgles3-dev = "1" | 93 | ALLOW_EMPTY:${PN}-libgles3-dev = "1" |
| 94 | 94 | ||
| 95 | python __anonymous() { | 95 | # The GPU interface packages keep their ${PN}- prefix: Debian renaming would |
| 96 | # drop it and collide with the generic mesa package names. | ||
| 97 | DEBIAN_NOAUTONAME:${PN}-libegl = "1" | ||
| 98 | DEBIAN_NOAUTONAME:${PN}-libegl-dev = "1" | ||
| 99 | DEBIAN_NOAUTONAME:${PN}-libgbm = "1" | ||
| 100 | DEBIAN_NOAUTONAME:${PN}-libgbm-dev = "1" | ||
| 101 | DEBIAN_NOAUTONAME:${PN}-libgles1 = "1" | ||
| 102 | DEBIAN_NOAUTONAME:${PN}-libgles1-dev = "1" | ||
| 103 | DEBIAN_NOAUTONAME:${PN}-libgles2 = "1" | ||
| 104 | DEBIAN_NOAUTONAME:${PN}-libgles2-dev = "1" | ||
| 105 | DEBIAN_NOAUTONAME:${PN}-libgles3 = "1" | ||
| 106 | DEBIAN_NOAUTONAME:${PN}-libgles3-dev = "1" | ||
| 96 | 107 | ||
| 97 | # Avoid Debian-renaming | 108 | # libmali.so is loaded with dlopen, so an explicit runtime dependency is necessary |
| 98 | for p in (("libegl", "libegl1" ), | 109 | RDEPENDS:${PN}-libegl += "${PN}" |
| 99 | ("libgbm", "libgbm1" ), | 110 | RDEPENDS:${PN}-libgbm += "${PN}" |
| 100 | ("libgles1", "libglesv1-cm1"), | 111 | RDEPENDS:${PN}-libgles1 += "${PN}" |
| 101 | ("libgles2", "libglesv2-2" ), | 112 | RDEPENDS:${PN}-libgles2 += "${PN}" |
| 102 | ("libgles3", )): | 113 | RDEPENDS:${PN}-libgles3 += "${PN}" |
| 103 | fullp = "${PN}-" + p[0] | ||
| 104 | pkgs = "".join(' %s' % i for i in p) | ||
| 105 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
| 106 | d.appendVar("RREPLACES:" + fullp, pkgs) | ||
| 107 | d.appendVar("RPROVIDES:" + fullp, pkgs) | ||
| 108 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | ||
| 109 | # libmali.so is loaded with dlopen, so an explicit runtime dependency is necessary | ||
| 110 | d.appendVar("RDEPENDS:" + fullp, "${PN}") | ||
| 111 | 114 | ||
| 112 | # For -dev, the first element is both the Debian and original name | 115 | # The generic names stay provided: consumers that dlopen a GL backend depend on |
| 113 | fullp += "-dev" | 116 | # them by name rather than through shlibs, as cogl-1.0 does for libgles2. |
| 114 | pkgs = p[0] + "-dev" | 117 | RPROVIDES:${PN}-libegl += "libegl" |
| 115 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | 118 | RPROVIDES:${PN}-libegl-dev += "libegl-dev" |
| 116 | d.appendVar("RREPLACES:" + fullp, pkgs) | 119 | RPROVIDES:${PN}-libgbm += "libgbm" |
| 117 | d.appendVar("RPROVIDES:" + fullp, pkgs) | 120 | RPROVIDES:${PN}-libgbm-dev += "libgbm-dev" |
| 118 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | 121 | RPROVIDES:${PN}-libgles1 += "libgles1" |
| 119 | } | 122 | RPROVIDES:${PN}-libgles1-dev += "libgles1-dev" |
| 123 | RPROVIDES:${PN}-libgles2 += "libgles2" | ||
| 124 | RPROVIDES:${PN}-libgles2-dev += "libgles2-dev" | ||
| 125 | RPROVIDES:${PN}-libgles3 += "libgles3" | ||
| 126 | RPROVIDES:${PN}-libgles3-dev += "libgles3-dev" | ||
| 120 | 127 | ||
| 121 | COMPATIBLE_MACHINE = "(mx95-nxp-bsp)" | 128 | COMPATIBLE_MACHINE = "(mx95-nxp-bsp)" |
diff --git a/recipes-kernel/linux/linux-imx_6.18.bb b/recipes-kernel/linux/linux-imx_6.18.bb index c5d1cb98c..6e9bdcf4a 100644 --- a/recipes-kernel/linux/linux-imx_6.18.bb +++ b/recipes-kernel/linux/linux-imx_6.18.bb | |||
| @@ -37,6 +37,9 @@ KBUILD_DEFCONFIG:mx9-generic-bsp = "imx_v8_defconfig" | |||
| 37 | 37 | ||
| 38 | DEFAULT_PREFERENCE = "1" | 38 | DEFAULT_PREFERENCE = "1" |
| 39 | 39 | ||
| 40 | # DELTA_KERNEL_DEFCONFIG is no longer supported. Testing that a key is defined at | ||
| 41 | # all, and aborting the parse, have no declarative form in BitBake. | ||
| 42 | # nooelint: oelint.task.noanonpython | ||
| 40 | python __anonymous () { | 43 | python __anonymous () { |
| 41 | import bb | 44 | import bb |
| 42 | # Fail fast if DELTA_KERNEL_DEFCONFIG is present in the datastore (even if empty) | 45 | # Fail fast if DELTA_KERNEL_DEFCONFIG is present in the datastore (even if empty) |
