All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] SDK-related fixes
@ 2015-04-20 16:47 Paul Eggleton
  2015-04-20 16:47 ` [PATCH 1/5] devtool: force use of bash when running build within extensible SDK Paul Eggleton
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Paul Eggleton @ 2015-04-20 16:47 UTC (permalink / raw)
  To: openembedded-core

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(+)

-- 
2.1.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/5] devtool: force use of bash when running build within extensible SDK
  2015-04-20 16:47 [PATCH 0/5] SDK-related fixes Paul Eggleton
@ 2015-04-20 16:47 ` Paul Eggleton
  2015-04-20 16:47 ` [PATCH 2/5] classes/populate_sdk_ext: disable network connectivity check Paul Eggleton
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2015-04-20 16:47 UTC (permalink / raw)
  To: openembedded-core

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 <Qi.Chen@windriver.com> for this fix.

Fixes [YOCTO #7614].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/lib/devtool/__init__.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 3f8158e..78ae0aa 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -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:
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/5] classes/populate_sdk_ext: disable network connectivity check
  2015-04-20 16:47 [PATCH 0/5] SDK-related fixes Paul Eggleton
  2015-04-20 16:47 ` [PATCH 1/5] devtool: force use of bash when running build within extensible SDK Paul Eggleton
@ 2015-04-20 16:47 ` Paul Eggleton
  2015-04-20 16:47 ` [PATCH 3/5] classes/populate_sdk_ext: add warning against editing configuration Paul Eggleton
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2015-04-20 16:47 UTC (permalink / raw)
  To: openembedded-core

Most 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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/populate_sdk_ext.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 22e0ffc..17a8e8c 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -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'
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/5] classes/populate_sdk_ext: add warning against editing configuration
  2015-04-20 16:47 [PATCH 0/5] SDK-related fixes Paul Eggleton
  2015-04-20 16:47 ` [PATCH 1/5] devtool: force use of bash when running build within extensible SDK Paul Eggleton
  2015-04-20 16:47 ` [PATCH 2/5] classes/populate_sdk_ext: disable network connectivity check Paul Eggleton
@ 2015-04-20 16:47 ` Paul Eggleton
  2015-04-20 16:47 ` [PATCH 4/5] classes/populate_sdk_base: Show title in SDK installer Paul Eggleton
  2015-04-20 16:47 ` [PATCH 5/5] toolchain-shar-extract.sh: mention how to set up the SDK environment Paul Eggleton
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2015-04-20 16:47 UTC (permalink / raw)
  To: openembedded-core

It 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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/populate_sdk_ext.bbclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 17a8e8c..44b926e 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -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'))
 
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] classes/populate_sdk_base: Show title in SDK installer
  2015-04-20 16:47 [PATCH 0/5] SDK-related fixes Paul Eggleton
                   ` (2 preceding siblings ...)
  2015-04-20 16:47 ` [PATCH 3/5] classes/populate_sdk_ext: add warning against editing configuration Paul Eggleton
@ 2015-04-20 16:47 ` Paul Eggleton
  2015-04-20 16:47 ` [PATCH 5/5] toolchain-shar-extract.sh: mention how to set up the SDK environment Paul Eggleton
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2015-04-20 16:47 UTC (permalink / raw)
  To: openembedded-core

Show 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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 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(+)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 5c07693..13a0b1f 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -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
 
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 44b926e..dc2c58e 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -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
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 516aa3a..13b5951 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -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
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 6d4c8c8..3d2169b 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -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"
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] toolchain-shar-extract.sh: mention how to set up the SDK environment
  2015-04-20 16:47 [PATCH 0/5] SDK-related fixes Paul Eggleton
                   ` (3 preceding siblings ...)
  2015-04-20 16:47 ` [PATCH 4/5] classes/populate_sdk_base: Show title in SDK installer Paul Eggleton
@ 2015-04-20 16:47 ` Paul Eggleton
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2015-04-20 16:47 UTC (permalink / raw)
  To: openembedded-core

Tell the user how to set up the SDK environment each time they want to
use it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/files/toolchain-shar-extract.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 13b5951..8cb8783 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -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
 
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-20 16:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 16:47 [PATCH 0/5] SDK-related fixes Paul Eggleton
2015-04-20 16:47 ` [PATCH 1/5] devtool: force use of bash when running build within extensible SDK Paul Eggleton
2015-04-20 16:47 ` [PATCH 2/5] classes/populate_sdk_ext: disable network connectivity check Paul Eggleton
2015-04-20 16:47 ` [PATCH 3/5] classes/populate_sdk_ext: add warning against editing configuration Paul Eggleton
2015-04-20 16:47 ` [PATCH 4/5] classes/populate_sdk_base: Show title in SDK installer Paul Eggleton
2015-04-20 16:47 ` [PATCH 5/5] toolchain-shar-extract.sh: mention how to set up the SDK environment Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.