aboutsummaryrefslogtreecommitdiff
path: root/scripts/uboot-script-gen
diff options
context:
space:
mode:
authorBrian Woods2020-05-12 15:42:11 -0700
committerStefano Stabellini2020-05-13 11:09:00 -0700
commita22803b46499d54c154e32c27f1a5ce7a55c1eea (patch)
treecf8439f543438d8c5cecc846f89dd393e9f5ed4a /scripts/uboot-script-gen
parentab534253ec32fcf2b70506502ef42deea435e756 (diff)
Increase file compatibility for DTBs
In some distros (like RHEL 6 and 7), file identifies the device tree blobs (DTBs) as "data". To make imagebuilder work on these older distros, change it where DTBs are correctly identified as "Device Tree Blob" or "data". Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'scripts/uboot-script-gen')
-rw-r--r--scripts/uboot-script-gen5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index 070247b..167e980 100644
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -136,6 +136,11 @@ function check_file_type()
if [ "$type" = "executable" ]
then
type="executable\|data"
+ # file in older distros (ex: RHEL 7.4) just output data for device
+ # tree blobs
+ elif [ "$type" = "Device Tree Blob" ]
+ then
+ type="Device Tree Blob\|data"
fi
file -L $filename | grep "$type" &> /dev/null