populate_sdk: Handle OLDEST_KERNEL
PATCH 1/1 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]
Signed-off-by Richard Purdie <[email protected]>
meta/classes/populate_sdk_base.bbclass +1 -0
@@ -126,6 +126,7 @@ EOF # substitute variables sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \ -e 's#@SDKPATH@#${SDKPATH}#g' \ + -e 's#@OLDEST_KERNEL@#${OLDEST_KERNEL}#g' \ -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ -e '/@SDK_POST_INSTALL_COMMAND@/d' \ ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
meta/files/toolchain-shar-template.sh +18 -0
@@ -3,6 +3,24 @@ INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") +verlte () { + [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ] +} + +verlt() { + [ "$1" = "$2" ] && return 1 || verlte $1 $2 +} + +verlt `uname -r` @OLDEST_KERNEL@ +if [ $? = 0 ]; then + echo "Error: The SDK needs a kernel > @OLDEST_KERNEL@" + exit 1 +fi + + +verlte `uname -r` 3.18.0 && echo "yes" || echo "no" +verlte 4.16 3.18.0 && echo "yes" || echo "no" + if [ "$INST_ARCH" != "$SDK_ARCH" ]; then # Allow for installation of ix86 SDK on x86_64 host if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then
Quoted 34 lines · Richard Purdie
Add a check to the SDK so that it only runs on systems with kernel versions it supports.
[YOCTO #6856]
Signed-off-by Richard Purdie <[email protected]>meta/classes/populate_sdk_base.bbclass +1
-0@@ -126,6 +126,7 @@ EOF # substitute variables sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \ -e 's#@SDKPATH@#${SDKPATH}#g' \ + -e 's#@OLDEST_KERNEL@#${OLDEST_KERNEL}#g' \ -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ -e '/@SDK_POST_INSTALL_COMMAND@/d' \ ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.shmeta/files/toolchain-shar-template.sh +7
-0@@ -3,6 +3,24 @@ INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") +verlte () { + [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ] +} + +verlt() { + [ "$1" = "$2" ] && return 1 || verlte $1 $2 +}
meta/files/toolchain-shar-template.sh line 22
Quoted 10 lines
meta/files/toolchain-shar-template.sh +10
-0+ +verlt `uname -r` @OLDEST_KERNEL@ +if [ $? = 0 ]; then + echo "Error: The SDK needs a kernel > @OLDEST_KERNEL@" + exit 1 +fi + + +verlte `uname -r` 3.18.0 && echo "yes" || echo "no" +verlte 4.16 3.18.0 && echo "yes" || echo "no"
Is this a development code forgotten? :)
Quoted 10 lines
meta/files/toolchain-shar-template.sh +0
-1if [ "$INST_ARCH" != "$SDK_ARCH" ]; then # Allow for installation of ix86 SDK on x86_64 host if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then --_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Quoted 40 lines · Otavio Salvador
Quoted 38 lines · Richard Purdie
Add a check to the SDK so that it only runs on systems with kernel versions it supports.
[YOCTO #6856]
Signed-off-by Richard Purdie <[email protected]>meta/classes/populate_sdk_base.bbclass +1
-0@@ -126,6 +126,7 @@ EOF # substitute variables sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \ -e 's#@SDKPATH@#${SDKPATH}#g' \ + -e 's#@OLDEST_KERNEL@#${OLDEST_KERNEL}#g' \ -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ -e '/@SDK_POST_INSTALL_COMMAND@/d' \ ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.shmeta/files/toolchain-shar-template.sh +11
-0@@ -3,6 +3,24 @@ INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") +verlte () { + [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ] +} + +verlt() { + [ "$1" = "$2" ] && return 1 || verlte $1 $2 +} + +verlt `uname -r` @OLDEST_KERNEL@ +if [ $? = 0 ]; then + echo "Error: The SDK needs a kernel > @OLDEST_KERNEL@"
Quoted 8 lines
meta/files/toolchain-shar-template.sh line 22
Quoted 6 lines
meta/files/toolchain-shar-template.sh +6
-0+ exit 1 +fi + + +verlte `uname -r` 3.18.0 && echo "yes" || echo "no" +verlte 4.16 3.18.0 && echo "yes" || echo "no"Is this a development code forgotten? :)
Yes, well spotted, thanks!
I'll remove those two lines
Cheers,
Richard