From bc6b4622cccbc5c158fdbc83c30da602b4caa458 Mon Sep 17 00:00:00 2001 From: Tejas Bhumkar Date: Fri, 21 Jul 2023 23:20:24 +0530 Subject: Add a check for uboot-device-tree dtb Added below changes: 1)Updated operator in if condition from `==` to `=` as it is used for string comparison in both Bash and Dash, making the script compatible with both shells. 2)Checking for uboot-device-tree.dtb file in RECIPE_SYSROOT path before applying fdtoverlay. Signed-off-by: Tejas Bhumkar Signed-off-by: Mark Hatle --- meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta-xilinx-core/recipes-bsp/u-boot') diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc index baefe293..bbf4125f 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc @@ -100,7 +100,7 @@ do_blob_generate () { DTBO=$(echo $CC_DTB | cut -d: -f1) BASE_DTB=$(echo $CC_DTB | cut -d: -f2) OUTPUT_DTB=$(echo $CC_DTB | cut -d: -f3) - if [ "${SYSTEM_DTB_BLOB}" == "1" ]; then + if [ "${SYSTEM_DTB_BLOB}" = "1" ]; then BASE_SYS_DTB="${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_FILE_NAME}" else BASE_SYS_DTB="${B}/arch/arm/dts/${BASE_DTB}" @@ -115,8 +115,8 @@ do_blob_generate () { DTBO=$(echo $CC_DTB | cut -d: -f1) OUTPUT_DTB=$(echo $CC_DTB | cut -d: -f3) BASE_SYS_DTB="${RECIPE_SYSROOT}/${DTB_PATH}/${PACKAGE_UBOOT_DTB_NAME}" + if [ -f ${B}/arch/arm/dts/${DTBO} ] && [ -f ${BASE_SYS_DTB} ]; then bbnote "fdtoverlay -o ${DT_BLOB_DIR}/${OUTPUT_DTB} -i ${BASE_SYS_DTB} ${B}/arch/arm/dts/${DTBO}" - if [ -f ${B}/arch/arm/dts/${DTBO} ]; then fdtoverlay -o ${DT_BLOB_DIR}/${OUTPUT_DTB} -i ${BASE_SYS_DTB} ${B}/arch/arm/dts/${DTBO} fi done -- cgit v1.2.3-54-g00ecf