summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorMax Krummenacher <max.oss.09@gmail.com>2017-08-27 12:22:43 +0200
committerOtavio Salvador <otavio@ossystems.com.br>2017-08-30 10:08:09 -0300
commitce1e0af209c222cb877962104c4f807d5807fa1e (patch)
tree7ca5bc6551fd5a65bb8ed16de69324d02b991b8b /classes
parentba48b43f92ed8e5dd635554b7bda0eaac5a1646b (diff)
downloadmeta-freescale-ce1e0af209c222cb877962104c4f807d5807fa1e.tar.gz
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 <max.krummenacher@toradex.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_fsl.bbclass2
1 files changed, 1 insertions, 1 deletions
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() {
126 # Copy device tree file 126 # Copy device tree file
127 if test -n "${KERNEL_DEVICETREE}"; then 127 if test -n "${KERNEL_DEVICETREE}"; then
128 for DTS_FILE in ${KERNEL_DEVICETREE}; do 128 for DTS_FILE in ${KERNEL_DEVICETREE}; do
129 DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` 129 DTS_BASE_NAME=`basename ${DTS_FILE} .dtb`
130 if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then 130 if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
131 kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`" 131 kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
132 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"`" 132 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"`"