summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_base.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* populate_sdk_base: Ensure PKGDATA_DIR existsRichard Purdie2016-05-091-1/+1
| | | | | | | | | | | | | | | | | 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 master rev: 319c5d55bb0c7e429766f46dd42a15e16a43c4dd) (From OE-Core rev: d9ea863ff844ee1b84d4699b0d3af7245f3703c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: avoid executing empty functionChen Qi2015-05-151-1/+3
| | | | | | | | | | | | | | | | | | `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) (From OE-Core rev: 7c0c2b3037dfc2790446968572daf5bf0a17e2f8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-template.sh: Make relocation optional.Randy Witt2015-02-241-2/+8
| | | | | | | | | | | | | | 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>
* populate_sdk: Handle OLDEST_KERNELRichard Purdie2015-02-171-0/+1
| | | | | | | | | | | 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>
* sed-native: dropPaul Eggleton2015-02-021-1/+1
| | | | | | | | | | | | | | | | | 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>
* populate_sdk_base/meta-environment: Remove overlap from the twoRichard Purdie2014-09-221-26/+1
| | | | | | | | | | | | | | | | | | | | 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>
* classes/populate_sdk_base: enable adding custom commands to SDK install script1.7_M3Paul Eggleton2014-09-111-0/+7
| | | | | | | | | | | | 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>
* populate_sdk_base: Remap TOOLCHAIN_HOST_TASK variableRichard Purdie2014-08-281-0/+7
| | | | | | | | | | | | | | | | | 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>
* classes/populate_sdk_base.bbclass: add a manifest for target sdkCorneliu Stoicescu2014-08-271-0/+12
| | | | | | | | | 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>
* populate_sdk_base: Move toolchain installation script to a separate fileRichard Purdie2014-08-151-184/+9
| | | | | | | | | | | 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>
* classes: Combine rootfs_<pkgtype> and populate_sdk_<pkgtype>Richard Purdie2014-08-151-1/+1
| | | | | | | | | | | 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>
* populate_sdk_base: Fix grep command usage on old hosts1.7_M2Richard Purdie2014-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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>
* populate_sdk_base: Include do_rootfs depends for do_populate_sdkRichard Purdie2014-07-271-1/+1
| | | | | | | | | | | | | | "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>
* populate_sdk_base: Extend TOOLCHAIN_TARGET_TASK to include multilib variantsRichard Purdie2014-07-251-1/+4
| | | | | | | | | | 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>
* populate_sdk_base: ensure that filenames with empty space character are handledJoão Henrique Ferreira de Freitas2014-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* populate_sdk_base: Remove confusing echoRichard Purdie2014-06-291-2/+0
| | | | | | | | | | | 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
* populate_sdk_base: add auto-completion in setupDennis Meier2014-06-291-2/+1
| | | | | | | (From OE-Core rev: d6c55f6910270e395f668c9114ec374b44c57538) Signed-off-by: Dennis Meier <meier.dennis@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk: Fix TOOLCHAIN_TARGET_TASK_ATTEMPTONLY implementationMark Hatle2014-06-251-0/+1
| | | | | | | | | | The variable was only partially implemented, and the part that was there was named incorrectly to, missing the 'TASK' piece. (From OE-Core rev: d0cb34cfe9a51fd8bc1e6e28c8eda60a25adc1ec) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "populate_sdk: verify executable or dynamically linked library"Roy Li2014-06-171-1/+1
| | | | | | | | | | | It is introduced a bug, since The return of "file ld-linux-x86-64.so.*" does not include "dynamically linked" in redhat 5.9/6.0(32 bit), and lead to that ld-linux-x86-64.so.* is not in executable file list. (From OE-Core rev: fc9603d7d7042efe8941172091cca8578bdde15b) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* SDK default deploy directoryDavid Vincent2014-04-041-1/+1
| | | | | | | | | | | | | If the user changes the DEPLOY_DIR variable to set up a custom deploy directory for images, packages, SDKs as explained in the documentation, the variable SDK_DEPLOY does not take it into account and fallback to TMPDIR as default. Therefore, SDKs were not found in the correct location. (From OE-Core rev: 0f043e9a3fdc4b489b55e0605fee01927854205a) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: add dependency of do_package_write_* tasksLaurentiu Palcu2014-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | nativesdk packages were created only for the first backend listed in PACKAGE_CLASSES. Hence, if one had it set to "package_rpm package_ipk" and did a 'bitbake -c populate_sdk core-image-something', the nativesdk packages were created only for rpm. This is particularily bad for adt-installer which is based on opkg repos. Credits go to richard.purdie@linuxfoundation.org who suggested me this fix. [YOCTO #5900] (From OE-Core rev: 85c3238ee713bc27e99a2e393e3bf8438ed4d91f) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_base: optimise task dependenciesPaul Eggleton2014-02-171-1/+1
| | | | | | | | | | | | | We don't need to depend on do_package anymore after the split out of do_packagedata (which happened a while back in OE-Core commit 6107ee294afde395e39d084c33e8e94013c625a9). We do need dependencies on do_packagedata though since the SDK construction needs to make use of the pkgdata files. (From OE-Core rev: 8491b998d290f9717d537ca84bc2beb475cf3ced) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_base: fix race condition with do_rootfsPaul Eggleton2014-02-171-0/+2
| | | | | | | | | | | | | | | | | | | | do_rootfs has ${S} in cleandirs, and during do_populate_sdk we call exec_func() several times, which by default uses ${B} as the working directory. If do_populate_sysroot and do_rootfs race against eachother, the directory may not exist at the exact instant that the setup code for do_populate_sdk tries to cd into it. We don't actually use ${B} for do_populate_sysroot so we can set it to something else just for that task to avoid the race. NOTE: because this task name contains an underscore, the override will not work; the BitBake patch that changes these to hyphens for the task override is required for this patch to work (but won't break things without it.) (From OE-Core rev: 53578cef2cbc59dcc637d1cc561f63b3c448425a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass/populate_sdk_base.bbclass: shift position of sdk complementary ↵Hongxu Jia2014-02-111-0/+21
| | | | | | | | | | | | | | | | install definition The sdk complementary install operation was defined in image.bbclass, but the sdk recipe (such as meta-toolchain.bb) didn't inherit this bbclass but populate_sdk, and both of image and populate_sdk bbclass inherited populate_sdk_base bbclass, so move the sdk complementary install definition to populate_sdk_base bbclass fixed this issue. (From OE-Core rev: 907458935bab391f5bfba8f581ea9835078548d9) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base.bbclass: activate the new python routinesLaurentiu Palcu2014-02-111-32/+10
| | | | | | | | | | Lose the old shell populate_sdk_image() function and use the new python implementation. (From OE-Core rev: 5a81b8a0820ceac972a68af2caebdc8d2f3945a1) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_base: remove nostamp from do_populate_sdkPaul Eggleton2014-02-091-1/+0
| | | | | | | | | | | | | We've removed nostamp from do_rootfs in image.bbclass in OE-Core commit 8505008c115efb54d18e5f25441c7a938a32ffaf, and we should do the same for do_populate_sdk here for the same reason - we can now rely on task signatures so if nothing has changed, we don't need to re-run it. (From OE-Core rev: de9b693f4ff311f1310a1c6005e0d5c225aabef6) 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>
* populate_sdk: verify executable or dynamically linked libraryyzhu12013-12-031-1/+1
| | | | | | | | | | | | 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. (From OE-Core rev: c9d56308bfa9ee7f4a9b22eae86390626ddc1c35) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/imagetest-qemu: remove old image testing classPaul Eggleton2013-09-221-3/+0
| | | | | | | | | 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>
* populate_sdk_base.bbclass: select the proper cross-canadian packageLaurentiu Palcu2013-09-101-1/+1
| | | | | | | | | | | | 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>
* populate_sdk_base: Allow sdk tar options to be overriddenRichard Purdie2013-08-231-1/+3
| | | | | | | | | 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>
* populate_sdk_base.bbclass: use new perm option for findStefan Stanacar2013-07-181-1/+1
| | | | | | | | | | | | | | | | 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>
* populate_sdk_base.bbclass: allow $OECORE_NATIVE_SYSROOT in sdk_env_scriptBernhard Guillon2013-07-101-1/+1
| | | | | | | | | | | | | | | | | | 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>
* populate_sdk_base: fix bashismLaurentiu Palcu2013-07-101-1/+1
| | | | | | | | | | | | | | 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>
* populate_sdk_base, adt_installer: abort install if path contains spacesLaurentiu Palcu2013-06-251-4/+9
| | | | | | | | | | | | | | | | | | | 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>
* Make toolchain output name using SDK_VERSION instead of DISTRO_VERSION to be ↵Jessica Zhang2013-05-021-1/+1
| | | | | | | | | | 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>
* package/image.bbclass: Fix multilib rprovidesRichard Purdie2013-04-131-1/+2
| | | | | | | | | | | | | | | | 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>
* classes/buildhistory: implement history collection for SDKsPaul Eggleton2013-03-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* populate_sdk_base: search for perl scripts after symlinks are relocatedLaurentiu Palcu2013-03-161-5/+5
| | | | | | | | | | | 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>
* populate_sdk_base/image: Fix races for variable mappingsRichard Purdie2013-03-051-7/+2
| | | | | | | | | | | | | | | | 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>
* populate_sdk_base.bbclass:fix toolchain relocation issuesHongxu Jia2013-03-011-0/+7
| | | | | | | | | | | | | | | | | | | 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>
* populate_sdk_base.bbclass: fix SDKTARGETSYSROOT valueLaurentiu Palcu2013-02-191-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* populate_sdk_base.bbclass: Improve debugging capabilities for SDK installerJason Wessel2013-02-121-6/+42
| | | | | | | | | | | | | | | | | | | | 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>
* populate_sdk_base.bbclass: add execution permission for self-extracting archiveJackie Huang2013-02-081-0/+3
| | | | | | | | | | | | | | | [ 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>
* populate_sdk_base.bbclass: Allow installation of ix86 SDK on x86_64 hostWolfgang Denk2013-01-221-3/+6
| | | | | | | | | | | | | | | | | 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>
* populate_sdk_base.bbclass: Work around bugs with gnu tar < 1.24Jason Wessel2013-01-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* populate_sdk_base: Add perl modules as needing to be relocatedMark Hatle2012-12-141-1/+1
| | | | | | | | | | 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>
* image/populate_sdk: Simplify imagetest inclusion and drop dummy class fileRichard Purdie2012-12-071-0/+3
| | | | | | | | | | 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>
* populate_sdk_base, adt_installer_internal: fix issue on older distributionsLaurentiu Palcu2012-12-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* populate_sdk_base: fix directory creation as normal userLaurentiu Palcu2012-12-051-3/+6
| | | | | | | | | | | | | | | 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>
* populate_sdk_base: mkdir was missing $SUDO_EXEC prefixLaurentiu Palcu2012-12-041-3/+3
| | | | | | | | | | | 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>