diff mbox series

[1/1] board/freescale/common/imx: use nodtb variant in uboot images for 8M

Message ID 20191202200333.418111-1-juju@cotds.org
State Superseded
Headers show
Series [1/1] board/freescale/common/imx: use nodtb variant in uboot images for 8M | expand

Commit Message

Julien Olivain Dec. 2, 2019, 8:03 p.m. UTC
When using u-boot.bin, u-boot is using its builtin dtb which may not
be suitable for all cases. For TechNexion Pico Pi i.MX8M and
i.MX8MMini, this break the USB and UMS commands. Since those boards
does not have SD card slots, a recovery serial download is needed at
every update.

Using u-boot-nodtb.bin now fixes this issue.

Signed-off-by: Julien Olivain <juju@cotds.org>
---
 board/freescale/common/imx/imx8-bootloader-prepare.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni Dec. 16, 2019, 9:57 p.m. UTC | #1
Hello Julien,

+Fabio in Cc.

On Mon,  2 Dec 2019 21:03:33 +0100
Julien Olivain <juju@cotds.org> wrote:

> When using u-boot.bin, u-boot is using its builtin dtb which may not
> be suitable for all cases. For TechNexion Pico Pi i.MX8M and
> i.MX8MMini, this break the USB and UMS commands. Since those boards
> does not have SD card slots, a recovery serial download is needed at
> every update.

Could you give more details? If it doesn't use a built-in DTB, which
DTB gets used?

How does using the built-in DTB breaks USB and UMS ?

Thanks,

Thomas
Julien Olivain Dec. 17, 2019, 8:26 p.m. UTC | #2
Hi Thomas,

I will send an updated version of the patch with more details in
the commit log.

On 2019-12-16 22:57, Thomas Petazzoni wrote:
> Hello Julien,
> 
> +Fabio in Cc.
> 
> On Mon,  2 Dec 2019 21:03:33 +0100
> Julien Olivain <juju@cotds.org> wrote:
> 
>> When using u-boot.bin, u-boot is using its builtin dtb which may not
>> be suitable for all cases. For TechNexion Pico Pi i.MX8M and
>> i.MX8MMini, this break the USB and UMS commands. Since those boards
>> does not have SD card slots, a recovery serial download is needed at
>> every update.
> 
> Could you give more details? If it doesn't use a built-in DTB, which
> DTB gets used?

Basically, without this patch, the U-Boot DTB is included twice (once in
builtin u-boot.bin image, and a second time in the boot FIT image).

> How does using the built-in DTB breaks USB and UMS ?

Since the second correct DTB is ignored, the default embedded one
is used, which is for another board (fsl-imx8mm-evk), which produce
some initialization errors on non-EVK boards.

> Thanks,
> 
> Thomas

Best regards,

Julien.
diff mbox series

Patch

diff --git a/board/freescale/common/imx/imx8-bootloader-prepare.sh b/board/freescale/common/imx/imx8-bootloader-prepare.sh
index df528b0df5..cbf741af30 100755
--- a/board/freescale/common/imx/imx8-bootloader-prepare.sh
+++ b/board/freescale/common/imx/imx8-bootloader-prepare.sh
@@ -10,14 +10,14 @@  main ()
 
 	if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
 		cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
-		BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ATF_LOAD_ADDR=0x00910000 ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
+		BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot-nodtb.bin ATF_LOAD_ADDR=0x00910000 ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
 		${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb
 		rm -f ${BINARIES_DIR}/u-boot.its
 
 		${HOST_DIR}/bin/mkimage_imx8 -fit -signed_hdmi ${BINARIES_DIR}/signed_hdmi_imx8m.bin -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x7E1000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
 	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y$" ${BR2_CONFIG}; then
 		cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
-		BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ATF_LOAD_ADDR=0x00920000 ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
+		BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot-nodtb.bin ATF_LOAD_ADDR=0x00920000 ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
 		${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb
 		rm -f ${BINARIES_DIR}/u-boot.its