* [PATCH] cmd1.bbclass: Ensure ncurses is built and used for menuconfig tasks
@ 2012-05-31 13:29 Richard Purdie
2012-05-31 14:46 ` Darren Hart
2012-05-31 15:02 ` Bruce Ashfield
0 siblings, 2 replies; 3+ messages in thread
From: Richard Purdie @ 2012-05-31 13:29 UTC (permalink / raw)
To: openembedded-core; +Cc: Ashfield, Bruce, Hart, Darren
Currently, the task just exits if something goes wrong. This adds the
ncurses-native dependency. It also adds a small delay before closing the
window so any messages displayed there can be seen.
Trying to get the kernel build system to correctly find and link with
our copy of ncurses is some kind of nightmare. I ended up having to add
it to HOST_LOADLIBES globally for this task which is rather nasty but I
couldn't find any other way.
[YOCTO #2513]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index d429188..bd25311 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -9,9 +9,15 @@ addtask configure after do_unpack do_patch before do_compile
inherit terminal
+OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES"
+HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
+HOSTLDFLAGS = "${BUILD_LDFLAGS}"
+HOST_LOADLIBES = "-lncurses"
+
python do_menuconfig() {
- oe_terminal("make menuconfig", '${PN} Configuration', d)
+ oe_terminal("${SHELL} -c \"make menuconfig; echo 'Pausing for 5 seconds'; sleep 5\"", '${PN} Configuration', d)
}
+do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
do_menuconfig[nostamp] = "1"
addtask menuconfig after do_configure
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cmd1.bbclass: Ensure ncurses is built and used for menuconfig tasks
2012-05-31 13:29 [PATCH] cmd1.bbclass: Ensure ncurses is built and used for menuconfig tasks Richard Purdie
@ 2012-05-31 14:46 ` Darren Hart
2012-05-31 15:02 ` Bruce Ashfield
1 sibling, 0 replies; 3+ messages in thread
From: Darren Hart @ 2012-05-31 14:46 UTC (permalink / raw)
To: Richard Purdie; +Cc: Ashfield, Bruce, openembedded-core
On 05/31/2012 06:29 AM, Richard Purdie wrote:
> Currently, the task just exits if something goes wrong. This adds the
> ncurses-native dependency. It also adds a small delay before closing the
> window so any messages displayed there can be seen.
>
> Trying to get the kernel build system to correctly find and link with
> our copy of ncurses is some kind of nightmare. I ended up having to add
> it to HOST_LOADLIBES globally for this task which is rather nasty but I
> couldn't find any other way.
>
> [YOCTO #2513]
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
> index d429188..bd25311 100644
> --- a/meta/classes/cml1.bbclass
> +++ b/meta/classes/cml1.bbclass
> @@ -9,9 +9,15 @@ addtask configure after do_unpack do_patch before do_compile
>
> inherit terminal
>
> +OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES"
> +HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
> +HOSTLDFLAGS = "${BUILD_LDFLAGS}"
> +HOST_LOADLIBES = "-lncurses"
> +
> python do_menuconfig() {
> - oe_terminal("make menuconfig", '${PN} Configuration', d)
> + oe_terminal("${SHELL} -c \"make menuconfig; echo 'Pausing for 5 seconds'; sleep 5\"", '${PN} Configuration', d)
Perhaps only sleeping if menuconfig returns non-zero? This would avoid
the unnecessary lag after a successful menuconfig session.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cmd1.bbclass: Ensure ncurses is built and used for menuconfig tasks
2012-05-31 13:29 [PATCH] cmd1.bbclass: Ensure ncurses is built and used for menuconfig tasks Richard Purdie
2012-05-31 14:46 ` Darren Hart
@ 2012-05-31 15:02 ` Bruce Ashfield
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2012-05-31 15:02 UTC (permalink / raw)
To: Richard Purdie; +Cc: Hart, Darren, openembedded-core
On 12-05-31 09:29 AM, Richard Purdie wrote:
> Currently, the task just exits if something goes wrong. This adds the
> ncurses-native dependency. It also adds a small delay before closing the
> window so any messages displayed there can be seen.
>
> Trying to get the kernel build system to correctly find and link with
> our copy of ncurses is some kind of nightmare. I ended up having to add
> it to HOST_LOADLIBES globally for this task which is rather nasty but I
> couldn't find any other way.
Agreed, and my much more limited knowledge of the options can't come
up with something different either.
Is there an option to move those flags to the kernel class, so they'd
only be set when it is in play ? That would at least isolate the data
a bit more. Alternatively there's the less palatable kernel specific
do_menuconfig option (ech).
Otherwise, no concerns or big comments from me.
Bruce
>
> [YOCTO #2513]
>
> Signed-off-by: Richard Purdie<richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
> index d429188..bd25311 100644
> --- a/meta/classes/cml1.bbclass
> +++ b/meta/classes/cml1.bbclass
> @@ -9,9 +9,15 @@ addtask configure after do_unpack do_patch before do_compile
>
> inherit terminal
>
> +OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES"
> +HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
> +HOSTLDFLAGS = "${BUILD_LDFLAGS}"
> +HOST_LOADLIBES = "-lncurses"
> +
> python do_menuconfig() {
> - oe_terminal("make menuconfig", '${PN} Configuration', d)
> + oe_terminal("${SHELL} -c \"make menuconfig; echo 'Pausing for 5 seconds'; sleep 5\"", '${PN} Configuration', d)
> }
> +do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
> do_menuconfig[nostamp] = "1"
> addtask menuconfig after do_configure
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-31 15:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 13:29 [PATCH] cmd1.bbclass: Ensure ncurses is built and used for menuconfig tasks Richard Purdie
2012-05-31 14:46 ` Darren Hart
2012-05-31 15:02 ` Bruce Ashfield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox