mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-06 21:54:46 +02:00

This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
56 lines
1.9 KiB
Python
56 lines
1.9 KiB
Python
# Development tool - build-sdk command plugin
|
|
#
|
|
# Copyright (C) 2015-2016 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
|
|
import os
|
|
import subprocess
|
|
import logging
|
|
import glob
|
|
import shutil
|
|
import errno
|
|
import sys
|
|
import tempfile
|
|
from devtool import exec_build_env_command, setup_tinfoil, parse_recipe, DevtoolError
|
|
from devtool import build_image
|
|
|
|
logger = logging.getLogger('devtool')
|
|
|
|
|
|
def build_sdk(args, config, basepath, workspace):
|
|
"""Entry point for the devtool build-sdk command"""
|
|
|
|
sdk_targets = config.get('SDK', 'sdk_targets', '').split()
|
|
if sdk_targets:
|
|
image = sdk_targets[0]
|
|
else:
|
|
raise DevtoolError('Unable to determine image to build SDK for')
|
|
|
|
extra_append = ['SDK_DERIVATIVE = "1"']
|
|
try:
|
|
result, outputdir = build_image.build_image_task(config,
|
|
basepath,
|
|
workspace,
|
|
image,
|
|
task='populate_sdk_ext',
|
|
extra_append=extra_append)
|
|
except build_image.TargetNotImageError:
|
|
raise DevtoolError('Unable to determine image to build SDK for')
|
|
|
|
if result == 0:
|
|
logger.info('Successfully built SDK. You can find output files in %s'
|
|
% outputdir)
|
|
return result
|
|
|
|
|
|
def register_commands(subparsers, context):
|
|
"""Register devtool subcommands"""
|
|
if context.fixed_setup:
|
|
parser_build_sdk = subparsers.add_parser('build-sdk',
|
|
help='Build a derivative SDK of this one',
|
|
description='Builds an extensible SDK based upon this one and the items in your workspace',
|
|
group='advanced')
|
|
parser_build_sdk.set_defaults(func=build_sdk)
|