Commit a9b5e6c7 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

removed looping through dtses

parent 56f23fad
......@@ -14,34 +14,27 @@ SRC_URI += "file://${MACHINE_DEVICETREE} \
"
do_deploy(){
for DTS_FILE in ${S}/devicetree/*.dts; do
DTS_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
MACHINE_DTS_NAME=`basename ${MACHINE_DEVICETREE} | awk -F "." '{print $1}'`
if test $MACHINE_DTS_NAME = $DTS_NAME; then
echo "Copying ${MACHINE_DTS_NAME}"
for RLOC in ${PRODUCTION_ROOT_LOCATION}; do
if [ ! -f ${B}/${DTS_NAME}_${RLOC}.dtb ]; then
echo "Warning: ${B}/${DTS_NAME}_${RLOC}.dtb is not available!"
continue
fi
install -d ${DEPLOY_DIR_IMAGE}
install -m 0644 ${B}/${DTS_NAME}_${RLOC}.dtb ${DEPLOY_DIR_IMAGE}/${DTS_NAME}_${RLOC}.dtb
echo "RootFS located in ${RLOC}"
if [ ! -d ${DEPLOY_DIR_IMAGE}/${RLOC} ]; then
mkdir ${DEPLOY_DIR_IMAGE}/${RLOC}
fi
if [ -f ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_DEVICETREE} ]; then
rm ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_DEVICETREE}
fi
cp ${DEPLOY_DIR_IMAGE}/${DTS_NAME}_${RLOC}.dtb ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_DEVICETREE}
done
else
echo "Skipping ${DTS_NAME} (machine dts = ${MACHINE_DTS_NAME})"
DTS_NAME=`basename ${MACHINE_DEVICETREE} | awk -F "." '{print $1}'`
echo "Copying ${DTS_NAME} device tree to production locations"
for RLOC in ${PRODUCTION_ROOT_LOCATION}; do
if [ ! -f ${B}/${DTS_NAME}_${RLOC}.dtb ]; then
echo "Warning: ${B}/${DTS_NAME}_${RLOC}.dtb is not available!"
continue
fi
install -d ${DEPLOY_DIR_IMAGE}
install -m 0644 ${B}/${DTS_NAME}_${RLOC}.dtb ${DEPLOY_DIR_IMAGE}/${DTS_NAME}_${RLOC}.dtb
if [ ! -d ${DEPLOY_DIR_IMAGE}/${RLOC} ]; then
mkdir ${DEPLOY_DIR_IMAGE}/${RLOC}
fi
if [ -f ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_DEVICETREE} ]; then
rm ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_DEVICETREE}
fi
cp ${DEPLOY_DIR_IMAGE}/${DTS_NAME}_${RLOC}.dtb ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_DEVICETREE}
echo "Installed to ${DEPLOY_DIR_IMAGE}/${RLOC}/"
done
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment