I have SABRE-AI with i.MX6QuadPlus. I'm using the latest Freescale Yocto project.
I can build and boot U-boot and Linux from the SD card slot.
Now I need to relocate U-boot into the 32Mb 16-bit parallel NOR flash (AKA EIMNOR or WEIMNOR in various h-files).
I'm trying to do that using U-boot flash writing commands, but I'm unable to find a way to do that.
Freescale "i.MX Linux User's Guide, Flashing U-Boot on Parallel NOR from U-Boot" says:
"Flashing directly to Parallel NOR with TFTPBoot is limited to i.MX 6 SABRE-AI boards. To flash U-Boot on Parallel NOR, perform the following steps:
1. Boot from an SD card.
2. TFTP the U-Boot image.
tftpboot ${loadaddr} u-boot.imx
3. Flash the U-Boot image.
cp.b ${loadaddr} 0x1000 ${filesize}
4. Change boot switches and reboot."
Immediately I'm confused - why is the address 0x1000?
"Parallel NOR flash memory map" says "The address for parallel NOR is 0x8000000 for i.MX 6 SABRE-AI." Is there an error? I'm afraid to even try - what if I damage the board?
So I try the flinfo command in my SD U-boot - it silently returns. Is it not implemented? Not found the NOR? I have no idea.
Then I build an EIMNOR U-boot as described in "Freescale Yocto Project User's Guide" and write to the SD card in place of the original SD U-boot. This doesn't work - none of U-boot start messages are printed to the serial terminal. Trying to do the same for SPINOR U-boot actually works - it boots and complains that it doesn't like the "environment" in SPI NOR, which I'd expect. flinfo command still prints nothing.
So, did anybody have success in "Flashing U-Boot on Parallel NOR from U-Boot"?
I was able to do it with MfgTool. However, NXP documentation states it can be done with U-boot, but the instructions didn't work. If one must use MfgTool, why doesn't it just say so and save people hours of wasted time?
OK, thanks, I see this says 8000000, but, as my experiments show, the cp command in sd U-boot doesn't write data to EIMNOR when writing to that address. It writes them *somewhere*, because they can be seen at 8000000 afterwards, but they disappear after power cycle. So U-boot must be treating 8000000 as some virtual address and maps it to RAM instead of EIMNOR.
please try to program board with MFG Tools,
use mfgtool2-yocto-mx-sabreauto-weim-nor.vbs script
SABRE|Automotive-Infotainment|i.MX6|NXP
Programmers (Flash, etc.)
Best regards
igor
Thanks for the document. It gives a different EIMNOR address.
All my U-boots were generated from the Yocto project Freescale released for SABRE-AI. I didn't use anything outside it.
Could you confirm that SD U-boot has EIMNOR writing capability or not?
BTW, why do you recommend MfgTools over U-boot? It seems pretty easy to do with U-boot - load the file, then write to the flash. Is there any problem with it I should be aware of?
The new document said 8000000, so I tried to write u-boot to EIMNOR like this:
Boot SD u-boot from SD card.
tftpboot ${loadaddr} u-boot.imx-eimnor
md.b ${loadaddr} // to check that u-boot is there and it was
cp.b ${loadaddr} 8000000 ${filesize}
md.b 8000000 // to check that u-boot is there and it was
Change boot switches, remove SD card and reboot.
S2 all 0
S1-6 1 others 0
Nothing appears on the console.
The address 8000000 looked suspicious to me, because my SABRE-AI has 2Gb RAM, so wouldn't 8000000 be inside 2Gb? So I tried also the same procedure with addresses 80000000, 88000000, c0000000, c8000000 with no success, however, md.b on 80000000 and 88000000 actually showed u-boot being there, even though it's outside the 2Gb. After each write I rebooted from SD card and checked those addresses with md.b to find that u-boot is no longer there.
So where is this EIMNOR? Does SD u-boot even enable it?
please post it to uboot mail list
Hi Konstantin
I believe you are right : please refer to attached earlier document
sect.7.6 Flash U-Boot on Parallel NOR. However it is highly
recommended to use Mfg Tools for programming, one can find
it on
Programmers (Flash, etc.) (12)
i.MX 6QuadPlus SABRE Development Board|NXP
and use appropriate *.vbs board file.
Regarding flinfo command, it may depend on which uboot is used:
uboot-imx, u-boot-fslc, from denx or customized by one of numerous
board vendors.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------