diff options
| -rw-r--r-- | meta/classes/cml1.bbclass | 5 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch | 71 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox_1.22.1.bb | 1 |
3 files changed, 75 insertions, 2 deletions
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass index b5adc47716..43acfd531b 100644 --- a/meta/classes/cml1.bbclass +++ b/meta/classes/cml1.bbclass | |||
| @@ -9,10 +9,11 @@ addtask configure after do_unpack do_patch before do_compile | |||
| 9 | 9 | ||
| 10 | inherit terminal | 10 | inherit terminal |
| 11 | 11 | ||
| 12 | OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES TERMINFO" | 12 | OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB CROSS_CURSES_INC" |
| 13 | HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}" | 13 | HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}" |
| 14 | HOSTLDFLAGS = "${BUILD_LDFLAGS}" | 14 | HOSTLDFLAGS = "${BUILD_LDFLAGS}" |
| 15 | HOST_LOADLIBES = "-lncurses" | 15 | CROSS_CURSES_LIB = "-lncurses -ltinfo" |
| 16 | CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"' | ||
| 16 | TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo" | 17 | TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo" |
| 17 | 18 | ||
| 18 | python do_menuconfig() { | 19 | python do_menuconfig() { |
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..781f5af14a --- /dev/null +++ b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | From: Jason Wessel <jason.wessel@windriver.com> | ||
| 2 | Date: Sun, 3 Mar 2013 12:31:40 -0600 | ||
| 3 | Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location | ||
| 4 | |||
| 5 | Upstream-status: Submitted | ||
| 6 | |||
| 7 | [ based on: https://lkml.org/lkml/2013/3/3/103 ] | ||
| 8 | |||
| 9 | This patch syncs up with the way the menuconfig ncurses / curses | ||
| 10 | is detected and the HOST_EXTRACFLAGS works in the Linux kernel | ||
| 11 | and it allows the menuconfig to work with a sysroot version | ||
| 12 | of the curses libraries. | ||
| 13 | |||
| 14 | --- | ||
| 15 | |||
| 16 | In some cross build environments such as the Yocto Project build | ||
| 17 | environment it provides an ncurses library that is compiled | ||
| 18 | differently than the host's version. This causes display corruption | ||
| 19 | problems when the host's curses includes are used instead of the | ||
| 20 | includes from the provided compiler are overridden. There is a second | ||
| 21 | case where there is no curses libraries at all on the host system and | ||
| 22 | menuconfig will just fail entirely. | ||
| 23 | |||
| 24 | The solution is simply to allow an override variable in | ||
| 25 | check-lxdialog.sh for environments such as the Yocto Project. Adding | ||
| 26 | a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing | ||
| 27 | compiling and linking against the right headers and libraries. | ||
| 28 | |||
| 29 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
| 30 | cc: Michal Marek <mmarek@suse.cz> | ||
| 31 | cc: 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 | ||
| 36 | SRC_URI_append_mips = " \ | 37 | SRC_URI_append_mips = " \ |
