Hi i.MX6 community,
We are developing our first i.MX6 custom board, after evaluating on SABRE and Wandboard dev boards. Our particular board is based on the iMX6 Rex design - core design and layout are identical, except NOR flash: REX - Freescale i.MX6 - Open Source, FREE Schematic & PCB
We have run into a wall trying to get the board booting Linux from a SATA SSD on power up.
What we have accomplished:
* Designed our first rev custom board based on Robert Feranec's open source i.MX6 Rex module
* Generated .sdcard image and .dtb with the Yocto project and accessed some needed peripherals/GPIOs
* By physically setting the BOOT_MODE pins to 01, We can run uBoot (provided by i.MX6 Rex already) from a computer through MFGtool/Serial Downloader, and put in arguments to successfully boot from a SATA drive containing our image and .dtbs, and from there run our firmware
Where the issue lies:
We want to boot directly from our SATA drive on power up, so through uBoot we have set the eFuses to boot from SATA (we believe this is correct, anyway):
fuse prog 0 5 0x20
fuse prog 0 6 0x10
As expected, the processor appears to attempt to boot from the hard drive, however we get the following error (and we make sure the HDD is powered before powering on the i.MX6):
U-Boot SPL 2017.11+fslc+gca0c3f3 (Mar 02 2018 - 16:59:12)
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
The hard drive is set up just like we can boot it from uBoot (using serial downloader). An .sdcard image we generated in Yocto is dd'd onto it (and it also contains our custom .dtb). I wonder if this is even the correct setup to boot directly into SATA from the imx6 on-board boot ROM. Do generated .sdcard images contain a uBoot for it to go into first?
Again, we want to get the board to boot directly from SATA on power-up, and we do not have working flash memory on board.
We would so much appreciate some insight from an expert - we are new to this, and have searched the forums far and wide and haven't found many resources in regards to booting from SATA and what the correct drive setup for that is. Please let me know if there is more information I should provide.
Thanks,
Tony
Hi Tony,
You need to ensure that U-Boot and the Device Tree are properly built to be used from a bootable SATA device (proper memory addresses).
The following Community document may provide some help for your custom implementation:
https://community.nxp.com/docs/DOC-328196
Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Carlos,
Thank you for your attention and reply. I've tried these steps but haven't been successful yet. Note, I am using a 60GB SSD. Here is what I've done to the hard drive...
1) sudo shred -vzn 0 /dev/sdX (the drive is sdc)
2) run through the fdisk commands in step 3 of your link, but creating a ~30GB then a ~20GB partition (the values given in the guide fall out of range on my drive)
3) copy a known working uBoot binary (which we can load and run fine through USB/MFGtool) by doing sudo dd if=u-boot-imx6.imx of=/dev/sdX bs=512 seek=2 conv=fsync
At this point I have tried to just test getting into uBoot, as it should work without yet loading the zImage, .dtb, and filesystem, correct? But I power up and get nothing from the UART console output.
How do I know that uBoot is placed in the proper memory address? My understanding is it needs to be at a 0x400 offset in the memory device, is that correct?
Thanks a bunch.
-Tony