1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
SUMMARY = "Package of environment files for SDK"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
LICENSE = "MIT"
PR = "r8"
EXCLUDE_FROM_WORLD = "1"
MODIFYTOS = "0"
REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
inherit toolchain-scripts
TOOLCHAIN_NEED_CONFIGSITE_CACHE_append = " zlib"
SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
inherit cross-canadian
do_generate_content[cleandirs] = "${SDK_OUTPUT}"
do_generate_content[dirs] = "${SDK_OUTPUT}/${SDKPATH}"
python do_generate_content() {
# Handle multilibs in the SDK environment, siteconfig, etc files...
localdata = bb.data.createCopy(d)
# make sure we only use the WORKDIR value from 'd', or it can change
localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
# make sure we only use the SDKTARGETSYSROOT value from 'd'
localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
localdata.setVar('libdir', d.getVar('target_libdir', False))
# Process DEFAULTTUNE
bb.build.exec_func("create_sdk_files", localdata)
variants = d.getVar("MULTILIB_VARIANTS", True) or ""
for item in variants.split():
# Load overrides from 'd' to avoid having to reset the value...
overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
localdata.setVar("OVERRIDES", overrides)
localdata.setVar("MLPREFIX", item + "-")
bb.data.update_data(localdata)
bb.build.exec_func("create_sdk_files", localdata)
}
addtask generate_content before do_install after do_compile
create_sdk_files() {
# Setup site file for external use
toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
# Add version information
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
}
do_install() {
install -d ${D}/${SDKPATH}
install -m 0644 -t ${D}/${SDKPATH} ${SDK_OUTPUT}/${SDKPATH}/*
}
PN = "meta-environment-${MACHINE}"
PACKAGES = "${PN}"
FILES_${PN}= " \
${SDKPATH}/* \
"
do_fetch[noexec] = "1"
do_unpack[noexec] = "1"
do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_populate_sysroot[noexec] = "1"
|