diff --git a/classes/sdcard_image-sunxi.bbclass b/classes/sdcard_image-sunxi.bbclass index cfb8c32..58c92d6 100644 --- a/classes/sdcard_image-sunxi.bbclass +++ b/classes/sdcard_image-sunxi.bbclass @@ -71,16 +71,16 @@ IMAGE_CMD_sunxi-sdimg () { for DTS_FILE in ${KERNEL_DEVICETREE}; do DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` 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 mmd -i ${WORKDIR}/boot.img ::/${DTS_DIR_NAME} fi 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 - 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 done