Commit 56f23fad authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

fixed copying the device tree

parent 8427398c
...@@ -16,25 +16,32 @@ SRC_URI += "file://${MACHINE_DEVICETREE} \ ...@@ -16,25 +16,32 @@ SRC_URI += "file://${MACHINE_DEVICETREE} \
do_deploy(){ do_deploy(){
for DTS_FILE in ${S}/devicetree/*.dts; do for DTS_FILE in ${S}/devicetree/*.dts; do
DTS_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` DTS_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
for RLOC in ${PRODUCTION_ROOT_LOCATION}; do MACHINE_DTS_NAME=`basename ${MACHINE_DEVICETREE} | awk -F "." '{print $1}'`
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} if test $MACHINE_DTS_NAME = $DTS_NAME; then
install -m 0644 ${B}/${DTS_NAME}_${RLOC}.dtb ${DEPLOY_DIR_IMAGE}/${DTS_NAME}_${RLOC}.dtb 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
echo "RootFS located in ${RLOC}" install -d ${DEPLOY_DIR_IMAGE}
if [ ! -d ${DEPLOY_DIR_IMAGE}/${RLOC} ]; then install -m 0644 ${B}/${DTS_NAME}_${RLOC}.dtb ${DEPLOY_DIR_IMAGE}/${DTS_NAME}_${RLOC}.dtb
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 "RootFS located in ${RLOC}"
done 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})"
fi
done 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