aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrej Valek <andrej.valek@siemens.com>2018-10-04 08:40:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-10 12:42:40 +0100
commitd4d5fdadaf2f671559326ab594fb596995846ca4 (patch)
treefcb1e2bdd6eb3482b47938ac158e1140178d14e8
parentb5d01558cfb5e65ef8f08eef70fa64ea6782dda5 (diff)
downloadopenembedded-core-contrib-d4d5fdadaf2f671559326ab594fb596995846ca4.tar.gz
openembedded-core-contrib-d4d5fdadaf2f671559326ab594fb596995846ca4.tar.bz2
openembedded-core-contrib-d4d5fdadaf2f671559326ab594fb596995846ca4.zip
populate_sdk_base: move template files location to variables
Let users to use custom toolchain template files instead of overloading the whole function. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/populate_sdk_base.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index e07ad0cc6b2..d9a391c6130 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -228,14 +228,17 @@ fakeroot tar_sdk() {
tar ${SDKTAROPTS} -cf - . | xz -T 0 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
}
+TOOLCHAIN_SHAR_EXT_TMPL ?= "${COREBASE}/meta/files/toolchain-shar-extract.sh"
+TOOLCHAIN_SHAR_REL_TMPL ?= "${COREBASE}/meta/files/toolchain-shar-relocate.sh"
+
fakeroot create_shar() {
# copy in the template shar extractor script
- cp ${COREBASE}/meta/files/toolchain-shar-extract.sh ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
+ cp ${TOOLCHAIN_SHAR_EXT_TMPL} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
rm -f ${T}/pre_install_command ${T}/post_install_command
if [ ${SDK_RELOCATE_AFTER_INSTALL} -eq 1 ] ; then
- cp ${COREBASE}/meta/files/toolchain-shar-relocate.sh ${T}/post_install_command
+ cp ${TOOLCHAIN_SHAR_REL_TMPL} ${T}/post_install_command
fi
cat << "EOF" >> ${T}/pre_install_command
${SDK_PRE_INSTALL_COMMAND}
@@ -299,8 +302,8 @@ def sdk_variables(d):
do_populate_sdk[vardeps] += "${@sdk_variables(d)}"
-do_populate_sdk[file-checksums] += "${COREBASE}/meta/files/toolchain-shar-relocate.sh:True \
- ${COREBASE}/meta/files/toolchain-shar-extract.sh:True"
+do_populate_sdk[file-checksums] += "${TOOLCHAIN_SHAR_REL_TMPL}:True \
+ ${TOOLCHAIN_SHAR_EXT_TMPL}:True"
do_populate_sdk[dirs] = "${PKGDATA_DIR} ${TOPDIR}"
do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS').split()])} ${@d.getVarFlag('do_rootfs', 'depends', False)}"