summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/populate_sdk_base.bbclass')
-rw-r--r--meta/classes/populate_sdk_base.bbclass12
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 398e943a46..a9e9bd71d2 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -51,6 +51,7 @@ PID = "${@os.getpid()}"
51EXCLUDE_FROM_WORLD = "1" 51EXCLUDE_FROM_WORLD = "1"
52 52
53SDK_PACKAGING_FUNC ?= "create_shar" 53SDK_PACKAGING_FUNC ?= "create_shar"
54SDK_PRE_INSTALL_COMMAND ?= ""
54SDK_POST_INSTALL_COMMAND ?= "" 55SDK_POST_INSTALL_COMMAND ?= ""
55SDK_RELOCATE_AFTER_INSTALL ?= "1" 56SDK_RELOCATE_AFTER_INSTALL ?= "1"
56 57
@@ -134,15 +135,21 @@ fakeroot create_shar() {
134 # copy in the template shar extractor script 135 # copy in the template shar extractor script
135 cp ${COREBASE}/meta/files/toolchain-shar-extract.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh 136 cp ${COREBASE}/meta/files/toolchain-shar-extract.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
136 137
137 rm -f ${T}/post_install_command 138 rm -f ${T}/pre_install_command ${T}/post_install_command
138 139
139 if [ ${SDK_RELOCATE_AFTER_INSTALL} -eq 1 ] ; then 140 if [ ${SDK_RELOCATE_AFTER_INSTALL} -eq 1 ] ; then
140 cp ${COREBASE}/meta/files/toolchain-shar-relocate.sh ${T}/post_install_command 141 cp ${COREBASE}/meta/files/toolchain-shar-relocate.sh ${T}/post_install_command
141 fi 142 fi
143 cat << "EOF" >> ${T}/pre_install_command
144${SDK_PRE_INSTALL_COMMAND}
145EOF
146
142 cat << "EOF" >> ${T}/post_install_command 147 cat << "EOF" >> ${T}/post_install_command
143${SDK_POST_INSTALL_COMMAND} 148${SDK_POST_INSTALL_COMMAND}
144EOF 149EOF
145 sed -i -e '/@SDK_POST_INSTALL_COMMAND@/r ${T}/post_install_command' ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh 150 sed -i -e '/@SDK_PRE_INSTALL_COMMAND@/r ${T}/pre_install_command' \
151 -e '/@SDK_POST_INSTALL_COMMAND@/r ${T}/post_install_command' \
152 ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
146 153
147 # substitute variables 154 # substitute variables
148 sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \ 155 sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \
@@ -151,6 +158,7 @@ EOF
151 -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ 158 -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \
152 -e 's#@SDK_TITLE@#${SDK_TITLE}#g' \ 159 -e 's#@SDK_TITLE@#${SDK_TITLE}#g' \
153 -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \ 160 -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \
161 -e '/@SDK_PRE_INSTALL_COMMAND@/d' \
154 -e '/@SDK_POST_INSTALL_COMMAND@/d' \ 162 -e '/@SDK_POST_INSTALL_COMMAND@/d' \
155 ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh 163 ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
156 164