diff --git a/board/freescale/common/mxs/post-image.sh b/board/freescale/common/mxs/post-image.sh index 0bfb835c6e..97c8ee9079 100755 --- a/board/freescale/common/mxs/post-image.sh +++ b/board/freescale/common/mxs/post-image.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e + # # dtb_list extracts the list of DTB files from BR2_LINUX_KERNEL_INTREE_DTS_NAME # in ${BR_CONFIG}, then prints the corresponding list of file names for the @@ -7,10 +9,12 @@ # dtb_list() { - local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})" + local DTB_LIST + + DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([\/a-z0-9 \-]*\)"$/\1/p' "${BR2_CONFIG}")" for dt in $DTB_LIST; do - echo -n "\"$dt.dtb\", " + echo -n "\"$(basename "${dt}").dtb\", " done }