imx6: added fixfdt to bootscript
authorTim Harvey <tharvey@gateworks.com>
Fri, 10 Mar 2017 00:05:52 +0000 (16:05 -0800)
committerFelix Fietkau <nbd@nbd.name>
Sun, 12 Mar 2017 14:06:51 +0000 (15:06 +0100)
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

index dcf26bb9599bdc828e2a829aed4823d855ee4df5..941afb519aeae4b2b55611f37a41e5419450a146 100644 (file)
@@ -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"