summaryrefslogtreecommitdiffstats
path: root/meta/files/toolchain-shar-relocate.sh
Commit message (Collapse)AuthorAgeFilesLines
* toolchain-shar-relocate.sh: Add check for missing command 'file'Tom Hochstein2024-03-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | On a machine without the file command, the SDK install fails with a cryptic error message. ``` xargs: file: No such file or directory sed: no input files Failed to replace perl. Relocate script failed. Abort! ``` Add a test for 'file' to print a clear error message. ``` The command 'file' is required by the relocation script, please install it first. Abort! ``` (From OE-Core rev: 1aa19b9e34ebe6f39a25364073fed4c069f650e8) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-relocate: allow 'find' access to libraries in symlinked ↵Maanya Goenka2024-02-081-1/+2
| | | | | | | | | | | | | | | directories If the '/' is not added to the end of the dynamic loader path, only directories that are not symlinks will be looked into for libraries such as ld-linux*, so the slash is added to allow the 'find' command to have symlinked directory access too. (From OE-Core rev: 8468f24e3e81d5248eb1424e43accd2ea8bf0568) Signed-off-by: Maanya Goenka <maanyagoenka@microsoft.com> Signed-off-by : Alejandro Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: fix search for dynamic loaderChristian Eggers2022-02-121-1/+1
| | | | | | | | | | | | | | | | | | | if the package "nativesdk-glibc-dbg" is installed as part of the SDK, the existing search expression finds two files: $OECORE_NATIVE_SYSROOT/lib/.debug/ld-linux-x86-64.so.2 $OECORE_NATIVE_SYSROOT/lib/ld-linux-x86-64.so.2 The generated relocate_sdk.sh shell script contains then an extra newline and segfaults during SDK relocation. Limit the search depth to 1, to avoid finding the file in the .debug directory. (From OE-Core rev: baec04b936ab6b3d2039978fd568c3824cd0a501) Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: fix relocate symlink failedhongxu2021-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Install SDK to non-default dir, sysmlink mkfs.vfat is invalid $ ./sdk.sh -y -d ./dnf-2 -S -D $ ls sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat -al lrwxrwxrwx 1 hjia users 99 Aug 10 20:38 sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat -> /opt/windriver/wrlinux-graphics/21.32/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat.dosfstools Since commit [bc4ee54535 sdk: Decouple default install path from built in path] applied, sdk relocates symlink failed, it should replace $SDK_BUILD_PATH rather than $DEFAULT_INSTALL_DIR, just like above commit did Without this commit: ... |+ for l in $($SUDO_EXEC find $native_sysroot -type l) |++ readlink path-to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat |++ sed -e s:/usr/local/oecore-x86_64:path-to: |+ ln -sfn /opt/windriver/wrlinux-graphics/21.32/sysroots/x86_64-wrlinuxsdk-linux/ usr/bin/mkfs.vfat.dosfstools path-to//sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat ... After appling this commit: ... |+ for l in $($SUDO_EXEC find $native_sysroot -type l) |++ readlink path-to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat |++ sed -e s:/opt/windriver/wrlinux-graphics/21.31:path-to: |+ ln -sfn path-to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat.dosfstools path-to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat ... (From OE-Core rev: 942c06a7348070b92f722fa5c439c8c4404485b7) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: Decouple default install path from built in pathRichard Purdie2021-08-021-1/+1
| | | | | | | | | | | | | | Add SDKPATHINSTALL which is used as the default install location of the SDK instead of SDKPATH. This means the default install path isn't encoded into every SDK binary, meaning if a date is used there the entire SDK doesn't have to rebuild. Most distros can switch to only customise SDKPATHINSTALL meaning more sstate reuse too. [YOCTO #14100] (From OE-Core rev: bc4ee5453560dcefc4a4ecc5657df5cc1666e153) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-relocate.sh: Fix handling files with colonsOleksiy Obitotskyy yIEf0zt.mo2021-01-201-1/+1
| | | | | | | | | | | Files could contain colons in name and we should not use colons (':') as field separator. E.g. perl/python man pages packages. (From OE-Core rev: 50d2ed0689f1aed6f33b4992d37e2e991c99eb07) Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: toolchain-shar-relocate.sh: Filter out post-relocate-setup scriptMarek Vasut2021-01-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | The toolchain-shar-extract.sh script updates the SDK relocation paths in post-relocate-setup.sh, so avoid doing this twice. This is generally not a problem, unless the SDK path is a subset of the SDK relocation path, in which case the resulting path is substituted twice. To trigger the issue, $ ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-base-core2-64-qemux86-64-toolchain-3.2+snapshot.sh -y -d /home/oe/.local/opt/poky/3.2+snapshot which generates relocation path /home/oe/.local/home/oe/.local/opt/poky/3.2+snapshot instead of /home/oe/.local/opt/poky/3.2+snapshot Fixes: 93ec145f42 ("toolchain-shar-extract: Add post-relocate scripts") (From OE-Core rev: 5000aabe6ac336e7b424dafa1bf76271dee6a6f1) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Krzysztof Zawadzki <krzysztof.zawadzki@nokia.com> Cc: Randy Witt <randy.e.witt@linux.intel.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: toolchain-shar-relocate.sh: Do not use $target_sdk_dir as regexMarek Vasut2021-01-121-1/+3
| | | | | | | | | | | | | | | | | | | | | The $target_sdk_dir path might contain special characters, for example if the path is /opt/poky/3.2+snapshot . Prevent grep from interpreting those as part of the regex by using the -F parameter and multiple -e parameters to specify which strings to filter out. Also note that the previous regex was using asterisk as wildcard (e.g. environment-setup-*), but that should have been regex (e.g. environment-setup-.*, with dot) to match correctly, this is also fixed by this change. Fixes: 9721378688 ("toolchain-shar-template.sh: Make relocation optional.") (From OE-Core rev: 19d9fa7ab6c851000bc5d24281739e1b2bb8f057) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Krzysztof Zawadzki <krzysztof.zawadzki@nokia.com> Cc: Randy Witt <randy.e.witt@linux.intel.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "relocate_sdk.py: remove hardcoded SDK path"Richard Purdie2018-07-251-1/+1
| | | | | | | | | | | | | This reverts commit 6671a4d980c8bef8f402780a308f6c43a25044aa. This breaks uninative tarball since the call of relocate_sdk.py from uninative.bbclass wasn't updated to account for this change. It isn't clear what value that code could pass in and this isn't simple to fix so revert until a better fix can be found that doesn't break uninative. (From OE-Core rev: b247392b4ced57cfe694656032f6a6723740a9e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* relocate_sdk.py: remove hardcoded SDK pathRuslan Bilovol2018-07-241-1/+1
| | | | | | | | | | | | | | | | This patch removes hardcodes added to relocate_sdk.py during SDK build, making it flexible and reusable. Now default SDK path is passed to the script as parameter rather then harcoded inside it. This allows to reuse this script for multiple relocations, and adds possibility to relocate SDK multiple times (From OE-Core rev: 6671a4d980c8bef8f402780a308f6c43a25044aa) Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-relocate.sh: Fix typoRichard Purdie2016-09-231-1/+1
| | | | | | (From OE-Core rev: 8d6ee36493800a30e9bd6eacb671fbafe5d61ad7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-relocate.sh: Add error-handlingMariano Lopez2016-09-221-1/+19
| | | | | | | | | | | | | | | The relocation script of the SDK doesn't have enough error handling when replacing host perl with SDK perl or changing the symlinks. This will add those checks along with a sanity check of xargs. [YOCTO #10114] (From OE-Core rev: c9982dab4cfdd5963d2c2dd4aab99dd6a27fcd1c) 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>
* meta: toolchain-shar-relocate.sh: Fix for extracting SDK in the same ↵Zawadzki, Krzysztof (Nokia - PL/Wroclaw)2016-03-111-1/+1
| | | | | | | | | | | | | | | directory as SDK script. If SDK will be extracted in the same folder as sdk shar script. The shar_relocate will substitute SDK.sh script SDKPATH with extract destination path. After that operation no one will be able use this sdk script as paths in it will be different. To fix this we need to filter out sdk script and relocate_sdk scripts from SDKPATH substitution (From OE-Core rev: 723434fb3bb78f18fdf281d31efa5b59138ca8a6) Signed-off-by: Krzysztof Zawadzki <krzysztof.zawadzki@nokia.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/files/toolchain-shar-relocate.sh: Detect different python binaries and ↵Liam R. Howlett2016-01-241-2/+17
| | | | | | | | | | | | | | | | select one that exists. Although the relocate_sdk.sh supports python3, fc23 does not symlink /usr/bin/python3 to /usr/bin/python. Using exec instead of a call to the correct interpreter causes a failure on fc23 when python2 is not present. This uses 'which' to locate python, python2, then python3 and uses the first one that's found. (From OE-Core rev: 99d4d97f51b658d58a50789056b422e48df89ad9) Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-extract.sh: proper fix for additional env setup scriptsPaul Eggleton2015-12-081-2/+0
| | | | | | | | | | | | | buildtools-tarball uses a custom env setup script, which isn't named the same as the default; thus unfortunately OE-Core revision a36469c97c9cb335de1e95dea5141038f337df95 broke installation of buildtools-tarball. Revert that and implement a more robust mechanism. (From OE-Core rev: 00e081b81ba8118959b724269ba9d18d42aba8a4) 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>
* toolchain-shar-relocate: don't assume last state of env_setup_script is goodJean-Francois Dagenais2015-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | In the case where many environment-setup-* files exist, the incorrect filename might be lastly set in env_setup_script, which leads to incorrect behaviour for the initialization of native_sysroot. The scenario I had was that our custom meta-toolchain-*.bb, which inherits populate_sdk, defined another environment-setup-* file to dump variable information for qt-creator. The file is named like so in order for the sdk shell script to pick it up and fix the SDK paths in the file. Since it (coincidentally) alphabetically comes after ...-core2, it was last set in env_setup_script and the grep OECORE_NATIVE_SYSROOT would simply be blank. The apparent symptom was "...relocate_sdk.py: Argument list too long" since the find command would not be searching in the right path. (From OE-Core rev: a36469c97c9cb335de1e95dea5141038f337df95) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-relocate.sh: make it fasterRobert Yang2015-10-011-14/+10
| | | | | | | | | | | | | | | | | | Make the extrating faster by: * Merge the two heavy "for .. find" loops into one * Move the commands out of for loop rather than inside, this can reduce the forking amount. As a result, when install: * buildtools-nativesdk-standalone: 14s -> 7s (50% saved) * core-image-minimal-core2-64-toolchain: 56s -> 47s (17% saved) [YOCTO #8404] (From OE-Core rev: a619f8e5fd8b88278d41a3d82aca5a8d03cb2907) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-shar-template.sh: Make relocation optional.Randy Witt2015-02-241-0/+50
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>