diff options
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 7 | ||||
-rw-r--r-- | meta/files/toolchain-shar-template.sh | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index abfcdc7744..946a1d479b 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -51,6 +51,7 @@ PID = "${@os.getpid()}" | |||
51 | EXCLUDE_FROM_WORLD = "1" | 51 | EXCLUDE_FROM_WORLD = "1" |
52 | 52 | ||
53 | SDK_PACKAGING_FUNC ?= "create_shar" | 53 | SDK_PACKAGING_FUNC ?= "create_shar" |
54 | SDK_POST_INSTALL_COMMAND ?= "" | ||
54 | 55 | ||
55 | SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest" | 56 | SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest" |
56 | python write_target_sdk_manifest () { | 57 | python write_target_sdk_manifest () { |
@@ -142,10 +143,16 @@ fakeroot create_shar() { | |||
142 | # copy in the template shar extractor script | 143 | # copy in the template shar extractor script |
143 | cp ${COREBASE}/meta/files/toolchain-shar-template.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh | 144 | cp ${COREBASE}/meta/files/toolchain-shar-template.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh |
144 | 145 | ||
146 | cat << "EOF" > ${T}/post_install_command | ||
147 | ${SDK_POST_INSTALL_COMMAND} | ||
148 | EOF | ||
149 | sed -i -e '/@SDK_POST_INSTALL_COMMAND@/r ${T}/post_install_command' ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh | ||
150 | |||
145 | # substitute variables | 151 | # substitute variables |
146 | sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \ | 152 | sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \ |
147 | -e 's#@SDKPATH@#${SDKPATH}#g' \ | 153 | -e 's#@SDKPATH@#${SDKPATH}#g' \ |
148 | -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ | 154 | -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ |
155 | -e '/@SDK_POST_INSTALL_COMMAND@/d' \ | ||
149 | ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh | 156 | ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh |
150 | 157 | ||
151 | # add execution permission | 158 | # add execution permission |
diff --git a/meta/files/toolchain-shar-template.sh b/meta/files/toolchain-shar-template.sh index a37d6ff786..02035d4539 100644 --- a/meta/files/toolchain-shar-template.sh +++ b/meta/files/toolchain-shar-template.sh | |||
@@ -169,6 +169,8 @@ done | |||
169 | 169 | ||
170 | echo done | 170 | echo done |
171 | 171 | ||
172 | @SDK_POST_INSTALL_COMMAND@ | ||
173 | |||
172 | # delete the relocating script, so that user is forced to re-run the installer | 174 | # delete the relocating script, so that user is forced to re-run the installer |
173 | # if he/she wants another location for the sdk | 175 | # if he/she wants another location for the sdk |
174 | if [ $savescripts = 0 ] ; then | 176 | if [ $savescripts = 0 ] ; then |