sdcard_image-sunxi.bbclass: fix dtb naming conventions

DTB naming conventions has been changed on deploy, see:
poky: c5b70d7155a76b727400db225c446d1b2f7072a6
oe-core: 1860d9d3c62e2e94cd68a809385873ffd8270b6d

Modify sdcard_image-sunxi.bbclass accordingly.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
This commit is contained in:
Sergey Matyukevich 2018-11-09 23:09:54 +03:00
parent 712229cbe4
commit f9ad5fa55b

View File

@ -71,16 +71,16 @@ IMAGE_CMD_sunxi-sdimg () {
for DTS_FILE in ${KERNEL_DEVICETREE}; do for DTS_FILE in ${KERNEL_DEVICETREE}; do
DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
DTS_DIR_NAME=`dirname ${DTS_FILE}` DTS_DIR_NAME=`dirname ${DTS_FILE}`
if [ -e ${DEPLOY_DIR_IMAGE}/"${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then if [ -e ${DEPLOY_DIR_IMAGE}/"${DTS_BASE_NAME}.dtb" ]; then
if [ ${DTS_FILE} != ${DTS_BASE_NAME}.dtb ]; then if [ ${DTS_FILE} != ${DTS_BASE_NAME}.dtb ]; then
mmd -i ${WORKDIR}/boot.img ::/${DTS_DIR_NAME} mmd -i ${WORKDIR}/boot.img ::/${DTS_DIR_NAME}
fi fi
kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`" kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`" kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${KERNEL_IMAGETYPE},g;s,\.dtb$,.bin,g"`"
if [ $kernel_bin = $kernel_bin_for_dtb ]; then if [ $kernel_bin = $kernel_bin_for_dtb ]; then
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_FILE} mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${DTS_BASE_NAME}.dtb ::/${DTS_FILE}
fi fi
fi fi
done done