From: Max Krummenacher Date: Sun, 27 Aug 2017 10:22:43 +0000 (+0200) Subject: image_types_fsl: fix for dtb filenames containing multiple dots X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=42c201bd862db37a73721e99cdb27b80f937f3ee;p=meta-freescale.git image_types_fsl: fix for dtb filenames containing multiple dots In _generate_boot_image(), if a dtb file has more than one dot the current logic fails. e.g. 'device.tree.dtb' will be truncated at the first dot to 'device' while it should be 'device.tree'. Fix by removing awk in favour of letting basename also remove the .dtb extension. Signed-off-by: Max Krummenacher Signed-off-by: Otavio Salvador --- diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index 91213e9f..01db7041 100644 --- a/classes/image_types_fsl.bbclass +++ b/classes/image_types_fsl.bbclass @@ -126,7 +126,7 @@ _generate_boot_image() { # Copy device tree file if test -n "${KERNEL_DEVICETREE}"; then for DTS_FILE in ${KERNEL_DEVICETREE}; do - DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` + DTS_BASE_NAME=`basename ${DTS_FILE} .dtb` if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then 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"`"