diff options
| author | Mark Hatle <mark.hatle@amd.com> | 2024-07-24 11:51:58 -0600 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2024-07-24 20:55:18 -0600 |
| commit | 7677aea77324229a8021039e1902587ae552771f (patch) | |
| tree | 36a33799f9d4c312fc5e0fd99ea1b670b184f6a8 /meta-vitis-tc | |
| parent | 76896af103e13176e7bcbc5e57d5357249c6a0f6 (diff) | |
| download | meta-xilinx-7677aea77324229a8021039e1902587ae552771f.tar.gz | |
meta-vitis-tc: Fix SDK install from a RO location
When runtime-relocation is enabled, installing from a read-only location
could failure due to a temporary log file. Ensure this log file is written
into a tmp/writable location.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-vitis-tc')
| -rw-r--r-- | meta-vitis-tc/files/toolchain-shar-relocate.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/meta-vitis-tc/files/toolchain-shar-relocate.sh b/meta-vitis-tc/files/toolchain-shar-relocate.sh index b7faf090..9e07bbda 100644 --- a/meta-vitis-tc/files/toolchain-shar-relocate.sh +++ b/meta-vitis-tc/files/toolchain-shar-relocate.sh | |||
| @@ -54,13 +54,19 @@ if [ $relocate = 1 -o $relocate = 2 ] ; then | |||
| 54 | fi | 54 | fi |
| 55 | fi | 55 | fi |
| 56 | if [ $relocate = 2 ] ; then | 56 | if [ $relocate = 2 ] ; then |
| 57 | $SUDO_EXEC ${PYTHON} ${env_setup_script%/*}/relocate-wrapper.py $target_sdk_dir > relocate.log 2>&1 | 57 | tdir=`mktemp -d` |
| 58 | if [ x$tdir = x ] ; then | ||
| 59 | echo "SDK relocate failed, could not create a temporary directory" | ||
| 60 | exit 1 | ||
| 61 | fi | ||
| 62 | $SUDO_EXEC ${PYTHON} ${env_setup_script%/*}/relocate-wrapper.py $target_sdk_dir > $tdir/relocate.log 2>&1 | ||
| 58 | if [ $? -ne 0 ]; then | 63 | if [ $? -ne 0 ]; then |
| 59 | cat relocate.log | 64 | cat $tdir/relocate.log |
| 60 | echo "SDK could not be set up. Runtime-Relocate script failed. Abort!" | 65 | echo "SDK could not be set up. Runtime-Relocate script failed. Abort!" |
| 66 | rm -rf $tdir | ||
| 61 | exit 1 | 67 | exit 1 |
| 62 | fi | 68 | fi |
| 63 | rm -f relocate.log | 69 | rm -rf $tdir |
| 64 | 70 | ||
| 65 | for env_setup_scripts in `ls $target_sdk_dir/environment-setup-*`; do | 71 | for env_setup_scripts in `ls $target_sdk_dir/environment-setup-*`; do |
| 66 | cat << EOF > ${env_setup_scripts}.new | 72 | cat << EOF > ${env_setup_scripts}.new |
