From 9721378688a05cd8d8443c6ee4be823e5c0688f6 Mon Sep 17 00:00:00 2001 From: Randy Witt Date: Mon, 23 Feb 2015 17:00:40 +0000 Subject: toolchain-shar-template.sh: Make relocation optional. If the buildsystem is copied into the sdk and its toolchain is to be used, then the relocation provided in toolchain-shar-template.sh isn't needed and will actually fail. So break the relocation aspect out and essentially make it another SDK_POST_INSTALL_COMMAND script. Signed-off-by: Randy Witt Signed-off-by: Richard Purdie --- meta/classes/populate_sdk_base.bbclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'meta/classes/populate_sdk_base.bbclass') diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index e3adacb2c9..5c0769373a 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass @@ -52,6 +52,7 @@ EXCLUDE_FROM_WORLD = "1" SDK_PACKAGING_FUNC ?= "create_shar" SDK_POST_INSTALL_COMMAND ?= "" +SDK_RELOCATE_AFTER_INSTALL ?= "1" SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest" python write_target_sdk_manifest () { @@ -116,9 +117,14 @@ fakeroot tar_sdk() { fakeroot create_shar() { # 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-extract.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh - cat << "EOF" > ${T}/post_install_command + rm -f ${T}/post_install_command + + if [ ${SDK_RELOCATE_AFTER_INSTALL} -eq 1 ] ; then + cp ${COREBASE}/meta/files/toolchain-shar-relocate.sh ${T}/post_install_command + fi + 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 -- cgit 1.2.3-korg