diff mbox series

uboot-sign: Fix to install nonexistent dtb file

Message ID 20240115053027.1660702-1-jamin_lin@aspeedtech.com
State New
Headers show
Series uboot-sign: Fix to install nonexistent dtb file | expand

Commit Message

Jamin Lin Jan. 15, 2024, 5:30 a.m. UTC
Add to check dtb file is exist, then install it.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 meta/classes-recipe/uboot-sign.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index ad04c82378..26d75995a6 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -315,7 +315,9 @@  EOF
 			${SPL_MKIMAGE_SIGN_ARGS}
 	fi
 
-	cp ${SPL_DIR}/${SPL_DTB_BINARY} ${SPL_DIR}/${SPL_DTB_SIGNED}
+	if [ -e "${SPL_DIR}/${SPL_DTB_BINARY}" ]; then
+		cp ${SPL_DIR}/${SPL_DTB_BINARY} ${SPL_DIR}/${SPL_DTB_SIGNED}
+	fi
 }
 
 uboot_assemble_fitimage_helper() {