diff options
| author | California Sullivan <california.l.sullivan@intel.com> | 2018-01-25 14:44:33 -0800 |
|---|---|---|
| committer | California Sullivan <california.l.sullivan@intel.com> | 2018-01-25 14:50:59 -0800 |
| commit | e28f2f9494fbe89ad9fc309cc32b55071d3fa3ce (patch) | |
| tree | 50312f98ba57166a648c1433af195307f7bb49ac | |
| parent | f3f1be4f5af99dd76566871fa989fabc4f6b037e (diff) | |
| download | meta-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>
| -rw-r--r-- | recipes-kernel/linux/linux-intel.inc | 1 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch | 62 |
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 | " |
| 8 | SRC_URI = " \ | 8 | SRC_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 @@ | |||
| 1 | From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jason Wessel <jason.wessel@windriver.com> | ||
| 3 | Date: Thu, 25 Sep 2014 11:26:49 -0700 | ||
| 4 | Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses | ||
| 5 | location | ||
| 6 | |||
| 7 | In some cross build environments such as the Yocto Project build | ||
| 8 | environment it provides an ncurses library that is compiled | ||
| 9 | differently than the host's version. This causes display corruption | ||
| 10 | problems when the host's curses includes are used instead of the | ||
| 11 | includes from the provided compiler are overridden. There is a second | ||
| 12 | case where there is no curses libraries at all on the host system and | ||
| 13 | menuconfig will just fail entirely. | ||
| 14 | |||
| 15 | The solution is simply to allow an override variable in | ||
| 16 | check-lxdialog.sh for environments such as the Yocto Project. Adding | ||
| 17 | a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing | ||
| 18 | compiling and linking against the right headers and libraries. | ||
| 19 | |||
| 20 | Upstream-Status: submitted [https://lkml.org/lkml/2013/3/3/103] | ||
| 21 | |||
| 22 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
| 23 | cc: Michal Marek <mmarek@suse.cz> | ||
| 24 | cc: linux-kbuild@vger.kernel.org | ||
| 25 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 26 | Signed-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 | |||
| 32 | diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh | ||
| 33 | old mode 100755 | ||
| 34 | new mode 100644 | ||
| 35 | index 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 | -- | ||
| 61 | 2.14.3 | ||
| 62 | |||
