summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_ext.bbclass
diff options
context:
space:
mode:
authorFrancisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>2017-06-09 12:01:26 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 15:21:32 +0100
commit25ad7ed6f7bb0c931b404bda09576323200d093d (patch)
tree14b0ab847280909add1b0f3da1856ccb1ca449cf /meta/classes/populate_sdk_ext.bbclass
parentf696b3bbe01969ce7ecb8174d63d3e1e172b473e (diff)
downloadopenembedded-core-25ad7ed6f7bb0c931b404bda09576323200d093d.tar.gz
openembedded-core-25ad7ed6f7bb0c931b404bda09576323200d093d.tar.bz2
openembedded-core-25ad7ed6f7bb0c931b404bda09576323200d093d.zip
meta/classes/populate_sdk: Adds support for generating eSDK manifest files
Add get_extra_sdk_info to reuse code in buildhistory The functionalities to generate SDK and eSDK manifest files are different, the SDK comes from package information and the eSDK comes from sstate artifacts. Only execute write_sdk_{host, target}_manifest when is on populate_sdk class. Adds new functions write_sdk{host, target}_ext_manifest to execute on postprocess in populate_sdk_ext because at the end we have all the sstate artifacts to generate the manifest. [YOCTO #9038] Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 69bc1d91dd..4791d74431 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -83,6 +83,39 @@ TOOLCHAIN_OUTPUTNAME_task-populate-sdk-ext = "${TOOLCHAINEXT_OUTPUTNAME}"
SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
+python write_target_sdk_ext_manifest () {
+ from oe.sdk import get_extra_sdkinfo
+ sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+ extra_info = get_extra_sdkinfo(sstate_dir)
+
+ target = d.getVar('TARGET_SYS')
+ target_multimach = d.getVar('MULTIMACH_TARGET_SYS')
+ real_target_multimach = d.getVar('REAL_MULTIMACH_TARGET_SYS')
+
+ pkgs = {}
+ with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f:
+ for fn in extra_info['filesizes']:
+ info = fn.split(':')
+ if info[2] in (target, target_multimach, real_target_multimach) \
+ or info[5] == 'allarch':
+ if not info[1] in pkgs:
+ f.write("%s %s %s\n" % (info[1], info[2], info[3]))
+ pkgs[info[1]] = {}
+}
+python write_host_sdk_ext_manifest () {
+ from oe.sdk import get_extra_sdkinfo
+ sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+ extra_info = get_extra_sdkinfo(sstate_dir)
+ host = d.getVar('BUILD_SYS')
+ with open(d.getVar('SDK_EXT_HOST_MANIFEST'), 'w') as f:
+ for fn in extra_info['filesizes']:
+ info = fn.split(':')
+ if info[2] == host:
+ f.write("%s %s %s\n" % (info[1], info[2], info[3]))
+}
+
+SDK_POSTPROCESS_COMMAND_append_task-populate-sdk-ext = "write_target_sdk_ext_manifest; write_host_sdk_ext_manifest; "
+
SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK"
def clean_esdk_builddir(d, sdkbasepath):