diff options
author | Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> | 2017-06-09 12:01:26 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-12 23:01:23 +0100 |
commit | 1b804d7944f3f2bfe9a414b045f313a0e1bff817 (patch) | |
tree | 42c5e48f4c401debb8ca96abdcbbd1e830383154 /meta/classes/populate_sdk_ext.bbclass | |
parent | 08a4705af9cc677b32fd6489e67f86f7e9d6e92c (diff) | |
download | poky-1b804d7944f3f2bfe9a414b045f313a0e1bff817.tar.gz |
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]
(From OE-Core rev: 25ad7ed6f7bb0c931b404bda09576323200d093d)
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.bbclass | 33 |
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}" | |||
83 | SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest" | 83 | SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest" |
84 | SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest" | 84 | SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest" |
85 | 85 | ||
86 | python write_target_sdk_ext_manifest () { | ||
87 | from oe.sdk import get_extra_sdkinfo | ||
88 | sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache') | ||
89 | extra_info = get_extra_sdkinfo(sstate_dir) | ||
90 | |||
91 | target = d.getVar('TARGET_SYS') | ||
92 | target_multimach = d.getVar('MULTIMACH_TARGET_SYS') | ||
93 | real_target_multimach = d.getVar('REAL_MULTIMACH_TARGET_SYS') | ||
94 | |||
95 | pkgs = {} | ||
96 | with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f: | ||
97 | for fn in extra_info['filesizes']: | ||
98 | info = fn.split(':') | ||
99 | if info[2] in (target, target_multimach, real_target_multimach) \ | ||
100 | or info[5] == 'allarch': | ||
101 | if not info[1] in pkgs: | ||
102 | f.write("%s %s %s\n" % (info[1], info[2], info[3])) | ||
103 | pkgs[info[1]] = {} | ||
104 | } | ||
105 | python write_host_sdk_ext_manifest () { | ||
106 | from oe.sdk import get_extra_sdkinfo | ||
107 | sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache') | ||
108 | extra_info = get_extra_sdkinfo(sstate_dir) | ||
109 | host = d.getVar('BUILD_SYS') | ||
110 | with open(d.getVar('SDK_EXT_HOST_MANIFEST'), 'w') as f: | ||
111 | for fn in extra_info['filesizes']: | ||
112 | info = fn.split(':') | ||
113 | if info[2] == host: | ||
114 | f.write("%s %s %s\n" % (info[1], info[2], info[3])) | ||
115 | } | ||
116 | |||
117 | SDK_POSTPROCESS_COMMAND_append_task-populate-sdk-ext = "write_target_sdk_ext_manifest; write_host_sdk_ext_manifest; " | ||
118 | |||
86 | SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK" | 119 | SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK" |
87 | 120 | ||
88 | def clean_esdk_builddir(d, sdkbasepath): | 121 | def clean_esdk_builddir(d, sdkbasepath): |