Bug 15040

Summary: zephyr menuconfig doesn't work
Product: [Build System, Metadata & Runtime] Other YP Layers Reporter: Pavel Zhukov <pavel>
Component: meta-zephyrAssignee: Wen Yan Tan <wen.yan.tan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: randy.macleod, richard.purdie, wen.yan.tan
Version: unspecified   
Target Milestone: 4.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Patch to fix do_menuconfig
none
menuconfig with patch applied
none
menuconfig screenshot
none
build logs
none
log.do_menuconfig.71954 none

Description Pavel Zhukov 2023-02-23 13:54:28 UTC
Seems like menuconfig is broken.
Tried: 

meta-zephyr-bsp      
meta-zephyr-core     = "master:3e9d6a3200c2c950490235335a8711b15f82e1b5"


$ MACHINE="qemu-cortex-a53" DISTRO="zephyr" bitbake zephyr-helloworld -c menuconfig 

Tried with different samples with the same result:

make: *** No rule to make target 'menuconfig'.  Stop.
Command failed.
Press any key to continue... 

ZEPHYR_BASE and ZEPHYR_SRC_DIR look valid:
export ZEPHYR_BASE="/mnt/builds/yocto/builds/build-zephyr/tmp-newlib/work/cortexa53-yocto-elf/zephyr-helloworld/3.2.0+gitAUTOINC+4b58ae97f3-r0/git/zephyr"

ZEPHYR_SRC_DIR="/mnt/builds/yocto/builds/build-zephyr/tmp-newlib/work/cortexa53-yocto-elf/zephyr-helloworld/3.2.0+gitAUTOINC+4b58ae97f3-r0/git/zephyr/samples/hello_world"
Comment 1 Wen Yan Tan 2023-03-22 04:29:10 UTC
Created attachment 4939 [details]
Patch to fix do_menuconfig

Hi Pavel Zhukov, can you please verify this patch?
Comment 2 Richard Purdie 2023-04-27 14:45:56 UTC
Pavel, were you able to take a look?
Comment 3 Pavel Zhukov 2023-04-28 06:55:45 UTC
Created attachment 4950 [details]
menuconfig with patch applied
Comment 4 Pavel Zhukov 2023-04-28 06:57:13 UTC
Sorry for the delay.
While behaviour changed it doesn't work still [1]
Attaching log file.

[1]
WARNING: Terminal screen is supported but did not start
ERROR: No valid terminal found, unable to open devshell.
Tried the following commands:
	tmux split-window -c "{cwd}" "do_terminal"
	tmux new-window -c "{cwd}" -n "zephyr-helloworld Configuration" "do_terminal"
	xfce4-terminal -T "zephyr-helloworld Configuration" -e "do_terminal"
	terminology -T="zephyr-helloworld Configuration" -e do_terminal
	mate-terminal --disable-factory -t "zephyr-helloworld Configuration" -x do_terminal
	konsole --separate --workdir . -p tabtitle="zephyr-helloworld Configuration" -e do_terminal
	gnome-terminal -t "zephyr-helloworld Configuration" -- do_terminal
	xterm -T "zephyr-helloworld Configuration" -e do_terminal
	rxvt -T "zephyr-helloworld Configuration" -e do_terminal
	tmux new -c "{cwd}" -d -s devshell -n devshell "do_terminal"
	screen -D -m -t "zephyr-helloworld Configuration" -S devshell do_terminal
DEBUG: Python function do_menuconfig finished
Comment 5 Wen Yan Tan 2023-05-03 08:23:55 UTC
Created attachment 4951 [details]
menuconfig screenshot
Comment 6 Wen Yan Tan 2023-05-03 08:25:36 UTC
Created attachment 4952 [details]
build logs
Comment 7 Wen Yan Tan 2023-05-03 08:26:34 UTC
Created attachment 4953 [details]
log.do_menuconfig.71954

Hi Pavel, for me it's working, please check attachments.
Comment 8 Pavel Zhukov 2023-05-23 08:03:46 UTC
(In reply to Wen Yan Tan from comment #7)
> Created attachment 4953 [details]
> log.do_menuconfig.71954
> 
> Hi Pavel, for me it's working, please check attachments.

Hi Wen Yan Tan,

You're right. The issue I've mentioned in my previous comment is not related to meta-zephyr and was caused by broken xterm. I'm sorry about that. 
I can confirm patch works, thank you!