summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_ext.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 6f35b612c2..14689ec6ac 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -24,6 +24,7 @@ SDK_INCLUDE_NATIVESDK ?= "0"
24SDK_INCLUDE_BUILDTOOLS ?= '1' 24SDK_INCLUDE_BUILDTOOLS ?= '1'
25 25
26SDK_RECRDEP_TASKS ?= "" 26SDK_RECRDEP_TASKS ?= ""
27SDK_CUSTOM_TEMPLATECONF ?= "0"
27 28
28SDK_LOCAL_CONF_WHITELIST ?= "" 29SDK_LOCAL_CONF_WHITELIST ?= ""
29SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \ 30SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
@@ -199,6 +200,9 @@ python copy_buildsystem () {
199 buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d) 200 buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d)
200 baseoutpath = d.getVar('SDK_OUTPUT') + '/' + d.getVar('SDKPATH') 201 baseoutpath = d.getVar('SDK_OUTPUT') + '/' + d.getVar('SDKPATH')
201 202
203 #check if custome templateconf path is set
204 use_custom_templateconf = d.getVar('SDK_CUSTOM_TEMPLATECONF')
205
202 # Determine if we're building a derivative extensible SDK (from devtool build-sdk) 206 # Determine if we're building a derivative extensible SDK (from devtool build-sdk)
203 derivative = (d.getVar('SDK_DERIVATIVE') or '') == '1' 207 derivative = (d.getVar('SDK_DERIVATIVE') or '') == '1'
204 if derivative: 208 if derivative:
@@ -247,7 +251,9 @@ python copy_buildsystem () {
247 251
248 # Create a layer for new recipes / appends 252 # Create a layer for new recipes / appends
249 bbpath = d.getVar('BBPATH') 253 bbpath = d.getVar('BBPATH')
250 bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) 254 env = os.environ.copy()
255 env['PYTHONDONTWRITEBYTECODE'] = '1'
256 bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')], env=env)
251 257
252 # Create bblayers.conf 258 # Create bblayers.conf
253 bb.utils.mkdirhier(baseoutpath + '/conf') 259 bb.utils.mkdirhier(baseoutpath + '/conf')
@@ -360,6 +366,9 @@ python copy_buildsystem () {
360 # Hide the config information from bitbake output (since it's fixed within the SDK) 366 # Hide the config information from bitbake output (since it's fixed within the SDK)
361 f.write('BUILDCFG_HEADER = ""\n\n') 367 f.write('BUILDCFG_HEADER = ""\n\n')
362 368
369 # Write METADATA_REVISION
370 f.write('METADATA_REVISION = "%s"\n\n' % d.getVar('METADATA_REVISION'))
371
363 f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n') 372 f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n')
364 f.write('WITHIN_EXT_SDK = "1"\n\n') 373 f.write('WITHIN_EXT_SDK = "1"\n\n')
365 374
@@ -390,7 +399,7 @@ python copy_buildsystem () {
390 shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat') 399 shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')
391 400
392 # Use templateconf.cfg file from builddir if exists 401 # Use templateconf.cfg file from builddir if exists
393 if os.path.exists(builddir + '/conf/templateconf.cfg'): 402 if os.path.exists(builddir + '/conf/templateconf.cfg') and use_custom_templateconf == '1':
394 shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg') 403 shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg')
395 else: 404 else:
396 # Write a templateconf.cfg 405 # Write a templateconf.cfg