diff options
| -rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 19 | ||||
| -rw-r--r-- | meta/lib/oe/copy_buildsystem.py | 5 | ||||
| -rw-r--r-- | meta/recipes-core/meta/meta-extsdk-toolchain.bb | 15 |
3 files changed, 36 insertions, 3 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 720142f822..211a02286e 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
| @@ -21,6 +21,7 @@ SDK_EXT_task-populate-sdk-ext = "-ext" | |||
| 21 | # Options are full or minimal | 21 | # Options are full or minimal |
| 22 | SDK_EXT_TYPE ?= "full" | 22 | SDK_EXT_TYPE ?= "full" |
| 23 | SDK_INCLUDE_PKGDATA ?= "0" | 23 | SDK_INCLUDE_PKGDATA ?= "0" |
| 24 | SDK_INCLUDE_TOOLCHAIN ?= "0" | ||
| 24 | 25 | ||
| 25 | SDK_RECRDEP_TASKS ?= "" | 26 | SDK_RECRDEP_TASKS ?= "" |
| 26 | 27 | ||
| @@ -54,6 +55,8 @@ def get_sdk_install_targets(d, images_only=False): | |||
| 54 | if not images_only: | 55 | if not images_only: |
| 55 | if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1': | 56 | if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1': |
| 56 | sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata' | 57 | sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata' |
| 58 | if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1': | ||
| 59 | sdk_install_targets += ' meta-extsdk-toolchain:do_populate_sysroot' | ||
| 57 | 60 | ||
| 58 | return sdk_install_targets | 61 | return sdk_install_targets |
| 59 | 62 | ||
| @@ -309,6 +312,19 @@ python copy_buildsystem () { | |||
| 309 | lockedsigs_pruned, | 312 | lockedsigs_pruned, |
| 310 | lockedsigs_copy) | 313 | lockedsigs_copy) |
| 311 | 314 | ||
| 315 | if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1': | ||
| 316 | lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base2.inc' | ||
| 317 | lockedsigs_toolchain = d.getVar('STAGING_DIR_HOST', True) + '/locked-sigs/locked-sigs-extsdk-toolchain.inc' | ||
| 318 | shutil.move(lockedsigs_pruned, lockedsigs_base) | ||
| 319 | oe.copy_buildsystem.merge_lockedsigs(['do_populate_sysroot'], | ||
| 320 | lockedsigs_base, | ||
| 321 | lockedsigs_toolchain, | ||
| 322 | lockedsigs_pruned) | ||
| 323 | oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_toolchain, | ||
| 324 | d.getVar('SSTATE_DIR', True), | ||
| 325 | sstate_out, d, | ||
| 326 | fixedlsbstring) | ||
| 327 | |||
| 312 | if d.getVar('SDK_EXT_TYPE', True) == 'minimal': | 328 | if d.getVar('SDK_EXT_TYPE', True) == 'minimal': |
| 313 | if derivative: | 329 | if derivative: |
| 314 | # Assume the user is not going to set up an additional sstate | 330 | # Assume the user is not going to set up an additional sstate |
| @@ -486,7 +502,8 @@ do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}" | |||
| 486 | 502 | ||
| 487 | do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \ | 503 | do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \ |
| 488 | buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk \ | 504 | buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk \ |
| 489 | ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''}" | 505 | ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''} \ |
| 506 | ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1' else ''}" | ||
| 490 | 507 | ||
| 491 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}" | 508 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}" |
| 492 | 509 | ||
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py index eddf5bb2da..b5f546f99f 100644 --- a/meta/lib/oe/copy_buildsystem.py +++ b/meta/lib/oe/copy_buildsystem.py | |||
| @@ -145,7 +145,7 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output | |||
| 145 | invalue = True | 145 | invalue = True |
| 146 | f.write(line) | 146 | f.write(line) |
| 147 | 147 | ||
| 148 | def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output): | 148 | def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output=None): |
| 149 | merged = {} | 149 | merged = {} |
| 150 | arch_order = [] | 150 | arch_order = [] |
| 151 | with open(lockedsigs_main, 'r') as f: | 151 | with open(lockedsigs_main, 'r') as f: |
| @@ -195,7 +195,8 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu | |||
| 195 | fulltypes.append(typename) | 195 | fulltypes.append(typename) |
| 196 | f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes)) | 196 | f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes)) |
| 197 | 197 | ||
| 198 | write_sigs_file(copy_output, list(tocopy.keys()), tocopy) | 198 | if copy_output: |
| 199 | write_sigs_file(copy_output, list(tocopy.keys()), tocopy) | ||
| 199 | if merged_output: | 200 | if merged_output: |
| 200 | write_sigs_file(merged_output, arch_order, merged) | 201 | write_sigs_file(merged_output, arch_order, merged) |
| 201 | 202 | ||
diff --git a/meta/recipes-core/meta/meta-extsdk-toolchain.bb b/meta/recipes-core/meta/meta-extsdk-toolchain.bb index 9bff22053c..886ff076dc 100644 --- a/meta/recipes-core/meta/meta-extsdk-toolchain.bb +++ b/meta/recipes-core/meta/meta-extsdk-toolchain.bb | |||
| @@ -11,3 +11,18 @@ do_populate_sysroot[deptask] = "do_populate_sysroot" | |||
| 11 | # NOTE: There is logic specific to this recipe in setscene_depvalid() | 11 | # NOTE: There is logic specific to this recipe in setscene_depvalid() |
| 12 | # within sstate.bbclass, so if you copy or rename this and expect the same | 12 | # within sstate.bbclass, so if you copy or rename this and expect the same |
| 13 | # functionality you'll need to modify that as well. | 13 | # functionality you'll need to modify that as well. |
| 14 | |||
| 15 | LOCKED_SIGS_INDIR = "${D}/locked-sigs" | ||
| 16 | |||
| 17 | addtask do_locked_sigs after do_populate_sysroot | ||
| 18 | SSTATETASKS += "do_locked_sigs" | ||
| 19 | do_locked_sigs[sstate-inputdirs] = "${LOCKED_SIGS_INDIR}" | ||
| 20 | do_locked_sigs[sstate-outputdirs] = "${STAGING_DIR_HOST}/locked-sigs" | ||
| 21 | |||
| 22 | python do_locked_sigs() { | ||
| 23 | import oe.copy_buildsystem | ||
| 24 | outdir = os.path.join(d.getVar('LOCKED_SIGS_INDIR', True)) | ||
| 25 | bb.utils.mkdirhier(outdir) | ||
| 26 | sigfile = os.path.join(outdir, 'locked-sigs-extsdk-toolchain.inc') | ||
| 27 | oe.copy_buildsystem.generate_locked_sigs(sigfile, d) | ||
| 28 | } | ||
