[PATCH v2 0/8] imx8: switch missing boards to binman

Oliver Graute oliver.graute at gmail.com
Fri Nov 18 13:35:59 CET 2022


On 11/11/22, Fabio Estevam wrote:
> Hi Oliver,
> 
> On Fri, Nov 11, 2022 at 9:54 AM Oliver Graute <oliver.graute at gmail.com> wrote:
> 
> > imx8mm_evk_defconfig
> > apalis-imx8_defconfig
> >
> > But where is the difference here?
> 
> With the change below, the imx8qm_mek_defconfig builds without errors
> in the absence of the blobs:
> 
> diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi
> index 3507489a813c..442e64badc39 100644
> --- a/arch/arm/dts/imx8qm-u-boot.dtsi
> +++ b/arch/arm/dts/imx8qm-u-boot.dtsi
> @@ -50,7 +50,7 @@
>                                         arch = "arm64";
>                                         compression = "none";
>                                         description = "U-Boot (64-bit)";
> -                                       load = <CONFIG_SYS_TEXT_BASE>;
> +                                       load = <CONFIG_TEXT_BASE>;
>                                         type = "standalone";
> 
>                                         uboot-blob {
> diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi
> index 01183f8ade63..e8df5bb8bfea 100644
> --- a/arch/arm/dts/imx8qxp-u-boot.dtsi
> +++ b/arch/arm/dts/imx8qxp-u-boot.dtsi
> @@ -50,7 +50,7 @@
>                                         arch = "arm64";
>                                         compression = "none";
>                                         description = "U-Boot (64-bit)";
> -                                       load = <CONFIG_SYS_TEXT_BASE>;
> +                                       load = <CONFIG_TEXT_BASE>;
>                                         type = "standalone";
> 
>                                         uboot-blob {
> diff --git a/configs/imx8qm_mek_defconfig b/configs/imx8qm_mek_defconfig
> index 4fc828681b6c..4c220188fbb6 100644
> --- a/configs/imx8qm_mek_defconfig
> +++ b/configs/imx8qm_mek_defconfig
> @@ -3,21 +3,12 @@ CONFIG_ARCH_IMX8=y
>  CONFIG_TEXT_BASE=0x80020000
>  CONFIG_SYS_MALLOC_LEN=0x2400000
>  CONFIG_SYS_MALLOC_F_LEN=0x8000
> -CONFIG_SPL_GPIO=y
> -CONFIG_SPL_LIBCOMMON_SUPPORT=y
> -CONFIG_SPL_LIBGENERIC_SUPPORT=y
>  CONFIG_NR_DRAM_BANKS=3
>  CONFIG_ENV_SIZE=0x1000
>  CONFIG_ENV_OFFSET=0x400000
>  CONFIG_DM_GPIO=y
>  CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-mek"
> -CONFIG_SPL_TEXT_BASE=0x100000
>  CONFIG_TARGET_IMX8QM_MEK=y
> -CONFIG_SPL_MMC=y
> -CONFIG_SPL_SERIAL=y
> -CONFIG_SPL_DRIVERS_MISC=y
> -CONFIG_SPL=y
> -CONFIG_SPL_LOAD_IMX_CONTAINER=y
>  CONFIG_IMX_CONTAINER_CFG="board/freescale/imx8qm_mek/uboot-container.cfg"
>  CONFIG_SYS_LOAD_ADDR=0x80280000
>  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> @@ -32,22 +23,8 @@ CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run
> loadbootscript; then run bootscript; else if test ${sec_boot} = yes;
> then if run loadcntr; then run mmcboot; else run netboot; fi; else if
> run loadimage; then run mmcboot; else run netboot; fi; fi; fi; else
> booti ${loadaddr} - ${fdt_addr}; fi"
>  CONFIG_LOG=y
>  CONFIG_BOARD_EARLY_INIT_F=y
> -CONFIG_SPL_MAX_SIZE=0x1f000
> -CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
> -CONFIG_SPL_BSS_START_ADDR=0x128000
> -CONFIG_SPL_BSS_MAX_SIZE=0x1000
> -CONFIG_SPL_BOARD_INIT=y
> -CONFIG_SPL_SYS_MALLOC_SIMPLE=y
> -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
> -CONFIG_SPL_STACK=0x13e000
> -CONFIG_SYS_SPL_MALLOC=y
> -CONFIG_HAS_CUSTOM_SPL_MALLOC_START=y
> -CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x120000
> -CONFIG_SYS_SPL_MALLOC_SIZE=0x3000
>  CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
>  CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800
> -CONFIG_SPL_POWER_DOMAIN=y
> -CONFIG_SPL_WATCHDOG=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_CBSIZE=256
>  CONFIG_SYS_PBSIZE=276
> @@ -66,14 +43,11 @@ CONFIG_CMD_MII=y
>  CONFIG_CMD_PING=y
>  CONFIG_CMD_CACHE=y
>  CONFIG_CMD_FAT=y
> -CONFIG_SPL_OF_CONTROL=y
>  CONFIG_ENV_OVERWRITE=y
>  CONFIG_ENV_IS_IN_MMC=y
>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>  CONFIG_SYS_MMC_ENV_DEV=1
>  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> -CONFIG_SPL_DM=y
> -CONFIG_SPL_CLK=y
>  CONFIG_CLK_IMX8=y
>  CONFIG_CPU=y
>  CONFIG_MXC_GPIO=y
> @@ -93,16 +67,12 @@ CONFIG_FEC_MXC_MDIO_BASE=0x5B040000
>  CONFIG_FEC_MXC=y
>  CONFIG_MII=y
>  CONFIG_PINCTRL=y
> -CONFIG_SPL_PINCTRL=y
>  CONFIG_PINCTRL_IMX8=y
>  CONFIG_POWER_DOMAIN=y
>  CONFIG_IMX8_POWER_DOMAIN=y
>  CONFIG_DM_REGULATOR=y
> -CONFIG_SPL_DM_REGULATOR=y
>  CONFIG_DM_REGULATOR_FIXED=y
>  CONFIG_DM_REGULATOR_GPIO=y
> -CONFIG_SPL_DM_REGULATOR_GPIO=y
>  CONFIG_DM_SERIAL=y
>  CONFIG_FSL_LPUART=y
> -CONFIG_SPL_TINY_MEMSET=y
>  # CONFIG_EFI_LOADER is not set
> 
> I removed SPL support, which does not seems to be needed as the scufw
> handles DDR init.

I know that DDR init is done in scfw for imx8qm. Because I patched these
values gotten from a NXP Excel RPA sheet into our scfw a year ago as we
got our Micron LPDDR4. But I wasn't aware that then the SPL stuff is
superflous then. Is this really the case? Is there no other reason for
SPL? Can you confirm?

> 
> I don't have access to an imx8qm/qxp board here.
> 
> Could you try removing SPL support from your board and see if it boots
> with binman support?

Ok, first I removed SPL Config for imx8qm_dmsse20 board posted here [1]
Because this is my current develop setup. The imx8qm_rom7720 and cgt8mx
will follow (perhaps next week). So this Board is booting without SPL.

But I run into somme mmc issues. 

U-Boot 2023.01-rc1-00056-gb805f40911-dirty (Nov 18 2022 - 13:05:16 +0100)

Model: Advantech iMX8QM DMSSE20
Board: DMS-SE20A1 8GB
Build: SCFW 549b1e18, SECO-FW c9de51c0, ATF 5782363
Boot:  USB
DRAM:  8 GiB
Core:  100 devices, 19 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial at 5a060000
Out:   serial at 5a060000
Err:   serial at 5a060000
Net:
Warning: ethernet at 5b040000 (eth0) using random MAC address - 5a:25:75:2d:65:75
eth0: ethernet at 5b040000
Warning: ethernet at 5b050000 (eth1) using random MAC address - ca:41:6e:6d:75:10
, eth1: ethernet at 5b050000
Hit any key to stop autoboot:  0
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
** Bad device specification mmc 2 **
Couldn't find partition mmc 2:1
Can't set block device
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
** Bad device specification mmc 2 **
Couldn't find partition mmc 2:1
Can't set block device
Wrong Image Format for bootm command
ERROR: can't get kernel image!
switch to partitions #0, OK
mmc0(part 0) is current device

[1] https://patchwork.ozlabs.org/project/uboot/patch/20221007131158.14094-1-oliver.graute@kococonnector.com/

Best regards,

Oliver


More information about the U-Boot mailing list