diff options
author | hongxu <hongxu.jia@windriver.com> | 2021-08-10 21:33:56 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-13 14:44:06 +0100 |
commit | 7c88e08e62d526b109f2286f13f9da13e60a8c0f (patch) | |
tree | f317aa8693b6d034aa379b85f47ecb8b59fbd942 /meta/files | |
parent | da6ba4d0b88cbdb758d1b1b0794997814453410d (diff) | |
download | poky-7c88e08e62d526b109f2286f13f9da13e60a8c0f.tar.gz |
sdk: fix relocate symlink failed
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>
Diffstat (limited to 'meta/files')
-rw-r--r-- | meta/files/toolchain-shar-relocate.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh index 8ea6194eca..3ece04db0a 100644 --- a/meta/files/toolchain-shar-relocate.sh +++ b/meta/files/toolchain-shar-relocate.sh | |||
@@ -72,7 +72,7 @@ fi | |||
72 | 72 | ||
73 | # change all symlinks pointing to @SDKPATH@ | 73 | # change all symlinks pointing to @SDKPATH@ |
74 | for l in $($SUDO_EXEC find $native_sysroot -type l); do | 74 | for l in $($SUDO_EXEC find $native_sysroot -type l); do |
75 | $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l | 75 | $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$SDK_BUILD_PATH:$target_sdk_dir:") $l |
76 | if [ $? -ne 0 ]; then | 76 | if [ $? -ne 0 ]; then |
77 | echo "Failed to setup symlinks. Relocate script failed. Abort!" | 77 | echo "Failed to setup symlinks. Relocate script failed. Abort!" |
78 | exit 1 | 78 | exit 1 |