Commit Graph

110 Commits

Author SHA1 Message Date
Ross Burton 240f543188 populate_sdk_base: depend on nativesdk-glibc-locale
If we're building a SDK and we're using glibc so may be installing locales,
add a build-dependency on natiesdk-glibc-locale so the locales we need will
exist.

(From OE-Core rev: 8d6869a0a89d8cf3c6e57723fab2750ba2c885db)

(From OE-Core rev: 19fce2a6f76227de88e267f65f0e124645ea280e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton 541c5c7fc0 populate_sdk: install UTF-8 locales in SDKs
As glibc 2.27 can't read older locale-archives, SDKs using glibc 2.27 on hosts
using glibc earlier than 2.27 won't be able to find any locales, so bitbake
won't start and Python can't use UTF-8.

So by default install all locales into the SDK.  Special-case Extensible SDKs by
installing no locales as they ship glibc in a buildtools, and that will have the
locales.

Locale installation requires cross-localedef, so add that to DEPENDS.

Also remove the explicit en_US addition in buildtools-tarball as it is now
redundant.

(From OE-Core rev: 96896568d197cd06302713c24c0f7d91bfaea6c1)

(From OE-Core rev: af9eb2ef36cb5bfd87ea61ff3390949810097c9b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Robert P. J. Day f5187871ce classes: Replace "if test" file tests with POSIX file tests
In entire meta/classes/ directory, replace shell tests of the form
"if test -? ..." with POSIX tests of the form "if [ -? ...

(From OE-Core rev: 78928016f4cf38cf6751cb089200bf950d07ae93)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 11:08:34 +01:00
Ming Liu e2280b9e12 meta: remove remaining True option to getVar calls
This is a complementary fix to commit 7c552996:
[ meta: remove True option to getVar calls ]

it intended to remove all True option to getVar calls, but there are
still some remaining.

Search made with the following regex: getVar ?\((.*), True\)

(From OE-Core rev: 87d03ffe03d6f01e360bfd51714be96e62506e0a)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:02 +00:00
Ed Bartosh 5302fb4620 toolchain-shar-extract: compare SDK and host gcc versions
If ext sdk is built by gcc version higher than host gcc version
and host gcc version is 4.8 or 4.9 the installation is known to
fail due to the way uninative sstate package is built.

It's a known issue and we don't have a way to fix it for above
mentioned combinations of build and host gcc versions.

Detected non-installable combinations of gcc versions and
print an installation error.

[YOCTO #10881]

(From OE-Core rev: bfb9ea2604557804bd8c16adb57ccdd868a4020f)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:01 +00:00
Richard Purdie 7fb3c6a40a image/packagegroup/populate_sdk: Drop do_populate_sysroot task properly
Setting do_populate_sysroot as noexec means the code keeps thinking it can find
a manifest file for it. It also complicates sstate installtion since the code
would believe there is an sstate object there it should look for.

Instead, delete the task. This causes sdk failures as the dependencies are wrong
so fix those as well.

(From OE-Core rev: bd7d0314038a4c1a8e8c9ebdb7194f8e17db3fef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-26 10:44:27 +00:00
Aníbal Limón ad2168365f classes/populate_sdk_base: Add write_sdk_test_data to postprocess
This function will generates testdata.json per SDK type.

[YOCTO #10231]

(From OE-Core rev: bff1b66c6b88fd2d99d14cecba27ee2f7462711f)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Ross Burton 1349320ee0 populate_sdk: don't force target debug packages into SDK
TOOLCHAIN_TARGET_TASK doesn't need to explicitly list sdk-target-dbg because if
SDKIMAGE_FEATURES contains dbg-pkgs (as it does by default) then they'll all be
installed anyway.  This means that if the user removes dbg-pkgs from
SDKIMAGE_FEATURES then the SDK correctly doesn't have debug packages in.

[ YOCTO #9078 ]

(From OE-Core rev: 4c711830ae26008f73bbf557964bdb86b8c922da)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-05 13:54:05 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Alexander Kanavin eb345ca720 populate_sdk_base.bbclass: add documentation packages to SDKs if api-documentation is in DISTRO_FEATURES
(From OE-Core rev: d2b7b3fca328449cd87997be7f897b59433a153d)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-06 23:35:36 +00:00
Paul Eggleton 2b1cbb43ae classes/nativesdk: set SDK_OLDEST_KERNEL appropriately
SDK_OLDEST_KERNEL currently only controls the check on SDK installation,
however as with OLDEST_KERNEL it should be controlling the OLDEST_KERNEL
value for building glibc used in the SDK. Thus, set it in
nativesdk.bbclass. This means we need to move the default to
bitbake.conf so that it can be seen in both places.

Also set a more reasonable default for SDK_OLDEST_KERNEL for x86/x86-64 as
glibc 2.24 still supports back to 2.6.32 there and there are still
people wanting to build SDKs that will install on older distros (e.g.
CentOS 6). However it's not possible to set this with overrides since
there aren't any for the SDK_ARCH, however we can instead set the variable
from conf files in conf/machine-sdk especially as there is now a soft
default for SDKMACHINE.

Fixes [YOCTO #10561].

(From OE-Core rev: 42d5781e31c5bf76b5b7e27abed4f6f3fd65bf40)

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>
2016-11-06 23:35:33 +00:00
Paul Eggleton 8381bb0b5f classes/populate_sdk_base: fix usage of & character in SDK_TITLE
If you used an & character in SDK_TITLE (possibly indirectly from
DISTRO_NAME) then sed interpreted this as a directive to paste in the
replaced string (@SDK_TITLE@ in this case). Escape any & characters in
SDK_TITLE to avoid that.

(From OE-Core rev: acb85689c13cfdac21435509001048af5c3a7e99)

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>
2016-11-06 23:35:33 +00:00
Peter Kjellerstedt 79286b497a populate_sdk_base.bbclass: Make do_populate_sdk depend on PACKAGE_EXCLUDE_COMPLEMENTARY
(From OE-Core rev: 06c732bb8e2896d789716e7f0635aac9ff3a2d42)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-06 07:51:00 +01:00
Ioan-Adrian Ratiu 93d4250c2b populate_sdk_base.bbclass: fix broken variables
This function never worked because the SDK_OUTPUT and SDKPATH vars are
written bash-style in a python function. The only reason it never failed
a build is because the function bails out the start because of the flag
CHECK_SDK_SYSROOTS.

And I guess nobody tested with CHECK_SDK_SYSROOTS enabled until now.

(From OE-Core rev: 9f60dfdaaa74b90ebcfcdd9f3817c62a56243e92)

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28 10:16:04 +01:00
Joshua Lock e29c4609c9 populate_sdk_base: fix support for changing SDKMACHINE settings
Include SDKMACHINE in the tasks stamp information and the name of
the sstate-inputdirs so that changing SDKMACHINE doesn't result in
valid output of the task being deleted when SDKMACHINE is changed.

Without this patch changing SDKMACHINE and building an SDK resulted
in toolchain installers for other  SDKMACHINE's being deleted from
the deploy directoy.

[YOCTO #10275]

(From OE-Core rev: d7a06b53af0066bd12f5f42e10e82b307fd069ce)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 18:12:09 +01:00
Ed Bartosh 3c3962d27e populate_sdk_base: Put populate_sdk under sstate control
Adding populate_sdk task to SSTATE_TASKS should make sstate machinery
to generate manifest for deployed sdk artifacts and do final deployment
to SDK_DEPLOY.

Set stamp-extra-info flag for do_populate_sdk task. This flag is used
in the name of sstate manifest. Setting it to predetermined value for
populate_sdk task should help to get correct manifest filenames when
processing runQueueTask events.

The do_populate_sdk function is also executed by do_populate_sdk_ext
so in order to avoid conflicts with the sstate postfuncs, split
the main code into a separate function.

We also need to set SDKDEPLOYDIR as do_populate_sdk_ext expects
it in order not to break ESDK generation.

(From OE-Core rev: 8361376b8ef0147276c9ee31349e904d86900593)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-04 00:07:29 +01:00
Richard Purdie 5f9889edb3 populate_sdk_base: Deploy images to SDKDEPLOYDIR
Changed deployment directory from DEPLOY_DIR_IMAGE to
SDKDEPLOYDIR to make sstate machinery to do final deployment and
generate manifest.

(From OE-Core rev: 1c8c8d8a0e2c73b3bb8a9a222bf5e8aa9927e526)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-04 00:07:28 +01:00
Ed Bartosh 619d2996fb image/populate_sdk_base: Add *DEPLOYDIR variables
This is a preparation for changing deployment directory for image
and populate_sdk targets.

Introduced new variables, IMGDEPLOYDIR and SDKDEPLOYDIR. Set it to current
image/sdk deployment locations.

(From OE-Core rev: 8969b885044eb46dba3dbf62a0243aef673443d3)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-04 00:07:28 +01:00
Khem Raj e511478763 conf: bump minimum kernel to 3.2.0
glibc 2.24 have raised the bar for minimum supported kernel
for more details see

http://repo.or.cz/glibc.git/commit/5b4ecd3f95695ef593e4474b4ab5a117291ba5fc

(From OE-Core rev: 2722a7acb7f7d812f01fa93b764c9bb1ee725436)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:30 +01:00
Christopher Larson a005d25185 populate_sdk_base: handle empty SDK_PACKAGING_FUNC
Currently, the pre/post process command variables are parsed as shell, even
though they're not shell anymore. As a result, an empty SDK_PACKAGING_FUNC
results in a parsing error. Rather than manually adding their vardeps, only
append its ; when the var is set.

(From OE-Core rev: f836f4bfd83862a1a0da7d4cc20ae9eaf62118da)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-02 22:39:44 +00:00
Chen Qi eb6d14e64c image/populate_sdk: seprate variables to fix dependency
Previously, do_rootfs depends on variables like SDK_OS, SDK_OUTPUT, etc.
And changing variables like POPULATE_SDK_POST_HOST_COMMAND doesn't cause
do_populate_sdk to rerun.

This patch separates variables so that do_rootfs and do_populate_sdk could
correctly depend on their related variables.

[YOCTO #8670]

(From OE-Core rev: 590cf4be70f1355622d3a94d76b4cc6d525d4a34)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18 07:39:30 +00:00
Richard Purdie 861c91667d populate_sdk: Use pixz instead of xz
xz is slow at compressing the SDKs, we can speed it up by using the
parallel compressor, pixz.

(From OE-Core rev: f4ec14b986fee791da33b8900c28c956f17b28b0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:34 +00:00
Paul Eggleton 979c8fbec4 classes/populate_sdk*: add dependencies on script files
If the script files we use to construct the SDK installer change then
that really ought to trigger re-execution of the do_populate_sdk(_ext)
task, so add file-checksums varflags to ensure that happens.

(From OE-Core rev: 59fc4bdefb3853d6893b9e3792018d54bb6bf99f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:33 +00:00
Mariano Lopez 6ebda8e659 lib/oe/rootfs: Use list_pkgs() instead of list()
This patch changes the use list_pkgs() instead of list()
from class RpmPkgsList. The change is in two functions,
image_list_installed_packages from rootfs.py and
sdk_list_installed_packages from sdk.py.

With this change the functions calling the functions
listed above, must format the output as they required.
The formatting can be done using format_pkg_list() from
oe.utils.

The classes calling the afected functions are changed too
with this patch, to keep the same functionality using the
new data structure.

[YOCTO #7427]

(From OE-Core rev: 983ea373362514e5888bd1d7d9c4f136c94b00f2)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20 17:07:15 +00:00
Richard Purdie e1a558a434 populate_sdk: Switch from bzip2 to xz
xz gives *much* faster decompression times for the SDK which in itself
is a good reason to use it. It also gives better compression.

One downside is its slower but we care about the end user case
first, build performance secondary.

It also assumes the SDK user has a tar capable of understanding a xz
compressed file but that should be common enough now.

(From OE-Core rev: 193086137b899a0a4e774ffc337ed0da9947fd4f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11 23:26:29 +00:00
Haris Okanovic 5ba638210c populate_sdk_base: Add sysroot symlink check
Add optional check to do_populate_sdk() that verifies SDK sysroots don't
contain dangling or escaping symlinks before attempting to tar an archive.
Such links may fail a `tar -h` operation (-h => follow symlinks) or
archive the build system's files.

Set CHECK_SDK_SYSROOTS = "1" to enable this check.

Use case: The -h option may be set via SDKTAROPTS in some configurations
to create symlink-less SDK archives for Windows file systems.

(From OE-Core rev: 2658200fa2b3df08880ee937a3de5cb2866f8a50)

Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:00 +00:00
Richard Purdie d023d99274 populate_sdk_base: Ensure PKGDATA_DIR exists
The code assumes that PKG_DATADIR exists and will fail if an image has not been
generated which creates it. This occurs when something like buildtools-tarball
is built which doesn't have target packages, only nativesdk ones.

Since this shouldn't be fatal, workaround this by creating the missing
directory.

(From OE-Core rev: 319c5d55bb0c7e429766f46dd42a15e16a43c4dd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:29 +00:00
Richard Purdie 434665d933 populate_sdk_base: Simplify postprocess commands
When looking at and trying to build a slightly customised SDK, I
realised the code could be simplified and written in a way which was
more customisable.

This patch moves various function calls into the SDK_POSTPROCESS_COMMAND
which was intended for this kind of use.

(From OE-Core rev: baa4e43a29e45df17eaa3456acc179b08d571db6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01 07:43:32 +01:00
Richard Purdie 7c2ff62cb4 populate_sdk_base: Fix aarch64 OLDEST_KERNEL sdk issues
aarch64 sets OLDEST_KERNEL to 3.14. This stops the aarch64 SDK installing on
anything with an older kernel which is clearly incorrect.

I attempted to extract the correct non-overridden version from the data store
but it proved problematic and I was running into data store issues. Those
are a separate problem but there isn't time to fix this right now.

Instead just code the SDK kernel version separately to work around this for
now (and fix the autobuilder tests and SDK usage).

(From OE-Core rev: 522ba4c51fff53566678b2689d0d63c393e417b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:47 +01:00
Brendan Le Foll 08d07355c5 toolchain-shar-extract.sh: better default install path for extensible SDK
Extensible SDK cannot be installed as root so by default offer to install it in
user's home directory under distro/distro_version replacing the normal SDK
version '+' char with a '_' as that's a restricted character for bitbake

(From OE-Core rev: 5486e76cd8abb946b81cff78719d67cfb87cddc6)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:40 +01:00
Randy Witt 2563aa5528 extensible sdk: Error when trying to install as root.
Since the extensible sdk uses bitbake, which can't run as root, the sdk
shouldn't be installed as root.

Previously it would error out late into setup when bitbake errored
saying not to run bitbake as root.

Now the script errors with a message saying the extensible sdk can't be
installed as root.

[Yocto #7545]

(From OE-Core rev: 309e8f4e536148056223f50637ed291c48d148ca)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-20 10:40:40 +01:00
Robert Yang 274389c566 populate_sdk_base.bbclass: don't inherit toolchain-scripts.bbclass
Fixed when enable multilib:
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake core-image-minimal
No lib32 package should be built since we don't build
lib32-core-image-minimal, but a lot them are built:
lib32-opkg-utils
lib32-cryptodev-linux
lib32-sqlite3
lib32-libtool-cross
lib32-ncurses
lib32-db
lib32-diffutils
lib32-zlib
lib32-gcc-cross-i686
lib32-gcc-cross-initial-i686
lib32-flex
lib32-libgcc-initial
lib32-libffi
lib32-linux-libc-headers
lib32-expat
lib32-openssl
lib32-glibc
lib32-binutils-cross-i686
lib32-gcc-runtime

The are introduced by toolchain-scripts.bbclass' anonymous function (the
MULTILIB_VARIANTS), but it doesn't need toolchain-scripts.bbclass, in
fact, so remove it to fix the problem.

[YOCTO #7961]

(From OE-Core rev: 000ff33729854b1a41206a087cde1e50f49017e0)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:55:41 +01:00
Andre McCurdy 2eb1794fa0 populate_sdk_base.bbclass: use pbzip2 to compress SDK tarfiles
(From OE-Core rev: 670f5cda06070ae888d17cca7a07aa74d751c2f7)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:53 +01:00
Chen Qi 6bae518c10 populate_sdk_base: also record the host part into manifest
For now, we can create manifest for the target part for SDK.
I think it's nice to have a place for users to look into to examine contents
of the host part of SDK.

This also affects uninative-tarball and buildtools-tarball as they
inherit populate_sdk.bbclass. After this change, we could have a manifest file
created in the deploy directory containing a list of packages used to
construct them.

[YOCTO #7604]

(From OE-Core rev: 3069641589942f52b11e88cfea564ebba4beb3c2)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-28 07:56:54 +01:00
Chen Qi 2f78aebed2 populate_sdk_base: avoid executing empty function
`bitbake uninative-tarball' raises the following warning.

    WARNING: Function  doesn't exist

This is because SDK_PACKAGING_FUNC is set to "" in its recipe.
Anyway, we need to check this variable to avoid executing empty function.

[YOCTO #7598]

(From OE-Core rev: 4c0ae7cce06de15f6881654ecec7f8bb743ff389)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-24 11:14:38 +01:00
Paul Eggleton f61e57293e classes/populate_sdk_base: Show title in SDK installer
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.

(From OE-Core rev: 0af913887f4c0a79c6b950bd5d57c06333520a14)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-24 11:06:55 +01:00
Randy Witt 01c9f3b390 toolchain-shar-template.sh: Make relocation optional.
If the buildsystem is copied into the sdk and its toolchain is to
be used, then the relocation provided in toolchain-shar-template.sh
isn't needed and will actually fail.

So break the relocation aspect out and essentially make it another
SDK_POST_INSTALL_COMMAND script.

(From OE-Core rev: 9721378688a05cd8d8443c6ee4be823e5c0688f6)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 17:41:43 +00:00
Richard Purdie 508509d150 populate_sdk: Handle OLDEST_KERNEL
Add a check to the SDK so that it only runs on systems with kernel versions
it supports.

[YOCTO #6856]

(From OE-Core rev: b4caa8085aa15674162ff5135b13409998db9510)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 13:43:39 +00:00
Paul Eggleton 4213ccc733 sed-native: drop
This was added back in the depths of history (around 2006 in OE-Classic)
when apparently the host sed couldn't always be relied upon. We now call
the host sed all over the place without this dependency and don't have
any problems. On the other hand, having it around can lead to races
where we're calling sed in one task and staging it to the sysroot in
another, the result being nasty failures compiling binutils for example.
Since it isn't needed, let's just drop it completely.

Fixes [YOCTO #7264].

(From OE-Core rev: 863a3966e1a200e7a15fbdbb8e04dce6e3f6c1a2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-02 12:41:12 +00:00
Richard Purdie 955bf632a7 populate_sdk_base/meta-environment: Remove overlap from the two
Currently we have the horrible situation where meta-environment packages
the toolchain environment files and they get included in the SDK but are
broken, then, the SDK code overwrites them with good versions. This is
suboptimal.

This change fixes the code in meta-environment to create working
files and adds in the multilib support from populate_sdk_base, then
we remove the code in that base bbclass and rely on the packages
being installed if/as/when needed. This removes the duplication
and the broken versions of the files, hopefully making all well.

[YOCTO #6608]
[YOCTO #6613]

(From OE-Core rev: 063355e5965439c7b3253d692d7ab0ed1189d123)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-22 13:04:23 +01:00
Paul Eggleton 429802fe66 classes/populate_sdk_base: enable adding custom commands to SDK install script
Add an SDK_POST_INSTALL_COMMAND variable which allows additional
commands to be added towards the end of the SDK install script, for e.g.
additional processing that needs to be done as part of installing the
SDK.

(From OE-Core rev: 10df0718d6a626d99beb68cde8d914ee0820d7eb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-11 18:02:55 +01:00
Richard Purdie 859ad9402c populate_sdk_base: Remap TOOLCHAIN_HOST_TASK variable
Currently this variable isn't passed through the magic rename
mangling. This means that if you try adding "nativesdk-eglibc"
to an image directly, you can't since the package is renamed
by debian.bbclass and nothing sees the renaming.

This is annoying since I wanted to exactly that. This code
change passes it through the standard renaming function, the
tricky part is that we have to set PKGDATA_DIR to point to
the correct sysroot during the call. We create a copy of the
 datastore for the purposes of the call to do this.

(From OE-Core rev: d2fbc55d6863a767e69092bac686c02c3ec34650)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Corneliu Stoicescu 475e976272 classes/populate_sdk_base.bbclass: add a manifest for target sdk
Similar to the way BSP images have rootfs a manifest, the toolchain now also has a manifest file created alongside the sdk image.

(From OE-Core rev: 3d42fd1f050a1382b15c3c4d59fd02d0ed7091b2)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:31 +01:00
Richard Purdie 82b7504691 populate_sdk_base: Move toolchain installation script to a separate file
It makes sense to move the script to a separate file, making the bbclass
clearer and allowing the end user to more easily customise or replace
it. There are no functionality changes, just the addition of some
substitution variables.

(From OE-Core rev: f99732a29689c65083ad09abb302f372042c8cd4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
Richard Purdie e6837f785c classes: Combine rootfs_<pkgtype> and populate_sdk_<pkgtype>
There is no real reason to have these separate files any longer. It does
mean in meta-toolchain type recipes some extra variables are defined but
it also means the common code can be grouped and maintained together
which I believe is more beneficial. We therefore merge the classes.

(From OE-Core rev: 2cf42b49003494e1b10775523c9a2547eaf16ea4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
Richard Purdie 2d1660112e populate_sdk_base: Fix grep command usage on old hosts
"man grep" on centos:

       -R, -r, --recursive
              Read all files under each directory, recursively; this is equivalent to the -d recurse option.

"man grep" on a more recent ubuntu system:

       -r, --recursive
              Read all files under each directory, recursively, following symbolic links only if they are on the command line.  This
              is equivalent to the -d recurse option.

So we have an issue when the SDK installer (even with
buildtools-tarball) is used on old hosts since it may try and
dereference paths which it should not. This is caused by differences in
the behaviour of grep -r on older systems.

The fix is to wrap this in find so that only real files are found (as
elsewhere in the script.

[YOCTO #6577]

(From OE-Core rev: 7986adeac16550b33f65fded39a55f668e0e543f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-29 09:58:27 +01:00
Richard Purdie 848cc2740d populate_sdk_base: Include do_rootfs depends for do_populate_sdk
"bitbake core-image-minimal -c populate_sdk; rm tmp -rf; bitbake core-image-minimal -c populate_sdk"
breaks due to missing dependencies on things like update-rc.d. Since
we're effecitvely building a rootfs, we need all the same depends
as do_rootfs has.

The easiest was to achieve this is to simply load them. This resolves
the failure when targeting the task from sstate.

(From OE-Core rev: cdb0bcef28493edd4cad2a882fb8ba402485a2f1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-27 08:31:09 +01:00
Richard Purdie d8024434d4 populate_sdk_base: Extend TOOLCHAIN_TARGET_TASK to include multilib variants
Most people expect the toolchain from a multilib build to contain multilib
components. This change makes that happen and is easy for users to override
should they want something different.

(From OE-Core rev: 396371588c7fd2d691ca9c39cd02287e43cb665b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25 15:33:58 +01:00
João Henrique Ferreira de Freitas 6403cd034c populate_sdk_base: ensure that filenames with empty space character are handled
When extracting toolchain, if the list $executable_files has filenames
with empty space character, the list will created but relocate_sdk.sh
will not handle it well. This will lead to the below erro:

    ./tmp/deploy/sdk/buildtools-mytools-x86_64-nativesdk-standalone-1.6.1.0.sh
    Enter target directory for SDK (default: /opt/mydistro/mytoolset/1.6.1.0):
    You are about to install the SDK to "/opt/mydistro/mytoolset/1.6.1.0". Proceed[Y/n]?
    Extracting SDK...done
    Setting it up.../opt/mydistro/mytoolset/1.6.1.0/relocate_sdk.sh: line 2: sintaxe error `token'  `('
    /opt/mydistro/mytoolset/1.6.1.0/relocate_sdk.sh: line 2: `e

The same occurs with replacement of ${SDKPATH} in configs/scripts/etc files.

We should ensure that full path is protected before relocate_sdk.sh
and ${SDKPATH} replacement calls.

(From OE-Core rev: d7adf8349a65da6f0fdd0f00e606e8bc27ce3f28)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:08:58 +01:00
Richard Purdie ddb70af7d3 populate_sdk_base: Remove confusing echo
Remove a confusing echo after the previous commit, thanks for a suggestion
from Laurentiu.

(From OE-Core rev: cd1fdd05cc7457706d1e40042854c154cbb3d9e9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

A
2014-06-29 09:04:22 +01:00