SDK-related fixes
cover SDK-related fixes
A bugfix and some minor improvements for the extensible SDK (the last two apply also to the standard SDK).
The following changes since commit 2e3c8fd70694dcf9553b5e4c50a57b617a9130b6:
image.bbclass: Allow to remove do_rootfs -> virtual/kernel:do_packagedata dependency (2015-04-20 15:29:06 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/extsdkfixes
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/extsdkfixes
Paul Eggleton (5):
devtool: force use of bash when running build within extensible SDK classes/populate_sdk_ext: disable network connectivity check classes/populate_sdk_ext: add warning against editing configuration classes/populate_sdk_base: Show title in SDK installer toolchain-shar-extract.sh: mention how to set up the SDK environment
meta/classes/populate_sdk_base.bbclass | 4 ++++ meta/classes/populate_sdk_ext.bbclass | 15 +++++++++++++++ meta/files/toolchain-shar-extract.sh | 5 +++++ meta/recipes-core/meta/buildtools-tarball.bb | 2 ++ scripts/lib/devtool/__init__.py | 5 +++++ 5 files changed, 31 insertions(+)
Signature · 1 line
2.1.0
PATCH 1/5 devtool: force use of bash when running build within extensible SDK
Ubuntu's default dash shell causes oe-init-build-env to behave a bit differently - (a) it can't pick up the OE root directory and (b) it can't see any build directory specified as a command-line argument (since dash doesn't pass through any arguments specified to sourced scripts). We could work around these but doing so requires some internal knowledge of the script; a much simpler fix is just to force running the command under bash since it's expected to be installed on every distro.
Thanks to Chen Qi <[email protected]> for this fix.
Fixes [YOCTO #7614].
--- scripts/lib/devtool/__init__.py | 5 +++++ 1 file changed, 5 insertions(+)
scripts/lib/devtool/__init__.py +5 -0
@@ -30,6 +30,11 @@ def exec_build_env_command(init_path, builddir, cmd, watch=False, **options): if not 'cwd' in options: options["cwd"] = builddir if init_path: + # As the OE init script makes use of BASH_SOURCE to determine OEROOT, + # and can't determine it when running under dash, we need to set + # the executable to bash to correctly set things up + if not 'executable' in options: + options['executable'] = 'bash' logger.debug('Executing command: "%s" using init path %s' % (cmd, init_path)) init_prefix = '. %s %s > /dev/null && ' % (init_path, builddir) else:
Signature · 1 line
2.1.0
PATCH 2/5 classes/populate_sdk_ext: disable network connectivity check
In reply to Paul EggletonMost of the time we shouldn't be downloading anything within the extensible SDK (since it's all pre-built and we have the sstate artifacts) therefore there's really no need for a connectivity check, in fact it may just get in the way.
--- meta/classes/populate_sdk_ext.bbclass | 3 +++ 1 file changed, 3 insertions(+)
meta/classes/populate_sdk_ext.bbclass +3 -0
@@ -110,6 +110,9 @@ python copy_buildsystem () { f.write('POKYQEMUDEPS_forcevariable = ""\n\n') f.write('EXTRA_IMAGEDEPENDS_remove = "qemu-native qemu-helper-native"\n\n') + # Bypass the default connectivity check if any + f.write('CONNECTIVITY_CHECK_URIS = ""\n\n') + # Another hack, but we want the native part of sstate to be kept the same # regardless of the host distro fixedlsbstring = 'SDK-Fixed'
Signature · 1 line
2.1.0
PATCH 3/5 classes/populate_sdk_ext: add warning against editing configuration
In reply to Paul EggletonIt may be tempting to edit the configuration of the encapsulated version of the build system, however that is not the way it is intended to be used, so add a warning against doing this.
--- meta/classes/populate_sdk_ext.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/classes/populate_sdk_ext.bbclass +10 -0
@@ -91,6 +91,11 @@ python copy_buildsystem () { # Create bblayers.conf bb.utils.mkdirhier(baseoutpath + '/conf') with open(baseoutpath + '/conf/bblayers.conf', 'w') as f: + f.write('# WARNING: this configuration has been automatically generated and in\n') + f.write('# most cases should not be edited. If you need more flexibility than\n') + f.write('# this configuration provides, it is strongly suggested that you set\n') + f.write('# up a proper instance of the full build system and use that instead.\n\n') + f.write('LCONF_VERSION = "%s"\n\n' % d.getVar('LCONF_VERSION')) f.write('BBPATH = "$' + '{TOPDIR}"\n') f.write('SDKBASEMETAPATH = "$' + '{TOPDIR}"\n')
@@ -102,6 +107,11 @@ python copy_buildsystem () { # Create local.conf with open(baseoutpath + '/conf/local.conf', 'w') as f: + f.write('# WARNING: this configuration has been automatically generated and in\n') + f.write('# most cases should not be edited. If you need more flexibility than\n') + f.write('# this configuration provides, it is strongly suggested that you set\n') + f.write('# up a proper instance of the full build system and use that instead.\n\n') + f.write('INHERIT += "%s"\n\n' % 'uninative') f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION'))
Signature · 1 line
2.1.0
PATCH 4/5 classes/populate_sdk_base: Show title in SDK installer
In reply to Paul EggletonShow a friendly title when running the SDK installer, so the user knows what SDK they are installing. The title is controlled by the SDK_INSTALLER_TITLE variable and includes the distro name and SDK version by default.
--- meta/classes/populate_sdk_base.bbclass | 4 ++++ meta/classes/populate_sdk_ext.bbclass | 2 ++ meta/files/toolchain-shar-extract.sh | 3 +++ meta/recipes-core/meta/buildtools-tarball.bb | 2 ++ 4 files changed, 11 insertions(+)
meta/classes/populate_sdk_base.bbclass +4 -0
@@ -54,6 +54,8 @@ SDK_PACKAGING_FUNC ?= "create_shar" SDK_POST_INSTALL_COMMAND ?= "" SDK_RELOCATE_AFTER_INSTALL ?= "1" +SDK_TITLE ?= "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} SDK" + SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest" python write_target_sdk_manifest () { from oe.sdk import sdk_list_installed_packages
@@ -134,6 +136,8 @@ EOF -e 's#@SDKPATH@#${SDKPATH}#g' \ -e 's#@OLDEST_KERNEL@#${OLDEST_KERNEL}#g' \ -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ + -e 's#@SDK_TITLE@#${SDK_TITLE}#g' \ + -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \ -e '/@SDK_POST_INSTALL_COMMAND@/d' \ ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
meta/classes/populate_sdk_ext.bbclass +2 -0
@@ -35,6 +35,8 @@ SDK_DIR_task-populate-sdk-ext = "${WORKDIR}/sdk-ext" B_task-populate-sdk-ext = "${SDK_DIR}" TOOLCHAIN_OUTPUTNAME_task-populate-sdk-ext = "${SDK_NAME}-toolchain-ext-${SDK_VERSION}" +SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} Extensible SDK" + python copy_buildsystem () { import re import oe.copy_buildsystem
meta/files/toolchain-shar-extract.sh +3 -0
@@ -64,6 +64,9 @@ while getopts ":yd:DRS" OPT; do esac done +echo "@SDK_TITLE@ installer version @SDK_VERSION@" +echo "===========================================================" + if [ $verbose = 1 ] ; then set -x fi
meta/recipes-core/meta/buildtools-tarball.bb +2 -0
@@ -29,6 +29,8 @@ SDK_PACKAGE_ARCHS =+ "buildtools-dummy-${SDKPKGSUFFIX}" TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}" +SDK_TITLE = "Build tools" + RDEPENDS = "${TOOLCHAIN_HOST_TASK}" EXCLUDE_FROM_WORLD = "1"
Signature · 1 line
2.1.0
PATCH 5/5 toolchain-shar-extract.sh: mention how to set up the SDK environment
In reply to Paul EggletonTell the user how to set up the SDK environment each time they want to use it.
--- meta/files/toolchain-shar-extract.sh | 2 ++ 1 file changed, 2 insertions(+)
meta/files/toolchain-shar-extract.sh +2 -0
@@ -151,6 +151,8 @@ if [ $savescripts = 0 ] ; then fi echo "SDK has been successfully set up and is ready to be used." +echo "Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g." +echo " \$ . $target_sdk_dir/environment-setup-@REAL_MULTIMACH_TARGET_SYS@" exit 0
Signature · 1 line
2.1.0