diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-08-27 12:50:00 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-10-03 18:23:45 +0200 |
commit | 74b02daa6e22105da779bea3b13f052669b7deb6 (patch) | |
tree | 6605c97759904631d26a2400c633cd6985fed7b8 /recipes-images/images/files | |
parent | cda8df33063554e939e05e1e1a7fa6f34ada4210 (diff) |
update.sh: fix for dtb filenames containing multiple dots
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>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'recipes-images/images/files')
-rwxr-xr-x | recipes-images/images/files/library/imx6/update.sh | 2 | ||||
-rwxr-xr-x | recipes-images/images/files/library/tegra/update.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/recipes-images/images/files/library/imx6/update.sh b/recipes-images/images/files/library/imx6/update.sh index fb9510d..27dda07 100755 --- a/recipes-images/images/files/library/imx6/update.sh +++ b/recipes-images/images/files/library/imx6/update.sh @@ -268,7 +268,7 @@ mcopy -i ${BINARIES}/boot.vfat -s ${BINARIES}/${KERNEL_IMAGETYPE} ::/${KERNEL_IM COPIED=false 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 "${BINARIES}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then kernel_bin="`readlink ${BINARIES}/${KERNEL_IMAGETYPE}`" kernel_bin_for_dtb="`readlink ${BINARIES}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MODTYPE},g;s,\.dtb$,.bin,g"`" diff --git a/recipes-images/images/files/library/tegra/update.sh b/recipes-images/images/files/library/tegra/update.sh index 27e4fe6..879918f 100755 --- a/recipes-images/images/files/library/tegra/update.sh +++ b/recipes-images/images/files/library/tegra/update.sh @@ -420,7 +420,7 @@ else COPIED=false 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 "${BINARIES}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then kernel_bin="`readlink ${BINARIES}/${KERNEL_IMAGETYPE}`" kernel_bin_for_dtb="`readlink ${BINARIES}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MODTYPE},g;s,\.dtb$,.bin,g"`" |