summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@oss.nxp.com>2025-02-05 16:18:55 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2026-03-16 10:22:06 +0000
commit4eba85f43e75ca49fed8d3cee501c8cbe9300a65 (patch)
treef9920f3bd619d0b5023f0f9752a6ceeb42b0d049 /meta
parent61319bfc426e98e11e4827dfabddfd20bf016712 (diff)
downloadpoky-4eba85f43e75ca49fed8d3cee501c8cbe9300a65.tar.gz
uboot-config: Fix devtool modify
Fix a problem with `devtool modify` as suggested by Marcus Flyckt on the mailing list: ``` I encountered an issue with `do_config` when using `devtool modify` on `u-boot-imx`. ``` [...] | cp: cannot stat '[...]/u-boot-imx/2024.04/build/imx8mp_wl400s_defconfig/.config': No such file or directory | WARNING: exit code 1 from a shell command. ERROR: Task ([...]/sources/poky/../meta-freescale/recipes-bsp/u-boot/u-boot-imx_2024.04.bb:do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 963 tasks of which 962 didn't need to be rerun and 1 failed. Summary: 1 task failed: [...]/sources/poky/../meta-freescale/recipes-bsp/u-boot/u-boot-imx_2024.04.bb:do_configure Summary: There was 1 ERROR message, returning a non-zero exit code ``` The issue seems to originate from the following lines in `workspace/appends/u-boot-imx_2024.04.bbappend`: ``` do_configure:append() { if [ ${@oe.types.boolean(d.getVar("KCONFIG_CONFIG_ENABLE_MENUCONFIG"))} = True ]; then cp ${KCONFIG_CONFIG_ROOTDIR}/.config ${S}/.config.baseline ln -sfT ${KCONFIG_CONFIG_ROOTDIR}/.config ${S}/.config.new fi } ``` For some reason `KCONFIG_CONFIG_ROOTDIR` does not point to the correct directory. It gets its value in `uboot-config.bbclass`: ``` if len(ubootconfig) == 1: d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join(d.getVar("B"), d.getVar("UBOOT_MACHINE").strip())) ``` So the main issue is that B gets expanded in this expression, and then later B gets changed by `externalsrc.bbclass`. `d.getVar("B", False)` does not solve the issue, however the proposed change does. ``` - https://lists.yoctoproject.org/g/yocto/topic/109254298#msg64152] Fixes [YOCTO #15603] Suggested-by: Marcus Flyckt <marcus.flyckt@gmail.com> (From OE-Core rev: 6a19e284baaadfdf080ebc5decf065e468655732) Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 57b21065a25100c31515b32fd7c77bde3355d684) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-recipe/uboot-config.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
index f360050042..b235b954d4 100644
--- a/meta/classes-recipe/uboot-config.bbclass
+++ b/meta/classes-recipe/uboot-config.bbclass
@@ -149,7 +149,7 @@ python () {
149 # Ensure the uboot specific menuconfig settings do not leak into other recipes 149 # Ensure the uboot specific menuconfig settings do not leak into other recipes
150 if 'u-boot' in recipename: 150 if 'u-boot' in recipename:
151 if len(ubootconfig) == 1: 151 if len(ubootconfig) == 1:
152 d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join(d.getVar("B"), d.getVar("UBOOT_MACHINE").strip())) 152 d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join("${B}", d.getVar("UBOOT_MACHINE").strip()))
153 else: 153 else:
154 # Disable menuconfig for multiple configs 154 # Disable menuconfig for multiple configs
155 d.setVar('KCONFIG_CONFIG_ENABLE_MENUCONFIG', "false") 155 d.setVar('KCONFIG_CONFIG_ENABLE_MENUCONFIG', "false")