blob: e170e5aa37714f74cf36d3196116c3ed3d56d4d5 [file]
SUMMARY = "gBMC True Hitless Script for MSV Export"
DESCRIPTION = "Deploys true hitless scripts to DEPLOYDIR for consumption by MSV packages. \
These scripts are not installed to any rootfs - they are only made available for other \
recipes to copy during image creation."
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
# Share source files with true-hitless recipe
FILESEXTRAPATHS:prepend := "${THISDIR}/true-hitless:"
SRC_URI = " \
file://emmc-true-hitless-enable.sh \
file://emmc-true-hitless-disable.sh \
file://true-hitless-initialize.sh \
file://true-hitless-status-update.sh \
file://true-hitless-version-check.sh \
file://emmc-services-restart.sh \
"
S = "${WORKDIR}"
inherit deploy
DEPENDS += " systemd"
# Deploy scripts to DEPLOYDIR (not rootfs)
# These will be available at ${DEPLOY_DIR_IMAGE}/true-hitless-script/
do_deploy() {
# Replace placeholders with actual values in scripts
if [ -z "${MACHINE}" ]; then
bbfatal "MACHINE variable is not set"
fi
sed -i -e 's|@MACHINE@|${MACHINE}|g' ${S}/emmc-true-hitless-enable.sh
sed -i -e 's|@MACHINE@|${MACHINE}|g' ${S}/emmc-true-hitless-disable.sh
sed -i -e 's|@MACHINE@|${MACHINE}|g' ${S}/true-hitless-status-update.sh
# Deploy scripts to a subdirectory
install -d ${DEPLOYDIR}/true-hitless-script
install -m 0755 ${S}/emmc-true-hitless-enable.sh ${DEPLOYDIR}/true-hitless-script/
install -m 0755 ${S}/emmc-true-hitless-disable.sh ${DEPLOYDIR}/true-hitless-script/
install -m 0755 ${S}/true-hitless-initialize.sh ${DEPLOYDIR}/true-hitless-script/
install -m 0755 ${S}/true-hitless-status-update.sh ${DEPLOYDIR}/true-hitless-script/
install -m 0755 ${S}/true-hitless-version-check.sh ${DEPLOYDIR}/true-hitless-script/
install -m 0755 ${S}/emmc-services-restart.sh ${DEPLOYDIR}/true-hitless-script/
}
addtask deploy before do_build after do_compile