aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_base.bbclass
AgeCommit message (Collapse)Author
2013-12-03populate_sdk: verify executable or dynamically linked libraryyzhu1
When toolchain directory is changed to execute mode, some non-executable files or empty files are sorted. This will result in some errors. Thus when sorting executable files or dynamically linked library, additional conditions are to exclude non-executable files or empty files. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-20classes/imagetest-qemu: remove old image testing classPaul Eggleton
This has now been superseded by testimage. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-10populate_sdk_base.bbclass: select the proper cross-canadian packageLaurentiu Palcu
Since packagegroup-cross-canadian package name has MACHINE in it, make the necessary changes here. [YOCTO #4783] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22populate_sdk_base: Allow sdk tar options to be overriddenRichard Purdie
It can be useful to override or append options to the SDK tarball creation command so add a variable to allow this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18populate_sdk_base.bbclass: use new perm option for findStefan Stanacar
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] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09populate_sdk_base.bbclass: allow $OECORE_NATIVE_SYSROOT in sdk_env_scriptBernhard Guillon
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 Signed-off-by: Bernhard Guillon <Bernhard.Guillon@hale.at> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09populate_sdk_base: fix bashismLaurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-25populate_sdk_base, adt_installer: abort install if path contains spacesLaurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-02Make toolchain output name using SDK_VERSION instead of DISTRO_VERSION to be ↵Jessica Zhang
consistent [yocto #2342] Signed-off-by: Jessica Zhang <jessica.zhang@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-13package/image.bbclass: Fix multilib rprovidesRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23classes/buildhistory: implement history collection for SDKsPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-16populate_sdk_base: search for perl scripts after symlinks are relocatedLaurentiu Palcu
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. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05populate_sdk_base/image: Fix races for variable mappingsRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01populate_sdk_base.bbclass:fix toolchain relocation issuesHongxu Jia
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] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19populate_sdk_base.bbclass: fix SDKTARGETSYSROOT valueLaurentiu Palcu
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] 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-12populate_sdk_base.bbclass: Improve debugging capabilities for SDK installerJason Wessel
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. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08populate_sdk_base.bbclass: add execution permission for self-extracting archiveJackie Huang
[ CQID: WIND00392947 ] It is not good user experience that the self-extracting archive (.sh file) has no execution permission by default. 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>
2013-01-22populate_sdk_base.bbclass: Allow installation of ix86 SDK on x86_64 hostWolfgang Denk
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. Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20populate_sdk_base.bbclass: Work around bugs with gnu tar < 1.24Jason Wessel
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. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14populate_sdk_base: Add perl modules as needing to be relocatedMark Hatle
The perl module for automake has an embedded path in it, this needs to be relocated. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07image/populate_sdk: Simplify imagetest inclusion and drop dummy class fileRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06populate_sdk_base, adt_installer_internal: fix issue on older distributionsLaurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05populate_sdk_base: fix directory creation as normal userLaurentiu Palcu
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. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04populate_sdk_base: mkdir was missing $SUDO_EXEC prefixLaurentiu Palcu
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. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03populate_sdk_base: Fix typoRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03populate_sdk_base.bbclass: make failure to find ld-linux.so a hard errorJason Wessel
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. 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-03populate_sdk_base:tarball installer:add sudo promptHongxu Jia
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] 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-03populate_sdk_base: tarball installer: SDK overwrite warningLaurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-12populate_sdk_base.bbclass: use SDK_ARCH instead of SDKMACHINELaurentiu Palcu
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. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-02populate_sdk_base.bbclass: check installation machine before installing SDKLaurentiu Palcu
Do not allow installer to continue if the installation machine architecture does not match the intended SDK machine architecture. [YOCTO: #3269] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-27populate_sdk_base: allow SDK path of various levelFabien Proriol
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. Signed-off-by: Fabien Proriol <fabien.proriol@jdsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-26populate_sdk_base: Ensure that the multilib cross-canadian tools are usedMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-26populate_sdk_base: Update extraction script for multilibsMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-18populate_sdk_base.bbclass: Make it possible to override the create_shar ↵Thomas Kristensen
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. Signed-off-by: Thomas Kristensen <thkriste@cisco.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-21SDK: allow toolchain installation from another directoryLaurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-21SDK: relocate symlinks tooLaurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-21SDK: remove references to Poky distro from tarball installerLaurentiu Palcu
The installer should be generic. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-21SDK: fix installation into symlinked directoriesLaurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20Replace "echo -e" with "printf" to have the same behavior in dash or bashAndrei Gherzan
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] Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-03Rename task to packagegroupPaul Eggleton
"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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-31nativesdk: Switch to using nativesdk as a prefix, not a suffixRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17populate_sdk_base.bbclass: fix SDK relocation issuesLaurentiu Palcu
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. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02populate_sdk_base.bbclass: create self-extracting archiveLaurentiu Palcu
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. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31classes/populate_sdk_base: don't break existing do_populate_sdk dependsPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19Convert tab indentation in python functions into four-spaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03image.bbclass: Add support to build the SDK in parallel with the imageMark Hatle
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.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-07-03populate_sdk: enable basic multilib supportMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-07-03populate_sdk_base.bbclass: Change to using task specific dependsMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-07-03populate_sdk: Allow for attempt only packages in the SDKMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-07-03populate_sdk.bbclass: Split into two partsMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>