linux-raspberrypi: Allow specification of ncurses location

From patch message:

    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.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
This commit is contained in:
Paul Barker
2018-04-16 16:21:52 +00:00
committed by Andrei Gherzan
parent 3175e7f3e2
commit 51249c9c78
4 changed files with 74 additions and 4 deletions

View File

@ -0,0 +1,62 @@
From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
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 <jason.wessel@windriver.com>
cc: Michal Marek <mmarek@suse.cz>
cc: linux-kbuild@vger.kernel.org
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
---
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="<ncurses.h>" -DNCURSES_WIDECHAR=1'
elif pkg-config --cflags ncurses 2>/dev/null; then
--
2.14.3

View File

@ -11,8 +11,10 @@ LINUX_VERSION ?= "4.15"
LINUX_RPI_DEV_BRANCH ?= "rpi-4.15.y"
SRCREV = "${AUTOREV}"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_DEV_BRANCH} \
"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_DEV_BRANCH} \
file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
"
require linux-raspberrypi.inc
# Disable version check so that we don't have to edit this recipe every time

View File

@ -1,6 +1,9 @@
LINUX_VERSION ?= "4.14.30"
SRCREV = "9696aab22bb8163fb3a2a262dd6c67f6d05b70a1"
SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y \
file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
"
require linux-raspberrypi.inc

View File

@ -3,6 +3,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
LINUX_VERSION ?= "4.9.80"
SRCREV = "a7b4dd27c1c0d6510b8066b91ef01be0928d8529"
SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y \
file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
"
require linux-raspberrypi.inc