aboutsummaryrefslogtreecommitdiff
path: root/scripts/uboot-script-gen
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/uboot-script-gen')
-rwxr-xr-xscripts/uboot-script-gen16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index 967cf6d..71669a9 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -4,6 +4,12 @@ offset=$((2*1024*1024))
filesize=0
prog_req=(mkimage file fdtput mktemp awk)
+function cleanup_and_return_err()
+{
+ rm -f $UBOOT_SOURCE $UBOOT_SCRIPT
+ remove_tmp_files
+ exit 1
+}
function dt_mknode()
{
@@ -854,8 +860,14 @@ cd "$uboot_dir"
if test "$PASSTHROUGH_DTS_REPO"
then
- compile_merge_partial_dts "$PASSTHROUGH_DTS_REPO"
- echo "Done compiling the partial device trees"
+ output_dir=`mktemp -d "partial-dtbs-XXX"`
+ compile_merge_partial_dts $output_dir "$PASSTHROUGH_DTS_REPO"
+ if test $? -ne 0
+ then
+ # Remove the output dir holding the partial dtbs in case of any error
+ tmp_dirs+=($output_dir)
+ cleanup_and_return_err
+ fi
fi
if test "$FIT"