If EXTERNAL_KERNEL_DEVICETREE and dtb_image_sect are empty variables
dtb_path ends up as "/" which is available on most Unix systems but
probably not the dtb_path which is needed here. Checking for a file
makes more sense and also solves the issue with the "/".
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fi
dtb_path="${EXTERNAL_KERNEL_DEVICETREE}/${dtb_image_sect}"
- if [ -e "$dtb_path" ]; then
+ if [ -f "$dtb_path" ] || [ -L "$dtb_path" ]; then
compat=$(fdtget -t s "$dtb_path" / compatible | sed 's/ /", "/g')
if [ -n "$compat" ]; then
compatible_line="compatible = \"$compat\";"