summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2014-11-07 17:15:45 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:18:39 +0000
commit04ffa0b961b82682f1f9218cce6bbcf1a9663aae (patch)
tree5670ba37df744599c0b678f0d6383f1ef314799e /meta/recipes-core
parentfdf882c091f5b797e3c21b8b74b1f28a8eea6870 (diff)
downloadpoky-04ffa0b961b82682f1f9218cce6bbcf1a9663aae.tar.gz
ncurses, busybox, cml1.bbclass: Fix menuconfig display corruption
Previously there was a change to the ncurses compile to make it more like the typical way it was compiled on a host system. This fixed a whole class of host machines, but masked the real underlying problem with the display corruption issues and menuconfig. The corner case that led to the discovery that the wrong curses.h file was getting used was when there was no curses libraries at all on one of the development hosts. What had happened before was that /usr/include/curses.h on the host system had to match closely enough to the curses.h in the sysroot and then linking against the sysroot version of curses.so was ok (meaning no display corruption). But on some systems with ncurses.h vs curses.h such as SuSE hosts, there were still issues. If we fix the root of the problem and force the mconf and lxdialog to use the correct headers and libraries from the sysroot there is no further issues and the menuconfig target works properly. It also means we can back out the custom compilation flags to the ncurses recipe because they are no longer needed. For the kernel part of the menuconfig / nconfig changes it will be merged separately and this is all based on: https://lkml.org/lkml/2013/3/3/103 (From OE-Core rev: 889e02659dd396feba24f0b0ee6b4043c3f3735a) (From OE-Core rev: b8bba551f96f7ff7c2eb772bbdc0b38ed2449683) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch71
-rw-r--r--meta/recipes-core/busybox/busybox_1.22.1.bb1
2 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
new file mode 100644
index 0000000000..fc7b778be1
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
@@ -0,0 +1,71 @@
1From: Jason Wessel <jason.wessel@windriver.com>
2Date: Sun, 3 Mar 2013 12:31:40 -0600
3Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location
4
5Upstream-status: Submitted
6
7[ based on: https://lkml.org/lkml/2013/3/3/103 ]
8
9This patch syncs up with the way the menuconfig ncurses / curses
10is detected and the HOST_EXTRACFLAGS works in the Linux kernel
11and it allows the menuconfig to work with a sysroot version
12of the curses libraries.
13
14---
15
16In some cross build environments such as the Yocto Project build
17environment it provides an ncurses library that is compiled
18differently than the host's version. This causes display corruption
19problems when the host's curses includes are used instead of the
20includes from the provided compiler are overridden. There is a second
21case where there is no curses libraries at all on the host system and
22menuconfig will just fail entirely.
23
24The solution is simply to allow an override variable in
25check-lxdialog.sh for environments such as the Yocto Project. Adding
26a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
27compiling and linking against the right headers and libraries.
28
29Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
30cc: Michal Marek <mmarek@suse.cz>
31cc: linux-kbuild@vger.kernel.org
32---
33 scripts/kconfig/lxdialog/Makefile | 2 +-
34 scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
35 2 files changed, 9 insertions(+), 1 deletion(-)
36
37--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
38+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
39@@ -4,6 +4,10 @@
40 # What library to link
41 ldflags()
42 {
43+ if [ x"$CROSS_CURSES_LIB" != x ]; then
44+ echo "$CROSS_CURSES_LIB"
45+ exit
46+ fi
47 for ext in so a dylib ; do
48 for lib in ncursesw ncurses curses ; do
49 $cc -print-file-name=lib${lib}.${ext} | grep -q /
50@@ -19,6 +23,10 @@ ldflags()
51 # Where is ncurses.h?
52 ccflags()
53 {
54+ if [ x"$CROSS_CURSES_INC" != x ]; then
55+ echo "$CROSS_CURSES_INC"
56+ exit
57+ fi
58 if [ -f /usr/include/ncursesw/ncurses.h ]; then
59 echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
60 elif [ -f /usr/include/ncursesw/curses.h ]; then
61--- a/scripts/kconfig/lxdialog/Makefile
62+++ b/scripts/kconfig/lxdialog/Makefile
63@@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che
64
65 # Use reursively expanded variables so we do not call gcc unless
66 # we really need to do so. (Do not call gcc as part of make mrproper)
67-HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
68+HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
69 HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
70
71 HOST_EXTRACFLAGS += -DLOCALE
diff --git a/meta/recipes-core/busybox/busybox_1.22.1.bb b/meta/recipes-core/busybox/busybox_1.22.1.bb
index 82f7f6896b..7a50a304a7 100644
--- a/meta/recipes-core/busybox/busybox_1.22.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.22.1.bb
@@ -31,6 +31,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
31 file://login-utilities.cfg \ 31 file://login-utilities.cfg \
32 file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \ 32 file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \
33 file://recognize_connmand.patch \ 33 file://recognize_connmand.patch \
34 file://busybox-cross-menuconfig.patch \
34" 35"
35 36
36SRC_URI_append_mips = " \ 37SRC_URI_append_mips = " \