summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/devtool/sdk.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 2d9d911e4c..7faefabad8 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -173,14 +173,15 @@ def sdk_update(args, config, basepath, workspace):
173 with open(os.path.join(basepath, 'conf/local.conf'), 'a') as f: 173 with open(os.path.join(basepath, 'conf/local.conf'), 'a') as f:
174 f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver) 174 f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver)
175 175
176 # Run bitbake command for the whole SDK 176 if not args.skip_prepare:
177 sdk_targets = config.get('SDK', 'sdk_targets') 177 # Run bitbake command for the whole SDK
178 logger.info("Executing 'bitbake %s' ... (This may take some time.)" % sdk_targets) 178 sdk_targets = config.get('SDK', 'sdk_targets')
179 try: 179 logger.info("Preparing build system... (This may take some time.)")
180 exec_build_env_command(config.init_path, basepath, 'bitbake %s' % sdk_targets) 180 try:
181 except: 181 exec_build_env_command(config.init_path, basepath, 'bitbake %s' % sdk_targets)
182 logger.error('bitbake %s failed' % sdk_targets) 182 except:
183 return -1 183 logger.error('bitbake %s failed' % sdk_targets)
184 return -1
184 return 0 185 return 0
185 186
186def register_commands(subparsers, context): 187def register_commands(subparsers, context):
@@ -188,4 +189,5 @@ def register_commands(subparsers, context):
188 if context.fixed_setup: 189 if context.fixed_setup:
189 parser_sdk = subparsers.add_parser('sdk-update', help='Update SDK components from a nominated location') 190 parser_sdk = subparsers.add_parser('sdk-update', help='Update SDK components from a nominated location')
190 parser_sdk.add_argument('updateserver', help='The update server to fetch latest SDK components from', nargs='?') 191 parser_sdk.add_argument('updateserver', help='The update server to fetch latest SDK components from', nargs='?')
192 parser_sdk.add_argument('--skip-prepare', action="store_true", help='Skip re-preparing the build system after updating (for debugging only)')
191 parser_sdk.set_defaults(func=sdk_update) 193 parser_sdk.set_defaults(func=sdk_update)