tf-a-stm32mp: move TF-A symlink creation to do_deploy
Moved deploy_symlinks_atf from SYSROOT_PREPROCESS_FUNCS to do_deploy task to ensure symlinks are created correctly even when rebuilding from the shared state after a "bitbake -c clean tf-a-stm32mp". Override do_deploy[sstate-outputdirs] from the original recipe to allow installing both the deploy artifacts (binaries and symlinks) to the package deploy directory. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
f65dc4440e
commit
2cbfe2ae0d
|
|
@ -310,8 +310,6 @@ do_compile() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This runs after 'tf_a_sysroot_populate()' which populates all
|
|
||||||
# TF-A artifacts on the image deploy dir.
|
|
||||||
# The purpose of this function is to create symlinks to the files needed
|
# The purpose of this function is to create symlinks to the files needed
|
||||||
# by the uuu installer that are located in subdirectories.
|
# by the uuu installer that are located in subdirectories.
|
||||||
deploy_symlinks_atf() {
|
deploy_symlinks_atf() {
|
||||||
|
|
@ -325,21 +323,24 @@ deploy_symlinks_atf() {
|
||||||
tfa_basename=$(echo ${TF_A_BINARIES} | cut -d',' -f${i})
|
tfa_basename=$(echo ${TF_A_BINARIES} | cut -d',' -f${i})
|
||||||
for dt in ${dt_config}; do
|
for dt in ${dt_config}; do
|
||||||
TF_A_FILENAME="${tfa_basename}-${dt}-${config}${TF_A_ENCRYPT_SUFFIX}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}"
|
TF_A_FILENAME="${tfa_basename}-${dt}-${config}${TF_A_ENCRYPT_SUFFIX}${TF_A_SIGN_SUFFIX}.${TF_A_SUFFIX}"
|
||||||
if [ -f "${DEPLOY_DIR_IMAGE}/${TF_A_BASEDIR}/${TF_A_FILENAME}" ]; then
|
if [ -f "${DEPLOYDIR}/${TF_A_BASEDIR}/${TF_A_FILENAME}" ]; then
|
||||||
cd "${DEPLOY_DIR_IMAGE}"
|
|
||||||
# symlink TF-A
|
# symlink TF-A
|
||||||
ln -sf "${TF_A_BASEDIR}/${TF_A_FILENAME}" "${DEPLOY_DIR_IMAGE}"
|
ln -sf "${TF_A_BASEDIR}/${TF_A_FILENAME}" "${DEPLOYDIR}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# Last value of 'dt' is good for metadata binary, so use that.
|
# Last value of 'dt' is good for metadata binary, so use that.
|
||||||
if [ "${TF_A_ENABLE_METADATA}" = "1" ]; then
|
if [ "${TF_A_ENABLE_METADATA}" = "1" ]; then
|
||||||
if [ -f "${DEPLOY_DIR_IMAGE}/${TF_A_BASEDIR}/${TF_A_METADATA_BINARY}" ]; then
|
if [ -f "${DEPLOYDIR}/${TF_A_BASEDIR}/${TF_A_METADATA_BINARY}" ]; then
|
||||||
cd "${DEPLOY_DIR_IMAGE}"
|
|
||||||
# symlink metadata
|
# symlink metadata
|
||||||
ln -sf "${TF_A_BASEDIR}/${TF_A_METADATA_BINARY}" "${DEPLOY_DIR_IMAGE}/${TF_A_METADATA_NAME}-${MACHINE}.${TF_A_METADATA_SUFFIX}"
|
ln -sf "${TF_A_BASEDIR}/${TF_A_METADATA_BINARY}" "${DEPLOYDIR}/${TF_A_METADATA_NAME}-${MACHINE}.${TF_A_METADATA_SUFFIX}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
SYSROOT_PREPROCESS_FUNCS += "deploy_symlinks_atf"
|
|
||||||
|
do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
|
||||||
|
do_deploy() {
|
||||||
|
export_binaries ${DEPLOYDIR}${FIP_DIR_TFA_BASE}
|
||||||
|
deploy_symlinks_atf
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue