Hi All,
I am trying to build a SCU FW for SPI flash in iMX8QX MEK board. But for SPI flash a flash_uboot.bin file is required as per the documentation. How to build the flash_uboot.bin? Is yocto image build the only way to build the uboot. Is there any steps for building the u-boot binary file.
Thanks and Regards,
Ramprakash
Hi,
When you build flash.bin, you used "make SOC=imx8qx flash" command.
For flash_uboot.bin, you can use "make SOC=imx8qx flash_flexspi" , you can get related messages from imx-mkimage/iMX8QX/soc.mak.
flash_flexspi: $(MKIMG) $(AHAB_IMG) scfw_tcm.bin u-boot-atf.bin $(QSPI_HEADER)
./$(MKIMG) -soc QX -rev B0 -dev flexspi -append $(AHAB_IMG) -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
./$(QSPI_PACKER) $(QSPI_HEADER)
u-boot-atf.bin: u-boot-hash.bin bl31.bin
@cp bl31.bin u-boot-atf.bin
@DD if=u-boot-hash.bin of=u-boot-atf.bin bs=1K seek=128
u-boot-hash.bin: u-boot.bin
./$(MKIMG) -commit > head.hash
@cat u-boot.bin head.hash > u-boot-hash.bin
So relations are like this : u-boot.bin + head hash-->u-boot-hash.bin + bl31.bin-->u-boot-atf.bin + scfw_tcm.bin-->flash_flexspi--->flash_uboot.bin
Hope these decriptions are helpful to you.
Have a nice day!
B.R,
Weidong
Hi @weidong_sun ,
Thanks for the reply.
I understand the process for creation of flash_uboot.bin. But in order to create the flash_flexspi.bin we need files like u-boot.bin, u-boot-hash.bin and bl32.bin. Where do i find these files. Or how to generate them. I do not know about u-boot. If we need to build these files can you let me know of the process to do it.
Thanks and Regards,
Ramprakash
Hi,Ramprakash
Actually, you can build flash.bin for i.mx8qx manually. My colleague wrote a document on how to do it for L4.14.98 bsp.
See the link, please!
you can modify version number according to the bsp you are using.
there is a one difference on geting SECO firmware, if you are using 5.4.70_2.3.0, SECO FW can be got like below:
# wget http://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-3.7.4.bin
# chmod a+x imx-seco-3.7.4.bin
Then you will get files below:
mx8dxla0-ahab-container.img
mx8dxla1-ahab-container.img
mx8qmb0-ahab-container.img
mx8qxb0-ahab-container.img
mx8qxc0-ahab-container.img
SECO_FW_release_note.pdf
You can select one you want to use.
[Note]
Try it ,please!
Have a nice day!
B.R,
Weidong
Hi @weidong_sun ,
Thanks for the reply.
I already used the document which you have provided to build flash.bin. But I need to boot the SPI flash with the SCU FW for which I need both flash.bin and flash_uboot.bin. For flash_uboot I could hot find any other documents apart from the one for Yocto. I did try using yocto build for the generating flash_uboot. But I did not find any UBOOT config parameter under local.conf file as mentioned in the Yocto documentation. Can you please help me with generating the flash_uboot.bin file. I there is any previously built file please do share.
Thanks and Regards,
Ramprakash