From ce1e0af209c222cb877962104c4f807d5807fa1e Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sun, 27 Aug 2017 12:22:43 +0200 Subject: [PATCH] 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 --- classes/image_types_fsl.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index f360b585..91b6c4e5 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"`" -- 2.40.1