summaryrefslogtreecommitdiffstats
path: root/meta/files
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-16 16:24:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-17 13:43:39 +0000
commit508509d150e375ed5701190ec4bb1259709b576c (patch)
tree7c1790e516dde719238466bf9122f5af38160ce7 /meta/files
parentd8d5feee2ab48ea15112242a7f5bf79a1fcfb2e9 (diff)
downloadpoky-508509d150e375ed5701190ec4bb1259709b576c.tar.gz
populate_sdk: Handle OLDEST_KERNEL
Add a check to the SDK so that it only runs on systems with kernel versions it supports. [YOCTO #6856] (From OE-Core rev: b4caa8085aa15674162ff5135b13409998db9510) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files')
-rw-r--r--meta/files/toolchain-shar-template.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-template.sh b/meta/files/toolchain-shar-template.sh
index 4a7fbd50c6..151b973d35 100644
--- a/meta/files/toolchain-shar-template.sh
+++ b/meta/files/toolchain-shar-template.sh
@@ -3,6 +3,20 @@
3INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") 3INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
4SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") 4SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
5 5
6verlte () {
7 [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ]
8}
9
10verlt() {
11 [ "$1" = "$2" ] && return 1 || verlte $1 $2
12}
13
14verlt `uname -r` @OLDEST_KERNEL@
15if [ $? = 0 ]; then
16 echo "Error: The SDK needs a kernel > @OLDEST_KERNEL@"
17 exit 1
18fi
19
6if [ "$INST_ARCH" != "$SDK_ARCH" ]; then 20if [ "$INST_ARCH" != "$SDK_ARCH" ]; then
7 # Allow for installation of ix86 SDK on x86_64 host 21 # Allow for installation of ix86 SDK on x86_64 host
8 if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then 22 if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then