summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2017-08-27 12:50:00 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2017-08-27 12:50:00 +0200
commit1fbf5afe18d5b35d9141c3ca2c88bcc2fd3512d5 (patch)
tree6605c97759904631d26a2400c633cd6985fed7b8
parent644710d34d5ad21bb1ad26654a70bcbff46cf46d (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>
-rwxr-xr-xrecipes-images/images/files/library/imx6/update.sh2
-rwxr-xr-xrecipes-images/images/files/library/tegra/update.sh2
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"`"