i.MX8MQ EVK not booting with latest mainline U-Boot

Fabio Estevam festevam at gmail.com
Mon Feb 22 13:19:50 CET 2021


Hi Andrey,

On Mon, Feb 22, 2021 at 5:52 AM ZHIZHIKIN Andrey
<andrey.zhizhikin at leica-geosystems.com> wrote:

> Can somebody maybe share more info on which errors are observed during the boot? Any boot log would be helpful here as well.

I investigated this boot issue. U-Boot 2020.04 works, but 2020.07 does not.

I run a git bisect and found that the guilty commit was:

commit c738adb8dbbf28a34f8574239a241e85d46f3877
Author: Kever Yang <kever.yang at rock-chips.com>
Date:   Mon Mar 30 11:56:17 2020 +0800

    tool: Move ALIGN_MASK to header as common MACRO

    The ALIGN code is need by many files who need handle structure or image
    align, so move the macro to imagetool.h file.

    Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
    Reviewed-by: Punit Agrawal <punit1.agrawal at toshiba.co.jp>
    Reviewed-by: Tom Rini <trini at konsulko.com>

The __ALIGN_MASK definition used  in imx8image was not standard, so I
restored it like this:

--- a/tools/imx8mimage.c
+++ b/tools/imx8mimage.c
@@ -32,6 +32,8 @@ static uint32_t rom_version = ROM_V1;

 #define HDMI_FW_SIZE           0x17000 /* Use Last 0x1000 for IVT and CSF */
 #define ALIGN_SIZE             0x1000
+#define ALIGN(x,a)                     __ALIGN_MASK((x),
(__typeof__(x))(a) - 1, a)
+#define __ALIGN_MASK(x,mask,mask2)     (((x) + (mask)) / (mask2) * (mask2))

 static uint32_t get_cfg_value(char *token, char *name,  int linenr)
 {

and now the board boots again:

U-Boot SPL 2021.04-rc2-00090-gbbc0fcc302ba-dirty (Feb 22 2021 - 09:08:30 -0300)
PMIC:  PFUZE100 ID=0x10
Normal Boot
Trying to boot from MMC2


U-Boot 2021.04-rc2-00090-gbbc0fcc302ba-dirty (Feb 22 2021 - 09:08:30 -0300)

CPU:   Freescale i.MX8MQ rev2.0 at 1000 MHz
Reset cause: POR
Model: NXP i.MX8MQ EVK
DRAM:  3 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - No block device, using
default environment

In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet at 30be0000
Hit any key to stop autoboot:  0
u-boot=>
u-boot=>
u-boot=>
u-boot=> saveenv
Saving Environment to MMC... No block device
Failed (1)
u-boot=>

I will submit the patch soon.

The issue now is that saving the environment to the SD card is no
longer working.

I will investigate the SD card issue now.

Thanks,

Fabio Estevam


More information about the U-Boot mailing list