I have enable opi5-sata driver on SDCard for distros like Ubuntu and Armbian and boot from SDCard and recognize 5 x SATA drives on JMB585 SATA expansion board on M.2 slot.
(
https://www.aliexpress.com/w/who ... archText=JMB585+M.2)
But what I really want to do is boot from the first SATA directly.
The obvious problem is that driver needs to be compiled into Linux kernel.
When I check, it is 'compiled' into the kernel.
But more checks later I find it needs to be enabled in orangepiEnv.txt with
overlays=ssd-sata
That again works OK from SDCard.
If I then flash the bootloader to be in SDCard and system in SATA /sda1, then all seem to go fine until boot time.
The kernel boots but drops down to an emergency shell because SATA and sda1 has not been mounted.
(To recover from this emergency shell, orangepiEnv.txt needs to change UUID manually to UUID of the partition in SDCard
rootdev=UUID=d8123954-4991-410a-937a-b7849a5a0e6d <--- UUID of the partition in SDCard instead of sda1)
Here is what the failed orangepiEnv.txt file looks like:
verbosity=1
bootlogo=true
extraargs=cma=64M
overlay_prefix=rk3588
fdtfile=rockchip/rk3588s-orangepi-5.dtb
rootdev=UUID=44a37578-cb70-4b90-8655-613101b089c7
rootfstype=ext4
overlays=ssd-sata
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
It seems the ssd-sata overlay runs a lot later than rootdev UUID is set.
Putting the overlays=ssd-sata line before rootdev causes a long delay before boot but still drops into the emergency shell.
Any ideas how to get the sata drivers going first and finding all sata drives first before trying to mount the rootdev?