AnsweredAssumed Answered

Direct SATA Linux boot on power-up

Question asked by Tony Jose on Mar 21, 2018
Latest reply on Mar 22, 2018 by Tony Jose

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.