my evalboard is 8MNANOD4-EVK
I want to boot via the QSPI interface.
How do i have to configure the U-boot for this?
(https://gitlab.denx.de/u-boot/u-boot)
Background:
i would like to make my own board based on this evalboard, but with only the QSPI interface for booting.
Hi Klaus
one can check uboot sources, in particular : #ifdef CONFIG_FSL_FSPI
imx8mn_evk.c\imx8mn_evk\freescale\board - uboot-imx - i.MX U-Boot
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor
until now i have always cloned the repository of https://gitlab.denx.de/u-boot/u-boot I thought this is the original one.
If i now clone the branch imx_4.14.98_8qxpc0_er, am i always up to date?
In the future i want to work with the evalbord imx8m nano with LPDDR. This should be released Q1. The design files are already on the homepage.
Best regards
Klaus
Hi Klaus
main line uboot is not supported by nxp, issue may be posted on
Supported uboot from source.codeaurora.org/external/imx repository : uboot-imx - i.MX U-Boot
as described in official nxp linux documentation Linux 4.19.35_1.1.0 Documentation
i.MX Software and Development Tools | NXP
Best regards
igor
Hi igor,
is it correct that for booting over qspi I only need to write the following lines in the file imx8mn_ddr4_evk_defconfig must change?
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,SPL_TEXT_BASE=0x912000"
to
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_qspi.cfg,SPL_TEXT_BASE=0x912000"
do I need a different SPL_TEXT_BASE address?
add
CONFIG_SPL_NOR_SUPPORT=y
in the original file are CONFIG_ENV_IS_IN_MMC=y and CONFIG_ENV_IS_IN_SPI_FLASH=y
shouldn't there be only one specification? The ENV cannot be in both positions!
in the i.MX_Porting_Guide.pdf:
f. For i.MX 8, use the imx-mkimage tool to combine the U-Boot binary with Arm
Trusted Firmware (ATF) and SCFW to produce the final flash.bin boot image
and burn to the SD card. See the imx-mkimage tool for details.
Where can I get the right imx-mkimage tool, ATF and SCFW FW?
Is there no tutorial to create the final flash.bin boot image?
Best regards
Klaus
For the 8M-Mini platform please also read here: https://community.nxp.com/docs/DOC-343777
Regards,
Bernhard.
Hi Bernhard,
i don't use yocto! i do not need linux, i work with vxWorks!
I would like to make the uboot standalone with a crosscompiler.
Regards,
Klaus
Hi Klaus
nxp does not support vxWorks, issue may be posted
on Wind River Customer Support
Supported building using yocto, details can be found in
Yocto Guide included in Linux 4.19.35_1.1.0 Documentation
Best regards
igor
Hi igor,
i only want to make the u-boot with a crosscompiler!
Command:
make imx8mn_ddr4_evk_defconfig
make flash.bin
and now i become a error! (see last message)
nxp support this one, right?
Best regards
Klaus
now i have found the error!
There is a bug in /tools/imx8mimage.c
The variable using_fit is only set when the comand SIGNED_HDMI is in the spl/u-boot-spl.cfgout File.
But the imx8mn don't use this comand!
change the parse_cfg_fld() to:
static void parse_cfg_fld(int32_t *cmd, char *token,
char *name, int lineno, int fld)
{
switch (fld) {
case CFG_COMMAND:
*cmd = get_table_entry_id(imx8mimage_cmds,
"imx8mimage commands", token);
if (*cmd < 0) {
fprintf(stderr, "Error: %s[%d] - Invalid command" "(%s)\n",
name, lineno, token);
exit(EXIT_FAILURE);
}
switch (*cmd) {
case CMD_FIT:
using_fit = 1;
break;
}
break;
case CFG_REG_SIZE:
parse_cfg_cmd(*cmd, token, name, lineno);
break;
...
...
and remove in parse_cfg_cmd()
case CMD_SIGNED_HDMI:
signed_hdmi = token;
/* case CMD_FIT:
using_fit = 1;*/
break;
case CMD_DDR_FW:
/* Do nothing */
break;
}
Best regards
Klaus
Hi Klaus
I sent additional build document via mail.
Best regards
igor
Hi igor,
the Document is ok.
but it's from an obsolete stand.
there you had to create the file to flash in two separate steps.
1. generate uboot
2. mkimage
in the new branch can you generate the file to flash in one step.
1. generate file with
make flash.bin
-> the makefile generate uboot and mkimage internal.
for the imx8qm Board it works fine!
It use the SIGNED_HDMI File
but the imx8m nano don't use it! so the internal mkimage generate a error!
Regards
Klaus
ps: see last messages!
Hi Klaus
please check document chapter for i.MX8MQ (Nano is similar to MQ) not i.MX8QM.
Best regards
igor
Hi igor
now I have done everything as described in the document, and try to build a flash.bin
1. Build u-boot
unset LDFLAGS
make -j8 imx8mn_ddr4_evk_defconfig
make -j8
output:
...
COPY spl/u-boot-spl.bin
make[1]: Nothing to be done for 'SPL'.
===================== WARNING ======================
This board does not use CONFIG_DM_VIDEO Please update
the board to use CONFIG_DM_VIDEO before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================
CFGCHK u-boot.cfg
i ignor this Warning.
2. Coppy following Files to imx-mkimage/iMX8M/:
bl31.bin
ddr4_dmem_1d.bin
ddr4_dmem_2d.bin
ddr4_imem_1d.bin
ddr4_imem_2d.bin
u-boot.bin
spl/u-boot-spl.bin
u-boot-nodtb.bin
arch/arm/dts/fsl-imx8mn-ddr4-evk.dtb
according to the document you should copy lpddr4_pmu_train_1d_dmem.bin ...
This board have no LPDDR4! it has DDR4, so i copy ddr4_dmem_1d.bin ...
3 generate flash.bin
make clean
make SOC=iMX8MN flash_spl_uboot ( in dokument make SOC=iMX8M flash_spl_uboot)
output:
...
PLAT=imx8mn HDMI=no
Compiling mkimage_imx8
gcc -O2 -pipe -g -feliminate-unused-debug-types mkimage_imx8.c -o mkimage_imx8 -lz
make[1]: *** No rule to make target 'lpddr4_pmu_train_1d_imem.bin', needed by 'u-boot-spl-ddr.bin'. Stop.
make: *** [Makefile:20: flash_spl_uboot] Error 2
why is lpddr4 required here?
ok, i copy the lpdd4-Files to imx-mkimage/iMX8M/ an generate once again.
output:
PLAT=imx8mn HDMI=no
Compiling mkimage_imx8
gcc -O2 -pipe -g -feliminate-unused-debug-types mkimage_imx8.c -o mkimage_imx8 -lz
make[1]: *** No rule to make target 'fsl-imx8mn-evk.dtb', needed by 'u-boot.itb'. Stop.
make: *** [Makefile:20: flash_spl_uboot] Error 2
i have use following imx-mkimage:
git clone https://source.codeaurora.org/external/imx/imx-mkimage -b imx_4.14.98_2.3.0
Well, it doesn't seem quite that simple!
What am I doing wrong?
Best regards
Klaus
ps:
when i make step1 with branch imx_4.14.98_8qxpc0_er become i no warning!
but the error on step3 is the same!
what branch of u-boot and imx-mkimage is the rigth?
Hi Klaus
for i.MX8M (same for Mini,Nano) one can look at
https://developer.solid-run.com/knowledge-base/i-mx8m-atf-u-boot-and-linux-kernel/
https://boundarydevices.com/yocto-release-for-i-mx-8mm/
QSPI boot can be tested on i.MX8M Mini EVK using Demo Images on
i.MX Software and Development Tools | NXP
SCFW is not used for i.MX8M, it is used for i.MX8QM, QXP.
Best regards
igor
Hi Igor,
now i checkout the branch imx_v2019.04_4.19.35_1.1.0
I hope this is right.
i still get the following error:
...
arch/arm/dts/fsl-imx8mn-ddr4-evk.dtb > u-boot.its
bl31.bin size:
37209
u-boot-nodtb.bin size:
706552
arch/arm/dts/fsl-imx8mn-ddr4-evk.dtb size:
25791
MKIMAGE u-boot.itb
u-boot.its:7.11-14.5: Warning (unit_address_vs_reg): /images/uboot@1: node has a unit name, but no reg property
u-boot.its:15.9-23.5: Warning (unit_address_vs_reg): /images/atf@1: node has a unit name, but no reg property
u-boot.its:24.9-29.5: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg property
u-boot.its:34.12-39.5: Warning (unit_address_vs_reg): /configurations/config@1: node has a unit name, but no reg property
./tools/imx8m_image.sh spl/u-boot-spl.cfgout 1
MKIMAGE flash.bin
make[1]: *** [arch/arm/mach-imx/Makefile:210: flash.bin] Error 1
make[1]: *** Deleting file 'flash.bin'
make: *** [Makefile:1273: flash.bin] Error 2
Best regards
Klaus