From 50297207a83cf7640e5cc3ed3500ffb807155bf2 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Fri, 27 Jun 2025 17:36:27 +0200 Subject: [PATCH] board/freescale/mxs: fix Linux booting Actually DTB_LIST accepts only file and not files with relative path preprended. This leads to have vfat without .dtb files and so Linux doesn't start. Let's fix this by including slash in sed command as done for mxc as well as basename in front of $dt.dtb to remove possible useless folders present in the dts path. Let's also add set -e at the top of the script to make it more verbose on error and modify this section according to spellcheck as done for mxc. This commit align this "mxs/post-image.sh" with its "imx/post-image.sh" counterpart which was improved for arm64 in commit [1]. [1] https://gitlab.com/buildroot.org/buildroot/-/commit/4755bf2bd43a7b4c3bf4f88be790240a01b3116f Signed-off-by: Giulio Benetti [Julien: - change space indentation to tabs for consistency - add note in commit log about imx/post-image.sh ] Signed-off-by: Julien Olivain --- board/freescale/common/mxs/post-image.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 }