Hi,
In yocto Linux, the machine config file <yocto-project-root>/sources/meta-fsl-bsp-release/imx/meta-bsp/conf/machine/imx8mmevk.conf contains this lines:
UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG[sd] = "imx8mm_evk_config,sdcard"
UBOOT_CONFIG[fspi] = "imx8mm_evk_fspi_defconfig"
SPL_BINARY = "spl/u-boot-spl.bin"
...
# Set imx-mkimage boot target
IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_evk_flexspi', 'flash_evk', d)}"
...
IMAGE_BOOTLOADER = "imx-boot"
What do I have to change here for booting the u-boot from QSPI?
My silly attempt to change one line to UBOOT_CONFIG ??= "qspi1" leads to compile errors.
| Rev A | Rev C |
Image | imx-boot-imx8mmevk-fspi-bf.bin | imx-boot-imx8mmevk-fspi-bf.bin |
Boot Jumper Settings Programming | 10xxxxxx xxxxxxxx | 1010xxxxxx xxxxxxxxx0 |
Boot Jumper Settings QSPI boot | 01xxxxx0 0000x001 | 0110xxxxxx 00100x0010 |
Result | OK | OK |
This is the necessary jumper configuration for 8M-Mini EVK boards.
Then I called these commands which copies the bin file from sd card to qspi flash.
u-boot=> sf probe
u-boot=> fatload mmc 0:1 0x40480000 imx-boot-imx8mmevk-fspi-bf.bin
u-boot=> sf erase 0x0 0x200000
u-boot=> sf write 0x40480000 0x0 0x200000
u-boot=> sf read 0x50000000 0x0 0x200000
u-boot=> cmp.b 0x40480000 0x50000000 0x200000
Next I switched off the board, removed the SD card and booted from QSPI, and that works well.
I'm also trying to boot U-boot from QSPI using imx8mmevk . Aside from the steps already tried here, I tried building u-boot by following the instructions at i.MX Yocto Project User's Guide (Rev. L4.14.78-1.0.0_ga ) section 5.5 U-Boot configuration. I added a UBOOT_CONFIG = "fspi" to conf/local.conf then build u-boot using command : bitbake -c deploy u-boot-imx. I then changed the dip switches configuration to download mode then used UUU to download u-boot using command:
sudo ./uuu -b qspi imx-boot-imx8mmevk-fspi.bin-flash_evk_flexspi
It was succesful.
I then changed the dip switches to FSPI mode then powered the device and still nothing shows up in my serial console.
Does anyone figured out a solution to this question already?
Unfortunately the boot config settings for the EVK Rev C board are not correctly documented in the EVK Board Hardware User's Guide Rev 0 from 02/2019.
Please use these settings for QSPI boot selection on Rev C boards:
SW1101: 0110xxxxxx
SW1102: 00100x0010
The QSPI boot files files in the BSP demo packages (imx-boot-imx8mmevk-fspi.bin-flash_evk_flexspi) work fine for all board version Rev A/B/C, provided that the boot config switches are set correctly.
Regards,
Bernhard.
Hi,
I have the same problem on the 6SX SABER-SDB board
=> sf probe
SF: Detected n25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
1. I write the qspi-header (qspi-tmp) obtained from MfgTool to sf 0x400
Then I write u-boot-imx6sxsabresd_qspi2.imx, obtained from MfgTool to sf 0x1000
I put the SW10,11,12 jumpers in the position 00000000 00000000 0011100 - QSPI boot
I see on the u-boot debug console. Successful!
2. I write u-boot-imx6sxsabresd_qspi2.imx, obtained from L4.14.78_1.0.0_ga_images_MX6QPDLSOLOX.zip at sf 0x0
The header already exists in this image.
Starts the debug console. Successful!
3. I build u-boot from sources.
I write qspi-header obtained from MfgTool at sf 0x400
Then I write the builds u-boot.imx to sf 0x1000
Console is empty.
The forum has a lot of questions on this topic.
No answer on the merits.
I studied the IMX6SXRM.pdf documentation. MfgTool does not suit me. There is no jffs2 support in the MfgTool image, for example.
Hi F
i.MX8M Mini has not qspi module and from sect.6.1 System Boot
i.MX8MMini Reference Manual :
"boot ROM supports these boot devices:
• Serial NOR Flash via FlexSPI
• NAND flash
• SD/MMC
• Serial (SPI) NOR"
https://www.nxp.com/docs/en/reference-manual/IMX8MMRM.pdf
Flexspi (fspi) support quad spi as described in Table 6-11. FlexSPI Configuration block.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
It's very hard to understand what I should do now to let my board boot from Quad SPI.
Now what I try is
What is wrong? Could you write me down the correct steps I should go? Thanks in advance.
qspi image should be programmed using uuu tool
How to use UUU on Windows · NXPmicro/mfgtools Wiki · GitHub
There is MT25QU256ABA1EW7-0SIT on i.MX8M Mini EVK board,
uuu.fspi sample script can be found in Demo Images on link
Also recommended to check Linux guide in Linux L4.14.78_1.0.0 Documentation
Best regards
igor
i.MX Software | NXP does not contain "Demo Images" or "uuu.fspi sample script" which you suggest. How can I find "uuu.fspi"?
Linux Binary Demo Files - i.MX 8MMini EVK
does contain uuu.fspi in samples folder, it is attached below.
Hi Igor,
My name is Thomas and I'm a colleague of FB.
We tried to run the uuu-Tool as documented.
1. We downloaded the Linux Binary Demo Files
2. We downloaded the latest version of the uuu-Tool (from here)
3. We run uuu -b qspi imx-boot-imx8mmevk-fspi.bin-flash_evk_flexspi
The uuu-Tool stated Done and the serial console of the i.MX8 stated the following:
U-Boot SPL 2017.03-imx_v2017.03_4.9.123_imx8mm_ga+g8be98e9 (Sep 06 2018 - 10:57:31) power_bd71837_init pmic debug: name=BD71837 DDRINFO: start lpddr4 ddr init DRAM PHY training for 3000MTS check ddr4_pmu_train_imem code check ddr4_pmu_train_imem code pass check ddr4_pmu_train_dmem code check ddr4_pmu_train_dmem code pass Training PASS DRAM PHY training for 3000MTS check ddr4_pmu_train_imem code check ddr4_pmu_train_imem code pass check ddr4_pmu_train_dmem code check ddr4_pmu_train_dmem code pass Training PASS DRAM PHY training for 400MTS check ddr4_pmu_train_imem code check ddr4_pmu_train_imem code pass check ddr4_pmu_train_dmem code check ddr4_pmu_train_dmem code pass Training PASS DRAM PHY training for 100MTS check ddr4_pmu_train_imem code check ddr4_pmu_train_imem code pass check ddr4_pmu_train_dmem code check ddr4_pmu_train_dmem code pass Training PASS DDRINFO:ddrphy calibration done DDRINFO: ddrmix config done Normal Boot Trying to boot from USB SDP SDP: initialize... SDP: handle requests... Downloading file of size 916340 to 0x40400000... done Jumping to header at 0x40400000 Header Tag is not an IMX image U-Boot 2017.03-imx_v2017.03_4.9.123_imx8mm_ga+g8be98e9 (Sep 06 2018 - 10:57:31 +0000) CPU: Freescale i.MX8MM rev1.0 1500 MHz (running at 1200 MHz) CPU: Commercial temperature grade (0C to 95C) at 44C Reset cause: POR Model: FSL i.MX8MM EVK board DRAM: 2 GiB TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x52] Power supply on USB2 TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50] MMC: FSL_SDHC: 0, FSL_SDHC: 1 SF: Detected n25q256a with page size 256 Bytes, erase size 4 KiB, total 32 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial BuildInfo: - ATF af3554f - U-Boot 2017.03-imx_v2017.03_4.9.123_imx8mm_ga+g8be98e9 Detect USB boot. Will enter fastboot mode! unsupported boot devices Net: Warning: ethernet@30be0000 using MAC address from ROM eth0: ethernet@30be0000 Fastboot: Normal Boot from USB for mfgtools Use default environment for mfgtools Run bootcmd_mfg: run mfgtool_args; if iminfo ${initrd_addr}; then booti ${loadaddr} ${initrd_addr} ${fdt_addr};else echo "Run fastboot ..."; fastboot 0; fi Hit any key to stop autoboot: 0 ## Checking Image at 43800000 ... Unknown image format! Run fastboot ... Detect USB boot. Will enter fastboot mode! unsupported boot devices Starting download of 1309556 bytes ......... downloading of 1309556 bytes finished SF: Detected n25q256a with page size 256 Bytes, erase size 4 KiB, total 32 MiB Detect USB boot. Will enter fastboot mode! unsupported boot devices SF: 1310720 bytes @ 0x0 Erased: OK Detect USB boot. Will enter fastboot mode! unsupported boot devices device 0 offset 0x0, size 0x13fb74 SF: 1309556 bytes @ 0x0 Written: OK Detect USB boot. Will enter fastboot mode! unsupported boot devices
Well, it seems everything run well. Unfortunately the board still does not boot without an SD-Card.
Any hints?
Thanks,
Thomas
Hi Thomas
are you using i.MX8M Mini EVK with Micron MT25QU256ABA1EW7 or
this is custom board with different qspi.
For uuu issues suggest to create new thread.
How to use UUU to flash the iMX boards - i.MXDev Blog
Best regards
igor
Hi Igor,
yes we are using the "i.MX8M Mini EVK with Micron MT25QU256ABA1EW7". As stated this is not a uuu issue. The question is, why our EVK-Board is not booting from FlexSPI/QSPI.
When powering on the Board we expected to "see" something on the serial console (SPL coming up or something). But nothing happens.
Any further ideas?
Greetings,
Thomas
Hi Thomas
could you try Demo Linux L4.9.123 for i.MX 8MMini GA
https://www.nxp.com/webapp/Download?colCode=L4.9.123_2.3.0_8MM_GA&appType=license&location=null
uuu usage
Home · NXPmicro/mfgtools Wiki · GitHub
is it not working from qspi only and work fine for emmc.
If it is not working with emmc too, probably board is broken and there is return service
Returns and Warranty Information | NXP
Best regards
igor
Hi Igor,
Yes, we already tried that (Demo Linux L4.9.123 - see my previous posts). Booting from eMMC is working. Booting from QSPI is not. I guess we are just missing some very trivial thing here.
Greetings,
Thomas.
Thanks Igor for your patience. What is that _flexspi.bin which the script uuu.fspic processes? Where should I take that file from?
I also understand that _flexspi.bin must start with a header containing configuration parameters, which makes it bootable. I wonder how such file is generated, consisting half of that header and half of u-boot (if I understand it correctly). Is it bitbake of yocto Linux which builds such _flexspi.bin, and if yes, how and where are its config files?
https://community.nxp.com/thread/461842 This link is talking about a qspi-header.bin. Since we have the same flash hardware I tried to put it to flash address 0x400 (as suggested there) and the yocto-generated u-boot to 0x1000. But it does not work, the console remains silent after rebooting.
I wonder what is necessary to flash for booting? What should be at flash address 0x0?
I've seen in the uuu.fspi script it just flashes to flash address 0x0 what it gets uploaded, so the key questions are: How can I get a bootable image file? Is it already generated by all the yocto layers? How should it look like, how is it structured, what must it consists of?
At present I only have the u-boot file which yocto generated for me, and that qspi-header.bin file I have found in the forum here. I'm absolutely stucked now and need some support. I've read all the PDFs but the overall concept is not clear to me, although I have the feeling it may actually quite easy. I just want to boot u-boot from such n25q256a.
i.MX_Linux_User's_Guide.pdf tells in chapter 4.5.13 "How to build imx-boot image by using imx-mkimage" about a collection of firmware files (also containing u-boot) packaged to one imx-boot image.
I checked my yocto Linux directory imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mmini-<mydevice> and found there a file called imx-boot-imx8mmini-<mydevice>-fspi.bin-flash_evk_flexspi of filesize about 1,1MB. (Note: I switched UBOOT_CONFIG ?? = "sd" to UBOOT_CONFIG ??= "fspi")
Is it that image which needs to be written to flash address 0x0 (e.g. by the uuu tool)?