diff mbox

[LEDE-DEV] imx6: added fixfdt to bootscript

Message ID 1489104352-27295-1-git-send-email-tharvey@gateworks.com
State Accepted
Headers show

Commit Message

Tim Harvey March 10, 2017, 12:05 a.m. UTC
If a 'fixfdt' uboot script exists, execute it prior to bootm to allow
easy bootloader env based fdt fixups and tweaks

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 target/linux/imx6/image/bootscript-ventana | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/target/linux/imx6/image/bootscript-ventana b/target/linux/imx6/image/bootscript-ventana
index dcf26bb..941afb5 100644
--- a/target/linux/imx6/image/bootscript-ventana
+++ b/target/linux/imx6/image/bootscript-ventana
@@ -61,12 +61,15 @@  setenv bootargs "${bootargs}" "${root}" "${video}" "${extra}"
 if ${fsload} ${loadaddr} ${bootdir}/uImage; then
 	if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then
 		echo Loaded DTB from ${bootdir}/${fdt_file}
+		test -n "$fixfdt" && run fixfdt
 		bootm ${loadaddr} - ${fdt_addr}
 	elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then
 		echo Loaded DTB from ${bootdir}/${fdt_file1}
+		test -n "$fixfdt" && run fixfdt
 		bootm ${loadaddr} - ${fdt_addr}
 	elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then
 		echo Loaded DTB from ${bootdir}/${fdt_file2}
+		test -n "$fixfdt" && run fixfdt
 		bootm ${loadaddr} - ${fdt_addr}
 	else
 		echo "Error loading device-tree"