1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

classes/populate_sdk_base: enable adding custom commands to SDK install script

Add an SDK_POST_INSTALL_COMMAND variable which allows additional
commands to be added towards the end of the SDK install script, for e.g.
additional processing that needs to be done as part of installing the
SDK.

(From OE-Core rev: 10df0718d6a626d99beb68cde8d914ee0820d7eb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2014-09-10 18:19:31 +01:00
committed by Richard Purdie
parent 51e392106e
commit 429802fe66
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -51,6 +51,7 @@ PID = "${@os.getpid()}"
EXCLUDE_FROM_WORLD = "1" EXCLUDE_FROM_WORLD = "1"
SDK_PACKAGING_FUNC ?= "create_shar" SDK_PACKAGING_FUNC ?= "create_shar"
SDK_POST_INSTALL_COMMAND ?= ""
SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest" SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest"
python write_target_sdk_manifest () { python write_target_sdk_manifest () {
@@ -142,10 +143,16 @@ fakeroot create_shar() {
# copy in the template shar extractor script # copy in the template shar extractor script
cp ${COREBASE}/meta/files/toolchain-shar-template.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh cp ${COREBASE}/meta/files/toolchain-shar-template.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
cat << "EOF" > ${T}/post_install_command
${SDK_POST_INSTALL_COMMAND}
EOF
sed -i -e '/@SDK_POST_INSTALL_COMMAND@/r ${T}/post_install_command' ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
# substitute variables # substitute variables
sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \ sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \
-e 's#@SDKPATH@#${SDKPATH}#g' \ -e 's#@SDKPATH@#${SDKPATH}#g' \
-e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \
-e '/@SDK_POST_INSTALL_COMMAND@/d' \
${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
# add execution permission # add execution permission
+2
View File
@@ -169,6 +169,8 @@ done
echo done echo done
@SDK_POST_INSTALL_COMMAND@
# delete the relocating script, so that user is forced to re-run the installer # delete the relocating script, so that user is forced to re-run the installer
# if he/she wants another location for the sdk # if he/she wants another location for the sdk
if [ $savescripts = 0 ] ; then if [ $savescripts = 0 ] ; then