summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2018-01-25 14:44:33 -0800
committerCalifornia Sullivan <california.l.sullivan@intel.com>2018-01-25 14:50:59 -0800
commite28f2f9494fbe89ad9fc309cc32b55071d3fa3ce (patch)
tree50312f98ba57166a648c1433af195307f7bb49ac /recipes-kernel/linux
parentf3f1be4f5af99dd76566871fa989fabc4f6b037e (diff)
downloadmeta-intel-e28f2f9494fbe89ad9fc309cc32b55071d3fa3ce.tar.gz
linux-intel: fix menuconfig when host lacks ncurses
linux-yocto has been carrying this patch for years. It allows the kernel to link with a non-host ncurses. This patch is needed for all linux-intel kernels, and that area of code is rarely changed, so maintenance of the patch should be minimal. Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Diffstat (limited to 'recipes-kernel/linux')
-rw-r--r--recipes-kernel/linux/linux-intel.inc1
-rw-r--r--recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch62
2 files changed, 63 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-intel.inc b/recipes-kernel/linux/linux-intel.inc
index b8a9798b..0b9e617a 100644
--- a/recipes-kernel/linux/linux-intel.inc
+++ b/recipes-kernel/linux/linux-intel.inc
@@ -7,6 +7,7 @@ KERNEL_CONFIG_URI ?= " \
7 " 7 "
8SRC_URI = " \ 8SRC_URI = " \
9 git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \ 9 git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \
10 file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
10 ${KERNEL_CONFIG_URI} \ 11 ${KERNEL_CONFIG_URI} \
11 " 12 "
12 13
diff --git a/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch b/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch
new file mode 100644
index 00000000..a9e9213b
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch
@@ -0,0 +1,62 @@
1From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Thu, 25 Sep 2014 11:26:49 -0700
4Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses
5 location
6
7In some cross build environments such as the Yocto Project build
8environment it provides an ncurses library that is compiled
9differently than the host's version. This causes display corruption
10problems when the host's curses includes are used instead of the
11includes from the provided compiler are overridden. There is a second
12case where there is no curses libraries at all on the host system and
13menuconfig will just fail entirely.
14
15The solution is simply to allow an override variable in
16check-lxdialog.sh for environments such as the Yocto Project. Adding
17a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
18compiling and linking against the right headers and libraries.
19
20Upstream-Status: submitted [https://lkml.org/lkml/2013/3/3/103]
21
22Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
23cc: Michal Marek <mmarek@suse.cz>
24cc: linux-kbuild@vger.kernel.org
25Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
26Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
27---
28 scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
29 1 file changed, 8 insertions(+)
30 mode change 100755 => 100644 scripts/kconfig/lxdialog/check-lxdialog.sh
31
32diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
33old mode 100755
34new mode 100644
35index 5075ebf2d3b9..ba9242101190
36--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
37+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
38@@ -4,6 +4,10 @@
39 # What library to link
40 ldflags()
41 {
42+ if [ "$CROSS_CURSES_LIB" != "" ]; then
43+ echo "$CROSS_CURSES_LIB"
44+ exit
45+ fi
46 pkg-config --libs ncursesw 2>/dev/null && exit
47 pkg-config --libs ncurses 2>/dev/null && exit
48 for ext in so a dll.a dylib ; do
49@@ -21,6 +25,10 @@ ldflags()
50 # Where is ncurses.h?
51 ccflags()
52 {
53+ if [ x"$CROSS_CURSES_INC" != x ]; then
54+ echo "$CROSS_CURSES_INC"
55+ exit
56+ fi
57 if pkg-config --cflags ncursesw 2>/dev/null; then
58 echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
59 elif pkg-config --cflags ncurses 2>/dev/null; then
60--
612.14.3
62