diff options
author | brian avery <brian.avery@intel.com> | 2017-04-12 14:29:13 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-13 10:54:11 +0100 |
commit | c8b67a463f26a1f28bfad4be0952c6f67eab1e7f (patch) | |
tree | 75d398713212e5c2f46541be59f7aa4a909bd375 | |
parent | 4a0b6af446d257098111d76123a7dd34fa92f943 (diff) | |
download | poky-c8b67a463f26a1f28bfad4be0952c6f67eab1e7f.tar.gz |
oe-find-native-sysroot: add appopriate suggestion
right now, if it fails, the script tells the user to run bitbake foo
-caddto_recipe_sysroot. This works for native recipes but not things
like meta-ide. This patch checks whether the recipe is native and gives
out the appopriate warning.
(From OE-Core rev: fc61211efd57d1858954e5cd241fce58dee9d01b)
Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/oe-find-native-sysroot | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/oe-find-native-sysroot b/scripts/oe-find-native-sysroot index ad7b2d1fe8..5c8681efce 100755 --- a/scripts/oe-find-native-sysroot +++ b/scripts/oe-find-native-sysroot | |||
@@ -2,7 +2,7 @@ | |||
2 | # | 2 | # |
3 | # Find a native sysroot to use - either from an in-tree OE build or | 3 | # Find a native sysroot to use - either from an in-tree OE build or |
4 | # from a toolchain installation. It then ensures the variable | 4 | # from a toolchain installation. It then ensures the variable |
5 | # $OECORE_NATIVE_SYSROOT is set to the sysroot's base directory, and sets | 5 | # $OECORE_NATIVE_SYSROOT is set to the sysroot's base directory, and sets |
6 | # $PSEUDO to the path of the pseudo binary. | 6 | # $PSEUDO to the path of the pseudo binary. |
7 | # | 7 | # |
8 | # This script is intended to be run within other scripts by source'ing | 8 | # This script is intended to be run within other scripts by source'ing |
@@ -48,7 +48,6 @@ fi | |||
48 | # Global vars | 48 | # Global vars |
49 | BITBAKE_E="" | 49 | BITBAKE_E="" |
50 | OECORE_NATIVE_SYSROOT="" | 50 | OECORE_NATIVE_SYSROOT="" |
51 | |||
52 | set_oe_native_sysroot(){ | 51 | set_oe_native_sysroot(){ |
53 | echo "Running bitbake -e $1" | 52 | echo "Running bitbake -e $1" |
54 | BITBAKE_E="`bitbake -e $1`" | 53 | BITBAKE_E="`bitbake -e $1`" |
@@ -93,7 +92,11 @@ if [ ! -e "$OECORE_NATIVE_SYSROOT/" ]; then | |||
93 | echo "Error: $OECORE_NATIVE_SYSROOT doesn't exist." | 92 | echo "Error: $OECORE_NATIVE_SYSROOT doesn't exist." |
94 | 93 | ||
95 | if [ "x$OECORE_DISTRO_VERSION" = "x" ]; then | 94 | if [ "x$OECORE_DISTRO_VERSION" = "x" ]; then |
96 | echo "Have you run 'bitbake $1 -caddto_recipe_sysroot'?" | 95 | if [[ $1 =~ .*native.* ]]; then |
96 | echo "Have you run 'bitbake $1 -caddto_recipe_sysroot'?" | ||
97 | else | ||
98 | echo "Have you run 'bitbake $1 '?" | ||
99 | fi | ||
97 | else | 100 | else |
98 | echo "This shouldn't happen - something is wrong with your toolchain installation" | 101 | echo "This shouldn't happen - something is wrong with your toolchain installation" |
99 | fi | 102 | fi |