From e28f2f9494fbe89ad9fc309cc32b55071d3fa3ce Mon Sep 17 00:00:00 2001 From: California Sullivan Date: Thu, 25 Jan 2018 14:44:33 -0800 Subject: 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 --- recipes-kernel/linux/linux-intel.inc | 1 + ...check-lxdiaglog.sh-Allow-specification-of.patch | 62 ++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch (limited to 'recipes-kernel/linux') 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 ?= " \ " SRC_URI = " \ git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \ + file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ ${KERNEL_CONFIG_URI} \ " 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 @@ +From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001 +From: Jason Wessel +Date: Thu, 25 Sep 2014 11:26:49 -0700 +Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses + location + +In some cross build environments such as the Yocto Project build +environment it provides an ncurses library that is compiled +differently than the host's version. This causes display corruption +problems when the host's curses includes are used instead of the +includes from the provided compiler are overridden. There is a second +case where there is no curses libraries at all on the host system and +menuconfig will just fail entirely. + +The solution is simply to allow an override variable in +check-lxdialog.sh for environments such as the Yocto Project. Adding +a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing +compiling and linking against the right headers and libraries. + +Upstream-Status: submitted [https://lkml.org/lkml/2013/3/3/103] + +Signed-off-by: Jason Wessel +cc: Michal Marek +cc: linux-kbuild@vger.kernel.org +Signed-off-by: Bruce Ashfield +Signed-off-by: California Sullivan +--- + scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + mode change 100755 => 100644 scripts/kconfig/lxdialog/check-lxdialog.sh + +diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh +old mode 100755 +new mode 100644 +index 5075ebf2d3b9..ba9242101190 +--- a/scripts/kconfig/lxdialog/check-lxdialog.sh ++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh +@@ -4,6 +4,10 @@ + # What library to link + ldflags() + { ++ if [ "$CROSS_CURSES_LIB" != "" ]; then ++ echo "$CROSS_CURSES_LIB" ++ exit ++ fi + pkg-config --libs ncursesw 2>/dev/null && exit + pkg-config --libs ncurses 2>/dev/null && exit + for ext in so a dll.a dylib ; do +@@ -21,6 +25,10 @@ ldflags() + # Where is ncurses.h? + ccflags() + { ++ if [ x"$CROSS_CURSES_INC" != x ]; then ++ echo "$CROSS_CURSES_INC" ++ exit ++ fi + if pkg-config --cflags ncursesw 2>/dev/null; then + echo '-DCURSES_LOC="" -DNCURSES_WIDECHAR=1' + elif pkg-config --cflags ncurses 2>/dev/null; then +-- +2.14.3 + -- cgit v1.2.3-54-g00ecf