Skip to content
Snippets Groups Projects
Commit eba6f9e1 authored by Martin Oemus's avatar Martin Oemus Committed by Tobias Kahlki
Browse files

u-boot:scripts: improve handling of dt overlays

- don't attempt to load devicetree overlays when
  loading the device tree failed
- added missing call to fdt addr, which is required
  for all following fdt commands to work
parent 25e6382c
No related branches found
No related tags found
1 merge request!386install board info environment information into the device tree
......@@ -14,23 +14,23 @@ if fatload mmc ${current_partition} ${loadaddr} boot.cfg && env import -t ${loa
if test -n ${devicetree};then
echo "Loading devicetree ${devicetree} ..."
if fatload mmc ${current_partition} ${fdt_addr} ${devicetree}; then
true
fdt addr ${fdt_addr}
if test -n ${overlays}; then
for ov in ${overlays}; do
echo "Overlaying ${ov} ..."
if fatload mmc ${current_partition} ${loadaddr} ${ov}; then
fdt resize ${filesize} && fdt apply ${loadaddr}
else
echo "Failed to load overlay ${ov}"
fi
done
fi
else
echo "Failed to load devicetree ${devicetree}"
fi
fi
if test -n ${overlays}; then
for ov in ${overlays}; do
echo "Overlaying ${ov} ..."
if fatload mmc ${current_partition} ${loadaddr} ${ov}; then
fdt resize ${filesize} && fdt apply ${loadaddr}
else
echo "Failed to load overlay ${ov}"
fi
done
fi
initrd=-
if test -n ${initramfs}; then
echo "Loading initramfs ${initramfs} ..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment