From a22803b46499d54c154e32c27f1a5ce7a55c1eea Mon Sep 17 00:00:00 2001 From: Brian Woods Date: Tue, 12 May 2020 15:42:11 -0700 Subject: 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 Reviewed-by: Stefano Stabellini --- scripts/uboot-script-gen | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3