summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChristoph Lauer <christoph.lauer@xtronic.de>2023-04-23 10:14:08 +0200
committerSteve Sakoman <steve@sakoman.com>2023-05-03 04:17:12 -1000
commite2ab82659d96a48a632d3b362d4f6e13a1d3bb1a (patch)
treee47302fb210b7033e2788e57c61547c165980c6e /meta
parentc98c4d74dc4b920dc9dfffb26de738de854aff2a (diff)
downloadpoky-e2ab82659d96a48a632d3b362d4f6e13a1d3bb1a.tar.gz
populate_sdk_base: add zip options
Add SDK_ZIP_OPTIONS to remove symbolic link creation in zip archive or add options, e.g. for encryption of the zip archive. (From OE-Core rev: 04b62f9459b401c276255f166d0738b6f902a576) (From OE-Core rev: 4f5bf144bfe4f34adfc22d86783d6ce29e9f6e15) Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/populate_sdk_base.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 16f929bf59..fb00460172 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -53,6 +53,8 @@ TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
53SDK_ARCHIVE_TYPE ?= "tar.xz" 53SDK_ARCHIVE_TYPE ?= "tar.xz"
54SDK_XZ_COMPRESSION_LEVEL ?= "-9" 54SDK_XZ_COMPRESSION_LEVEL ?= "-9"
55SDK_XZ_OPTIONS ?= "${XZ_DEFAULTS} ${SDK_XZ_COMPRESSION_LEVEL}" 55SDK_XZ_OPTIONS ?= "${XZ_DEFAULTS} ${SDK_XZ_COMPRESSION_LEVEL}"
56SDK_ZIP_OPTIONS ?= "-y"
57
56 58
57# To support different sdk type according to SDK_ARCHIVE_TYPE, now support zip and tar.xz 59# To support different sdk type according to SDK_ARCHIVE_TYPE, now support zip and tar.xz
58python () { 60python () {
@@ -60,7 +62,7 @@ python () {
60 d.setVar('SDK_ARCHIVE_DEPENDS', 'zip-native') 62 d.setVar('SDK_ARCHIVE_DEPENDS', 'zip-native')
61 # SDK_ARCHIVE_CMD used to generate archived sdk ${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR} 63 # SDK_ARCHIVE_CMD used to generate archived sdk ${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR}
62 # recommand to cd into input dir first to avoid archive with buildpath 64 # recommand to cd into input dir first to avoid archive with buildpath
63 d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r -y ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .') 65 d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDK_ZIP_OPTIONS} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
64 else: 66 else:
65 d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native') 67 d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native')
66 d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}') 68 d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')