diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-08-11 16:44:59 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:35:40 +0100 |
commit | cdd2460ff3368d1916e3baf470addb4bdc7a2c17 (patch) | |
tree | 215a29547538591950d09512245bb2b0bb221101 /meta/classes/populate_sdk_ext.bbclass | |
parent | 0a78f987de9528c042500c5cd756b9c2bae64db0 (diff) | |
download | poky-cdd2460ff3368d1916e3baf470addb4bdc7a2c17.tar.gz |
classes/populate_sdk_ext: ensure eSDK can build without uninative enabled
We were relying on uninative being enabled in the build in which the
eSDK was being produced, which is not the case for example for OE-Core's
default configuration. Move the code that copies the uninative tarball
and writes the checksum to copy_buildsystem so that it happens early
enough for that part of the configuration to be set up when we do the
filtering (which requires running bitbake).
(From OE-Core rev: 7bc95253098aca2ff195b159b34d9ac041806c75)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index f6b08346b5..f758d9874e 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -233,6 +233,14 @@ python copy_buildsystem () { | |||
233 | f.write(' $' + '{SDKBASEMETAPATH}/workspace \\\n') | 233 | f.write(' $' + '{SDKBASEMETAPATH}/workspace \\\n') |
234 | f.write(' "\n') | 234 | f.write(' "\n') |
235 | 235 | ||
236 | # Copy uninative tarball | ||
237 | # For now this is where uninative.bbclass expects the tarball | ||
238 | uninative_file = d.expand('${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2') | ||
239 | uninative_checksum = bb.utils.sha256_file(uninative_file) | ||
240 | uninative_outdir = '%s/downloads/uninative/%s' % (baseoutpath, uninative_checksum) | ||
241 | bb.utils.mkdirhier(uninative_outdir) | ||
242 | shutil.copy(uninative_file, uninative_outdir) | ||
243 | |||
236 | env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE', True) or '').split() | 244 | env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE', True) or '').split() |
237 | env_whitelist_values = {} | 245 | env_whitelist_values = {} |
238 | 246 | ||
@@ -267,7 +275,8 @@ python copy_buildsystem () { | |||
267 | # Write a newline just in case there's none at the end of the original | 275 | # Write a newline just in case there's none at the end of the original |
268 | f.write('\n') | 276 | f.write('\n') |
269 | 277 | ||
270 | f.write('INHERIT += "%s"\n\n' % 'uninative') | 278 | f.write('INHERIT += "%s"\n' % 'uninative') |
279 | f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH', True), uninative_checksum)) | ||
271 | f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False)) | 280 | f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False)) |
272 | 281 | ||
273 | # Some classes are not suitable for SDK, remove them from INHERIT | 282 | # Some classes are not suitable for SDK, remove them from INHERIT |
@@ -446,18 +455,10 @@ install_tools() { | |||
446 | lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool | 455 | lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool |
447 | touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase | 456 | touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase |
448 | 457 | ||
449 | localconf=${SDK_OUTPUT}/${SDKPATH}/conf/local.conf | ||
450 | |||
451 | # find latest buildtools-tarball and install it | 458 | # find latest buildtools-tarball and install it |
452 | buildtools_path=`ls -t1 ${SDK_DEPLOY}/${@extsdk_get_buildtools_filename(d)} | head -n1` | 459 | buildtools_path=`ls -t1 ${SDK_DEPLOY}/${@extsdk_get_buildtools_filename(d)} | head -n1` |
453 | install $buildtools_path ${SDK_OUTPUT}/${SDKPATH} | 460 | install $buildtools_path ${SDK_OUTPUT}/${SDKPATH} |
454 | 461 | ||
455 | # For now this is where uninative.bbclass expects the tarball | ||
456 | chksum=`sha256sum ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 | cut -f 1 -d ' '` | ||
457 | install -d ${SDK_OUTPUT}/${SDKPATH}/downloads/uninative/$chksum/ | ||
458 | install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH}/downloads/uninative/$chksum/ | ||
459 | echo "UNINATIVE_CHECKSUM[${BUILD_ARCH}] = '$chksum'" >> ${SDK_OUTPUT}/${SDKPATH}/conf/local.conf | ||
460 | |||
461 | install -m 0644 ${COREBASE}/meta/files/ext-sdk-prepare.py ${SDK_OUTPUT}/${SDKPATH} | 462 | install -m 0644 ${COREBASE}/meta/files/ext-sdk-prepare.py ${SDK_OUTPUT}/${SDKPATH} |
462 | } | 463 | } |
463 | do_populate_sdk_ext[file-checksums] += "${COREBASE}/meta/files/ext-sdk-prepare.py:True" | 464 | do_populate_sdk_ext[file-checksums] += "${COREBASE}/meta/files/ext-sdk-prepare.py:True" |