summaryrefslogtreecommitdiff
path: root/recipes-images/images/files/library
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2018-07-12 18:44:36 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2019-03-06 13:44:33 +0100
commitf956f104c6c76cbb3b5cbcbb021c1b7d211ce55e (patch)
tree903fd2091c2315f647df526ae90df96a0649414e /recipes-images/images/files/library
parent809f4be20a548cbd8903ef389d758ad5c07b39d7 (diff)
update.sh: follow dtb naming convention change
OE-core dropped to prefix the device tree files with the kernel image type. Follow that. While at it drop the empty ${DEPLOY_DIR_IMAGE} path element which sneaked in through copy/paste. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-images/images/files/library')
-rwxr-xr-xrecipes-images/images/files/library/imx6/update.sh17
-rwxr-xr-xrecipes-images/images/files/library/tegra/update.sh17
2 files changed, 12 insertions, 22 deletions
diff --git a/recipes-images/images/files/library/imx6/update.sh b/recipes-images/images/files/library/imx6/update.sh
index 8c29e47..dc5e0dd 100755
--- a/recipes-images/images/files/library/imx6/update.sh
+++ b/recipes-images/images/files/library/imx6/update.sh
@@ -264,17 +264,12 @@ mcopy -i ${BINARIES}/boot.vfat -s ${BINARIES}/${KERNEL_IMAGETYPE} ::/${KERNEL_IM
# Copy device tree file
COPIED=false
if test -n "${KERNEL_DEVICETREE}"; then
- for DTS_FILE in ${KERNEL_DEVICETREE}; do
- 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"`"
- if [ "$kernel_bin" = "$kernel_bin_for_dtb" ]; then
- mcopy -i ${BINARIES}/boot.vfat -s ${BINARIES}/${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
- #copy also to out_dir
- sudo cp ${BINARIES}/${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb "$OUT_DIR/${DTS_BASE_NAME}.dtb"
- COPIED=true
- fi
+ for DTB_FILE in ${KERNEL_DEVICETREE}; do
+ if [ -e "${BINARIES}/${DTB_FILE}" ]; then
+ mcopy -i ${BINARIES}/boot.vfat -s ${BINARIES}/${DTB_FILE} ::/${DTB_FILE}
+ #copy also to out_dir
+ sudo cp ${BINARIES}/${DTB_FILE} "$OUT_DIR/"
+ COPIED=true
fi
done
[ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; }
diff --git a/recipes-images/images/files/library/tegra/update.sh b/recipes-images/images/files/library/tegra/update.sh
index caa6228..cb55dfc 100755
--- a/recipes-images/images/files/library/tegra/update.sh
+++ b/recipes-images/images/files/library/tegra/update.sh
@@ -419,17 +419,12 @@ else
# Copy device tree file
COPIED=false
if test -n "${KERNEL_DEVICETREE}"; then
- for DTS_FILE in ${KERNEL_DEVICETREE}; do
- 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"`"
- if [ "$kernel_bin" = "$kernel_bin_for_dtb" ]; then
- mcopy -i ${BINARIES}/boot.vfat -s ${BINARIES}/${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
- #copy also to out_dir
- sudo cp ${BINARIES}/${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb "$OUT_DIR/${DTS_BASE_NAME}.dtb"
- COPIED=true
- fi
+ for DTB_FILE in ${KERNEL_DEVICETREE}; do
+ if [ -e "${BINARIES}/${DTB_FILE}" ]; then
+ mcopy -i ${BINARIES}/boot.vfat -s ${BINARIES}/${DTB_FILE} ::/${DTB_FILE}
+ #copy also to out_dir
+ sudo cp ${BINARIES}/${DTB_FILE} "$OUT_DIR/"
+ COPIED=true
fi
done
([ "${MODTYPE}" = "apalis-tk1" ] || [ "${MODTYPE}" = "apalis-tk1-mainline" ]) && ([ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; })