diff options
author | Ming Liu <liu.ming50@gmail.com> | 2023-05-13 18:05:09 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-09 13:55:21 +0100 |
commit | 0241bdb49c52c28cc54ffed5bd4cde387f57451e (patch) | |
tree | 3477c7992dc49da5a8e4afcc41a883f63514165b /meta/classes-recipe/cml1.bbclass | |
parent | 7e2199be524e4dd7783c54157d8b4bf9f57664b3 (diff) | |
download | poky-0241bdb49c52c28cc54ffed5bd4cde387f57451e.tar.gz |
meta: introduce KCONFIG_CONFIG_ENABLE_MENUCONFIG
Currently, uboot do_menuconfig task is breaking when UBOOT_CONFIG is
chosen rather than UBOOT_MACHINE, it simply fails with the following
errors:
| make: *** No rule to make target 'menuconfig'. Stio.
| Command failed.
| Press any key to continue...
this is due to the work directory of do_menuconfig is set to ${B} but
not ${B}/$config.
We should distinguish two situations:
1) When there is only one config item in UBOOT_CONFIG, do_menuconfig
should work just like how it works for UBOOT_MACHINE.
2) When there are multiple config items in UBOOT_CONFIG, do_menuconfig
should print out some information saying it's not supported other
than just failing.
This patch mainly aims to fix that by introducing a extra variable
KCONFIG_CONFIG_ENABLE_MENUCONFIG, it would be set to 'false' for
situation 2), and when it's set to 'true', then set
KCONFIG_CONFIG_ROOTDIR correctly in uboot-config.bbclass to let
do_menuconfig task work.
DEVTOOL_DISABLE_MENUCONFIG could be replaced by this new variable
KCONFIG_CONFIG_ENABLE_MENUCONFIG.
(From OE-Core rev: f9e834e317880cf47dbb4f8285bc36d743beae5e)
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/cml1.bbclass')
-rw-r--r-- | meta/classes-recipe/cml1.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes-recipe/cml1.bbclass b/meta/classes-recipe/cml1.bbclass index a09a042c3f..d87d8204e4 100644 --- a/meta/classes-recipe/cml1.bbclass +++ b/meta/classes-recipe/cml1.bbclass | |||
@@ -32,10 +32,15 @@ CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"' | |||
32 | TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo" | 32 | TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo" |
33 | 33 | ||
34 | KCONFIG_CONFIG_COMMAND ??= "menuconfig" | 34 | KCONFIG_CONFIG_COMMAND ??= "menuconfig" |
35 | KCONFIG_CONFIG_ENABLE_MENUCONFIG ??= "true" | ||
35 | KCONFIG_CONFIG_ROOTDIR ??= "${B}" | 36 | KCONFIG_CONFIG_ROOTDIR ??= "${B}" |
36 | python do_menuconfig() { | 37 | python do_menuconfig() { |
37 | import shutil | 38 | import shutil |
38 | 39 | ||
40 | if not bb.utils.to_boolean(d.getVar("KCONFIG_CONFIG_ENABLE_MENUCONFIG")): | ||
41 | bb.fatal("do_menuconfig is disabled, please check KCONFIG_CONFIG_ENABLE_MENUCONFIG variable.") | ||
42 | return | ||
43 | |||
39 | config = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config") | 44 | config = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config") |
40 | configorig = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config.orig") | 45 | configorig = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config.orig") |
41 | 46 | ||