Commit Graph

49 Commits

Author SHA1 Message Date
Paul Eggleton d652987612 classes/imagetest-qemu: remove old image testing class
This has now been superseded by testimage.

(From OE-Core rev: d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:41 +01:00
Laurentiu Palcu 9d3d1a2da2 populate_sdk_base.bbclass: select the proper cross-canadian package
Since packagegroup-cross-canadian package name has MACHINE in it, make
the necessary changes here.

[YOCTO #4783]

(From OE-Core rev: 23531590d40acde2775b7c3b90682edc501d68f4)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10 22:58:33 +01:00
Richard Purdie 7f5d712f37 populate_sdk_base: Allow sdk tar options to be overridden
It can be useful to override or append options to the SDK tarball creation command
so add a variable to allow this.

(From OE-Core rev: ae86a46c1b255e7c2833eb6d48ed46eba440e95a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-23 16:20:11 +01:00
Stefan Stanacar 8db36429ef populate_sdk_base.bbclass: use new perm option for find
Old way find -perm +mode is no longer supported in newer
versions of find (Fedora 19). Man page says:
-perm +mode
       This  is  no  longer  supported  (and  has been deprecated since
       2005).  Use -perm /mode instead.

[YOCTO #4853]

(From OE-Core rev: 21b079e01873e2fb4d8674541e8c5818ba73554e)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:23:45 +01:00
Bernhard Guillon d8cba33912 populate_sdk_base.bbclass: allow $OECORE_NATIVE_SYSROOT in sdk_env_script
Only grep for 'OECORE_NATIVE_SYSROOT=' otherwise things like

toolchain_create_sdk_env_script_append() {
    echo 'export MY_DIR_FOO=$OECORE_NATIVE_SYSROOT/my/dir/foo' >> $script
}

trigger the following error while executing the install script:

find: `$OECORE_NATIVE_SYSROOT/my/dir/foo': No such file or directory

(From OE-Core rev: d084c31720f9c13a71c5981f4eda21e18ba2350f)

Signed-off-by: Bernhard Guillon <Bernhard.Guillon@hale.at>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:42:01 +01:00
Laurentiu Palcu 92d9ce39b6 populate_sdk_base: fix bashism
Only the printf bash builtin knows about %q format option for escaping
spaces. The coreutils version doesn't. Unfortunately, neither dash nor
sh have a printf builtin. So, escape the spaces using sed.

[YOCTO #4811]

(From OE-Core rev: 6ac06a65ce52d4c123da53f115c84cb0a98bc18f)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:41:51 +01:00
Laurentiu Palcu 8e9501ffa8 populate_sdk_base, adt_installer: abort install if path contains spaces
Spaces are not handled properly in some parts of oe-core and it's safer
to abort toolchain installation if path contains spaces. Even though
we fix space handling in the toolchain installation script, there are
various other parts in the toolchain (perl scripts, sysroot path passed to
toolchain binaries, shebang lines) that would need special handling. So,
for now, just bail out if path contains spaces.

The checking for spaces in the path is done after expanding relative
paths to absolute and tilde conversion.

[YOCTO #4488]

(From OE-Core rev: 8c35ba2d3048ce69f74f72cb2676e4bc162cfb63)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:59:17 +01:00
Jessica Zhang 8d3285f99b Make toolchain output name using SDK_VERSION instead of DISTRO_VERSION to be consistent [yocto #2342]
(From OE-Core rev: 733f1d2a1bcf1c115613e21f7d09f1b4bee216ce)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-02 17:41:55 +01:00
Richard Purdie 093dec12e6 package/image.bbclass: Fix multilib rprovides
allarch multilib recipes are meant to provide a list of different multilib variants.
Unfortunately since the pkgdata also has mappings for these, they get mapped back to
the original package name which means the effect is undone at package creation time
when the remapping code is called.

This patch adds in a conditional to break that chain meaning the packages get
the correct RPROVIDES and image builds work correctly with opkg.

[YOCTO #3453]

(From OE-Core rev: 1a1927f8a04fe0a2b3b853ebdd33ccb807f00b59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13 23:49:28 +01:00
Paul Eggleton 59e4815387 classes/buildhistory: implement history collection for SDKs
SDKs are constructed in a similar manner to images, and the contents can
be influenced by a number of different factors, thus tracking the
contents of produced SDKs when buildhistory is enabled can help detect
the same kinds of issues as with images.

This required adding POPULATE_SDK_POST_HOST_COMMAND and
SDK_POSTPROCESS_COMMAND variables so that data collection functions can
be injected at the appropriate points in the SDK construction process,
as well as moving the list_installed_packages and
rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to
the package_{rpm,ipk,deb} classes so they can also be called during
do_populate_sdk as well as do_rootfs.

Implements [YOCTO #3964].

(From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:41:13 +00:00
Laurentiu Palcu a6e575292f populate_sdk_base: search for perl scripts after symlinks are relocated
grep will throw "No such file or directory" errors for all invalid
symlinks. To overcome this, move the search after the symlinks have been
changed to point to the new location.

(From OE-Core rev: 239a43fc4037bfe941bb60dd077ee477de177b7c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-16 17:53:59 +00:00
Richard Purdie 44260c2c48 populate_sdk_base/image: Fix races for variable mappings
When using the -c populate_sdk option, images are not generated quite as
they should be under certain circumstances. For example the dropbear
feature may not get replaced with openssh, leading to both being installed
with an appropriate rootfs failure.

This patch moves the remapping logic to later points in the code, ensuring
there is no conflict. The result is slightly simpler too as an added bonus.

[YOCTO #3749]

(From OE-Core rev: 90cfa16bd4a02ada84ef94f6ae6f182beb8bdc01)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:57 +00:00
Hongxu Jia aeb53bd789 populate_sdk_base.bbclass:fix toolchain relocation issues
When run "autoreconf" in toolchain, there is an error if the host's perl's
version is not the same as the one in the SDK, the error says that the
executable perl mismatches the perl lib's version.

This is because most of the autotools' scripts use the "#!/usr/bin/perl -w"
which is host perl, but the gnu-configize uses "#! /usr/bin/env perl" which
invokes the perl wrapper in the SDK, and the wrapper will set the PERL5LIB to
the SDK which causes the mismatch. We can make all the perl scripts to use the
host perl or the SDK perl to fix this problem.

[YOCTO #3338]

(From OE-Core rev: 365aa1412a3d31128cb3df02959acdc7df5f2ebc)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:29 +00:00
Laurentiu Palcu c723d1a38f populate_sdk_base.bbclass: fix SDKTARGETSYSROOT value
Currently, SDKTARGETSYSROOT points to PACKAGE_ARCH which, sometimes, can
be set to MACHINE_ARCH. When this happens, the default target sysroot
passed to the cross-canadian toolchain, which points to TUNE_PKGARCH,
will be different from the directory where the target sysroot has been
deployed.

In order to fix this, use REAL_MULTIMACH_TARGET_SYS variable instead of
MULTIMACH_TARGET_SYS.

[YOCTO #3784]

(From OE-Core rev: 41437aaac0cfc6f931d3b2974d380f20ec01f6e8)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 08:47:35 -08:00
Jason Wessel 7d023f3b5f populate_sdk_base.bbclass: Improve debugging capabilities for SDK installer
After having to debug the SDK installer a few times in
addition to the relocation code the following patch was created
to improve the capabilities around debugging the SDK installer.

1) Add a verbose mode -D which set a set -x to see what
   the SDK installer is doing.

2) Add a mode -S to save the relocation scripts for the purpose
   of debugging them in conjunction with -D

3) Add a mode -R to not execute the relocation scripts for the
   purpose of debugging the relocations.

(From OE-Core rev: 0e6dd19b9736d2a8ae7c0f0ab124337d579b8f06)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-12 13:11:21 +00:00
Jackie Huang fa6c12da8c populate_sdk_base.bbclass: add execution permission for self-extracting archive
[ CQID: WIND00392947 ]

It is not good user experience that the self-extracting archive (.sh file)
has no execution permission by default.

(From OE-Core rev: 3d6537f6ab1ce98075461b9a5d49885c2454417f)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08 14:50:36 +00:00
Wolfgang Denk c3256233c6 populate_sdk_base.bbclass: Allow installation of ix86 SDK on x86_64 host
Commit c04f5435 "populate_sdk_base.bbclass: use SDK_ARCH instead
of SDKMACHINE" prevents not only the installation of 64 bit SDK
configurations on 32 bit hosts (which indeed cannot work), but also
the legitimate installation of a 32 bit SDK on a 64 bit host.

Fix this.

While there, also make sure we use the same patterns ("i[3-6]86" resp.
"x86[-_]64" to get unified strings for both INST_ARCH and SDK_ARCH.

(From OE-Core rev: 7ddd97b9b09fe7a327916ea88908a63375556ae6)

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:44:12 +00:00
Jason Wessel 63ccf62420 populate_sdk_base.bbclass: Work around bugs with gnu tar < 1.24
The gnu tar versions less than 1.24 pose a problem with the SDK
extraction.  A typical SDK will have hard links.  The SDK is created
with a newer version of tar but extracted with the host version of tar
which may be much older.  The specific defect is that older version of
gnu tar do not properly handle the "--strip-components=" argument when
processing hard links and the paths do not get properly truncated and
hooked up with the corresponding real file payloads.  This leads to
errors like the following during the SDK install:

tar: sysroots/qemux86-yocto-linux/usr/bin/getconf: Cannot hard link to `./opt/yocto/SDK-qemux86/sysroots/qemux86-yocto-linux/usr/bin/POSIX_V6_ILP32_OFFBIG': No such file or directory

The simple way to work around the problem is to just not save the path
information that is going to get chopped off anyway.  This has the
added benefit that it saves a small amount of space in the tar archive
as well.

(From OE-Core rev: 0f4112016bac07f0294f2a4d0fde4659c0fed2d2)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 12:58:58 +00:00
Mark Hatle 5ce8c7fe9e populate_sdk_base: Add perl modules as needing to be relocated
The perl module for automake has an embedded path in it, this needs
to be relocated.

(From OE-Core rev: ad79360c1d992830d4f0e06a3bbf0622658c0540)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 17:30:44 +00:00
Richard Purdie 0e486c7112 image/populate_sdk: Simplify imagetest inclusion and drop dummy class file
Having to include some dummy class is suboptimal and we no longer need to
do this. Also move this check to populate_sdk_base since we then don't
need to include it in toolchains specifically.

(From OE-Core rev: 2ee979ff71d31e497be856ea1443667c6d799d34)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:13:12 +00:00
Laurentiu Palcu ade680a28f populate_sdk_base, adt_installer_internal: fix issue on older distributions
This patch addresses an SDK installer issue on older distributions if
the installation takes place in another directory than the default one. In
fact, is all about the 'file' utility version used for determining if a
file is a text file. For example, for a perl script, newer 'file' versions
return:
"...script, ASCII text executable"
while older versions return:
"...script text executable"
Hence the regex pattern didn't match the scripts.

Also the patch contains two unrelated minor fixes:
 * return an exit code of 1 instead of -1 when installation machine is
   not supported. That because on an older distribution we also get this
   error message: "exit: 9: Illegal number: -1";
 * remove unnecessary $SUDO_EXEC prefix to grep;

[YOCTO #3538]

(From OE-Core rev: e7e23a1e5aae4028e21e37ec09e9d431a9adfbcb)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 16:36:07 +00:00
Laurentiu Palcu 40b4bb068f populate_sdk_base: fix directory creation as normal user
My previous patch removed the mkdir and added it at the end of the
"gaining SUDO rights" block in order to fix directory creation when
installing in a location without proper rights. Unfortunately this
messed up the directory creation as normal user as it will ask for
sudo right in order to create it...

Hopefully, this will fix both cases.

(From OE-Core rev: 86286287d0134ade73f6a282158dde86bf0159e8)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05 15:26:40 +00:00
Laurentiu Palcu 4bec4e7850 populate_sdk_base: mkdir was missing $SUDO_EXEC prefix
mkdir was in the wrong place and missing sudo rights. Hence, the
installation to default location (or any other for which the user didn't
have rights) would fail. Unless the installer itself is run with sudo.

(From OE-Core rev: 555d03c466490ab12b2b1d049736593da2334e97)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:01 +00:00
Richard Purdie 7b0ad8ec31 populate_sdk_base: Fix typo
(From OE-Core rev: bb3f086fc44749c586b5046309d179fc3435933e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:51:52 +00:00
Jason Wessel 40c57a487e populate_sdk_base.bbclass: make failure to find ld-linux.so a hard error
The shell archive that populates the external SDK should fail if it
cannot find the ld-linux.so else it will corrupt all binaries because
a random path will be used from the list of executables when dl_path
is empty.

(From OE-Core rev: 206aa794933d41dfb037e9c654c818cd4d4f956d)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:47:59 +00:00
Hongxu Jia 1b98ab72e7 populate_sdk_base:tarball installer:add sudo prompt
1.Adds a sudo passwd prompt during installation if the
  user couldn't install on the dir.
2.Adds option -d <dir> to enter dir without prompt.
3.Adds option -y for automatic yes to all prompts, a non-
  interactive method.

[YOCTO# 3153]
[YOCTO# 3309]

(From OE-Core rev: e85e1aace604626914a06dab4663094d6dd9b035)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:47:55 +00:00
Laurentiu Palcu b751ec137d populate_sdk_base: tarball installer: SDK overwrite warning
This patch contains two fixes:
  * if the user wants to install the SDK in a directory that already
    contains a SDK for the same architecture, a warning will be shown;
  * when the symbolic links are relocated use -n option. Otherwise,
    symbolic links to existing directories will be created in the
	directory itself;

[YOCTO #3401]

(From OE-Core rev: cd035f170a2448b9ebcf0cfac5d4c0fa472b7049)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 13:52:06 +00:00
Laurentiu Palcu c04f54352f populate_sdk_base.bbclass: use SDK_ARCH instead of SDKMACHINE
If SDKMACHINE is not set, the toolchain will be built but the tarball
installer will not run. A better choice is to use SDK_ARCH because, even
if SDKMACHINE is not set, SDK_ARCH is set, by default, to BUILD_HOST.

(From OE-Core rev: b6d391903ae8baf902fa142a58533857ade6afd3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-12 13:36:39 +00:00
Laurentiu Palcu ce7e817b49 populate_sdk_base.bbclass: check installation machine before installing SDK
Do not allow installer to continue if the installation machine architecture
does not match the intended SDK machine architecture.

[YOCTO: #3269]

(From OE-Core rev: 1f78e2c97f978f0f02e884870e7c495751f0802c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-02 16:18:31 +00:00
Fabien Proriol 32cec3214f populate_sdk_base: allow SDK path of various level
In the previous version, tar extraction use the --strip-component
option with "4" hard coded value.
If we set another SDKPATH, with a different depth, the sdk installation
fails.

This patch computes the level from the SDKPATH value.

(From OE-Core rev: 7aee4e9438755c230e1399bd5226d6c8e7fcca31)

Signed-off-by: Fabien Proriol <fabien.proriol@jdsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:44:59 +01:00
Mark Hatle 4940be556c populate_sdk_base: Ensure that the multilib cross-canadian tools are used
Update the host toolchain list, for cross-canadian toolchains, to ensure
that all of the supported multilibs are built and installed.  This
dynamically generates the dependnecy set based on the current multilib
configuration.

(From OE-Core rev: 54bc658416ea5679bbfdc76e3ef8767c0a15211c)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:44:55 +01:00
Mark Hatle 26d966f34e populate_sdk_base: Update extraction script for multilibs
When multilibs are enabled, there will be more then one environment
file created.  We need to be sure to process each environment file.
The next function can simply use the last environment file processed
to get the magic value(s) that it requires.

(From OE-Core rev: 6f0537c835c35dcff5154de0bec066ec3e71a4f8)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:44:55 +01:00
Thomas Kristensen bfa0fcdce9 populate_sdk_base.bbclass: Make it possible to override the create_shar method of populate_sdk_base.
If you wish to change the install/unpack method of the sdk, this can now be done by making
your own create_shar method, and setting a SDK_PACKAGING_FUNC variable to your
new create_shar function.

(From OE-Core rev: 3955c8eced352226bb4c9ceb710dbe02474b9024)

Signed-off-by: Thomas Kristensen <thkriste@cisco.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18 12:13:40 +01:00
Laurentiu Palcu 494fe41903 SDK: allow toolchain installation from another directory
This patch will allow one to run the installer from another directory
than the one where it's actually located.

Suppose the installer is in /home/user/test/my/sdk and the current
directory is in a different place. With this patch, one can run the
installer like this:

$ sh ~/test/my/sdk/poky-eglibc-x86_64-arm-toolchain-gmae-1.2+snapshot-20120920.sh

[YOCTO #3135]

(From OE-Core rev: 3c7aac33cb63dc63b989db4e9d7389a7f4d3c18d)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-21 11:10:24 +01:00
Laurentiu Palcu 04877f768e SDK: relocate symlinks too
The directory usr/libexec/ in the SDK sysroot contains the default
symlinks to the toolchain binaries and these, too, need to point to the
correct toolchain path.

[YOCTO #3090]

(From OE-Core rev: 6e4923c0c9b218271fd44d78df9987b5cabb1c03)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-21 11:10:23 +01:00
Laurentiu Palcu b6867e80b9 SDK: remove references to Poky distro from tarball installer
The installer should be generic.

(From OE-Core rev: eba5cdf10aa49da844ac141f00b79327da0cb8c3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-21 11:10:23 +01:00
Laurentiu Palcu bd73a4b615 SDK: fix installation into symlinked directories
The SDK installation scripts should not canonicalize symlinked
directories because the entire relocation would be done to the directory
to which the symlink points. Instead, if the installation is a symlink,
use that path to relocate the binaries.

For example, if we have the following symlink: /opt/sdk -> ~/my/test/sdk
the binaries will be relocated to /opt/sdk not ~/my/test/sdk as it is
done now.

[YOCTO #3102]

(From OE-Core rev: 9e6a25e2e9a7f37c3baa0b2949a43ac4127868da)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-21 11:10:22 +01:00
Andrei Gherzan 42d91a7db4 Replace "echo -e" with "printf" to have the same behavior in dash or bash
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define
any options and furthermore allows 'echo -e' to be the default behavior.
This means that in dash 'echo -e' will actually print '-e' and interpret
backslashes by default. We use instead 'printf' builtin command with or
without '\n' to simulate 'echo -e' or 'echo -n'.
'printf' needs format while 'echo' can be used without any arguments. So
'echo >' was replaced by 'printf "" >'.
'echo' without '-n' flag adds a new line by default so to keep the same
behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
used.

[YOCTO #3138]

(From OE-Core rev: a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 13:33:50 +01:00
Paul Eggleton 272cb74d70 Rename task to packagegroup
"Package group" is a much more appropriate name for these than task,
since we use the word task to describe units of work executed by
BitBake.

(From OE-Core rev: 424dcf7046e4ad09dcc664eb1992201195247fcf)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:55 +01:00
Richard Purdie ad23395cd1 nativesdk: Switch to using nativesdk as a prefix, not a suffix
As discussed on the mailing lists, using a suffix to package names is
hard and has lead to many recipes having to do PKGSUFFIX games. Its
looking extremely hard to scale nativesdk much further without hacking
many recipes.

By comparison, using a prefix like multilib does works much better and
doesn't involve "hacking" as many recipes. This change converts nativesdk
to use a prefix using the existing multilib infrastructure.

(From OE-Core rev: 81813c0e322dc04ce4b069117188d8a54dfddb8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:06 -07:00
Laurentiu Palcu 1b6019086c populate_sdk_base.bbclass: fix SDK relocation issues
The problem appears if multiple setup environment scripts are found. In
order to find only the script we're interested in, I removed globbing in
matching pattern with ${REAL_MULTIMACH_TARGET_SYS} that will be expanded
to the correct string.

Also, fix a problem when changing the scripts/configs. The grep pattern
matched also files that contained "text" in their name.

(From OE-Core rev: d81768560676da201fd730ae3930b080ab8c5c75)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 13:06:41 +01:00
Laurentiu Palcu 44df019842 populate_sdk_base.bbclass: create self-extracting archive
In order for the SDK to be relocatable, the user would need to call a
setup script to change the binaries acordingly. Having an auto-extracting
archive has the advantage of being more user friendly and the user does
not have to call the setup script separately after extracting the SDK.
It is called automatically.

(From OE-Core rev: d4e976849da845d595db7029d8089946ae16d982)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:28:39 +01:00
Paul Eggleton 9c96d34d68 classes/populate_sdk_base: don't break existing do_populate_sdk depends
We set do_populate_sdk[depends] in populate_sdk_*.bbclass, but since
these are inherited at the top of populate_sdk_base.bbclass, those
values are wiped out by using = at the end of the latter class. Use +=
to avoid this.

(From OE-Core rev: a87b5d6cab34579cf3abe03f4663d9a72e218397)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31 08:02:09 +01:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Mark Hatle b70c9154e4 image.bbclass: Add support to build the SDK in parallel with the image
When building an image recipe, you can now build a companion SDK by
calling the populate_sdk task:
  bitbake -c populate_sdk core-image-minimal

Note: there are still issues w/ the SDK not working completely with
multilibs.

A lock is required between rootfs and populate_sdk activities to prevent
configuration file clashes and similar package management problems in ipk
and deb based systems.  (RPM already had a lock for a different reason.)

(From OE-Core rev: a0de2a56f19ae4d8cd88e46e96917a7a019fe1ab)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:55:00 +01:00
Mark Hatle 01e891ad71 populate_sdk: enable basic multilib support
In order to enable basic multilib support for the export of an SDK
image, a number of minor changes had to be made:

The value of MULTIMACH_TARGET_SYS needs to be variable.  This way we
can define the value to the appropriate multilib.  (Also in some cases
the default PACKAGE_ARCH is set to MACHINE_ARCH which is incorrect for
the SDK.)  Add a companion REAL_MULTIMACH_TARGET_SYS, based on code
from meta-environment, to allow for this.

We have to convert the do_populate_sdk into a python call, and then
break up the previous items into three parts.
  * Image construction
  * Setup of environment files
  * Generation of the tarball

Then we can iterate over the multilibs to populate the environment files.

Finally, matching changes were needed in the toolchain-scripts file.  And
what I presume is an optimization of immediate evaluation for
TOOLCHAIN_CONFIGSITE_NOCACHE and ..._SYSROOTCACHE needed to be done at
runtime, otherwise the wrong values may be used.

(From OE-Core rev: 42545ffbb37f2646a2a8c20999c21d3300e24f59)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:54:58 +01:00
Mark Hatle 66d3d3b228 populate_sdk_base.bbclass: Change to using task specific depends
If we combine the do_populate_sdk with the image generation, we want
to avoid the dependency processing unless do_populate_sdk is run.

This requires the bitbake change to implement task based rdepends.

(From OE-Core rev: 5fa9f980248e7813ce74f48a29c4b7d94e308cf9)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:54:58 +01:00
Mark Hatle 41550ca5de populate_sdk: Allow for attempt only packages in the SDK
We want to be able to supply attempt only packages in the SDK in order to
support more advanced SDK images that more closely match specific image
recipes.

(From OE-Core rev: 9b9efa96537f4977b158c29151e53d02600d2294)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:54:58 +01:00
Mark Hatle 1d5271153d populate_sdk.bbclass: Split into two parts
populate_sdk was renamed to populate_sdk_base in order to allow for changes
that may break existing SDK recipes.  Any such changes need an analog
in populate_sdk (new version) to restore previous desired behavior.

In addition to the rename, one minor change was made.  The _base version
only had the do_populate_sdk as an added task, but no before or after defined.

For compatibility, populate_sdk has do_populate_sdk defined as "after"
do_install and before do_build, this is identical to the original behavior.

(From OE-Core rev: bde224ba44c16edc1892cea1b33ab973ae971115)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:54:58 +01:00