1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

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>
This commit is contained in:
Francisco Pedraza
2017-06-09 12:01:26 -05:00
committed by Richard Purdie
parent 08a4705af9
commit 1b804d7944
3 changed files with 58 additions and 20 deletions
+33
View File
@@ -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):