summaryrefslogtreecommitdiff
path: root/meta/classes/populate_sdk_ext.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-08-11 16:44:59 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-17 10:32:02 +0100
commit7bc95253098aca2ff195b159b34d9ac041806c75 (patch)
tree2897b639c0175568ed12003b589fd93d2cb28193 /meta/classes/populate_sdk_ext.bbclass
parentd65a6ee9e7a9c63b9a16bdb5025af8a7c6433c4f (diff)
downloadopenembedded-core-7bc95253098aca2ff195b159b34d9ac041806c75.tar.gz
openembedded-core-7bc95253098aca2ff195b159b34d9ac041806c75.tar.bz2
openembedded-core-7bc95253098aca2ff195b159b34d9ac041806c75.zip
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). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass19
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 () {
f.write(' $' + '{SDKBASEMETAPATH}/workspace \\\n')
f.write(' "\n')
+ # Copy uninative tarball
+ # For now this is where uninative.bbclass expects the tarball
+ uninative_file = d.expand('${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2')
+ uninative_checksum = bb.utils.sha256_file(uninative_file)
+ uninative_outdir = '%s/downloads/uninative/%s' % (baseoutpath, uninative_checksum)
+ bb.utils.mkdirhier(uninative_outdir)
+ shutil.copy(uninative_file, uninative_outdir)
+
env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE', True) or '').split()
env_whitelist_values = {}
@@ -267,7 +275,8 @@ python copy_buildsystem () {
# Write a newline just in case there's none at the end of the original
f.write('\n')
- f.write('INHERIT += "%s"\n\n' % 'uninative')
+ f.write('INHERIT += "%s"\n' % 'uninative')
+ f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH', True), uninative_checksum))
f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False))
# Some classes are not suitable for SDK, remove them from INHERIT
@@ -446,18 +455,10 @@ install_tools() {
lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool
touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase
- localconf=${SDK_OUTPUT}/${SDKPATH}/conf/local.conf
-
# find latest buildtools-tarball and install it
buildtools_path=`ls -t1 ${SDK_DEPLOY}/${@extsdk_get_buildtools_filename(d)} | head -n1`
install $buildtools_path ${SDK_OUTPUT}/${SDKPATH}
- # For now this is where uninative.bbclass expects the tarball
- chksum=`sha256sum ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 | cut -f 1 -d ' '`
- install -d ${SDK_OUTPUT}/${SDKPATH}/downloads/uninative/$chksum/
- install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH}/downloads/uninative/$chksum/
- echo "UNINATIVE_CHECKSUM[${BUILD_ARCH}] = '$chksum'" >> ${SDK_OUTPUT}/${SDKPATH}/conf/local.conf
-
install -m 0644 ${COREBASE}/meta/files/ext-sdk-prepare.py ${SDK_OUTPUT}/${SDKPATH}
}
do_populate_sdk_ext[file-checksums] += "${COREBASE}/meta/files/ext-sdk-prepare.py:True"