Mainline U-Boot with SPI, NVMe and SATA boot support
#35
(05-28-2020, 03:54 PM)edrose Wrote: I can't believe I've only just stumbled on this thread. Amazing work getting this together. Seriously, congrats.

I've flashed this is an SD card as per the instructions, but I've run into issues. I have a Marvell 88SE9230 4-port SATA card, and my disk partition layouts look like this:

Disk 1 - 128GB Kingston SSD (GPT)
  • Partition 1 is by boot partition - 260MB FAT32 set as EFI in the partition table
  • Partition 2 is one half of my a RAID 1 array - md0 - which has LVM on top. My RootFS is an LVM volume in this.

Disk 2 - 128GB Kingston SSD (GPT)
  • Partition 1 is an empty 128MB partition
  • Partition 2 is the other half of my md0 RAID 1 array

Disk 3 - 3TB HDD (GPT)
  • Partition 1 is one half of another RAID 1 array - md1 - with LVM on top for data storage
Disk 4 - 3TB HDD (GPT)
  • Partition 1 is the half of another RAID 1 array - md1
Normally I boot this off an SD card. My boot partition resides on the SD card, and the initrd has the modules it needs to setup RAID and LVM to allow me to boot form the SSDs.

I can boot into your U-Boot no problem. If I run the bootcmd_scsi0 script, I get this output:
Code:
run bootcmd_scsi0                                                            
PCIE-0: Link up (Bus0)                                                          
scanning bus for devices...                                                    
controller reset failed (0x1)                                                  
                                                                               
Device 0: unknown device

This can be mitigated by putting a sleep of a few seconds between `pci enum` and `scsi reset`. However, `scsi reset` still outputs an error at the end:
Code:
                                                                               
Reset SCSI                                                                      
scanning bus for devices...                                                    
Target spinup took 0 ms.                                                        
Target spinup took 0 ms.                                                        
Target spinup took 0 ms.                                                        
Target spinup took 0 ms.                                                        
Target spinup took 0 ms.                                                        
Target spinup took 0 ms.                                                        
Target spinup took 0 ms.                                                        
Target spinup took 0 ms.                                                        
AHCI 0001.0200 32 slots 8 ports 6 Gbps 0xff impl SATA mode                      
flags: 64bit ncq pio                                                            
No Link on this port!                                                          
Can not start port 5                                                            
No Link on this port!                                                          
Can not start port 6                                                            
 Device 0: (0:0) Vendor: ATA Prod.: KINGSTON SA400S3 Rev: SBFK                
           Type: Hard Disk                                                    
           Capacity: 114473.4 MB = 111.7 GB (234441648 x 512)                  
 Device 1: (1:0) Vendor: ATA Prod.: KINGSTON SA400S3 Rev: SBFK                
           Type: Hard Disk                                                    
           Capacity: 114473.4 MB = 111.7 GB (234441648 x 512)                  
 Device 2: (2:0) Vendor: ATA Prod.: ST3000DM007-1WY1 Rev: 0001                
           Type: Hard Disk                                                    
           Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)              
 Device 3: (3:0) Vendor: ATA Prod.: WDC WD30EURX-63T Rev: 80.0                
           Type: Hard Disk                                                    
           Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)              
timeout exit!  

Nevertheless, running `run bootcmd_scsi0` at this point almost works:

Code:
=> run bootcmd_scsi0

Device 0: (0:0) Vendor: ATA Prod.: KINGSTON SA400S3 Rev: SBFK
           Type: Hard Disk
           Capacity: 114473.4 MB = 111.7 GB (234441648 x 512)
... is now current device
Scanning scsi 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
2089 bytes read in 15441 ms (0 Bytes/s)
select kernel
1:      kernel-4.4.202-1237-rockchip-ayufan-gfd4492386213
2:      kernel-4.4.202-1237-rockchip-ayufan-gfd4492386213-memtest
3:      kernel-4.4.132-1075-rockchip-ayufan-ga83beded8524
4:      kernel-4.4.132-1075-rockchip-ayufan-ga83beded8524-memtest
Enter choice: 1:        kernel-4.4.202-1237-rockchip-ayufan-gfd4492386213
Retrieving file: /boot/initrd.img-4.4.202-1237-rockchip-ayufan-gfd4492386213
Skipping kernel-4.4.202-1237-rockchip-ayufan-gfd4492386213 for failure retrieving initrd
2:      kernel-4.4.202-1237-rockchip-ayufan-gfd4492386213-memtest
Retrieving file: /boot/initrd.img-4.4.202-1237-rockchip-ayufan-gfd4492386213
Skipping kernel-4.4.202-1237-rockchip-ayufan-gfd4492386213-memtest for failure retrieving initrd
3:      kernel-4.4.132-1075-rockchip-ayufan-ga83beded8524
Retrieving file: /boot/initrd.img-4.4.132-1075-rockchip-ayufan-ga83beded8524
Skipping kernel-4.4.132-1075-rockchip-ayufan-ga83beded8524 for failure retrieving initrd
4:      kernel-4.4.132-1075-rockchip-ayufan-ga83beded8524-memtest
Retrieving file: /boot/initrd.img-4.4.132-1075-rockchip-ayufan-ga83beded8524
Skipping kernel-4.4.132-1075-rockchip-ayufan-ga83beded8524-memtest for failure retrieving initrd
SCRIPT FAILED: continuing...

As you can see, it's dead slow (2kB in 15 seconds) and never fully manages to fetch the initrd from the disk. Is there any troubleshooting I can do? I've worked a little on U-Boot source in the past, plus I have an incentive to get this working, so if there is anything I can do to help fix something like this I am more than happy to get involved.





hi @edrose I am using the similar setup with same marvel pcie card. Did you manage to circumvent it and how does it work. For me I would like to boot from SSD instead of SD karte. I am running OMV and my kernal info :

Linux rockpro64 4.4.167-1213-rockchip-ayufan-g34ae07687fce #1 SMP Tue Jun 18 20:44:49 UTC 2019 aarch64 GNU/Linux

I have followed the artikel https://forum.frank-mankel.org/topic/208...vme-platte to boot from SSD.

But unfortunate it doesn't work.

and I am not sure how booting from u-boot-spi works. since I have to manually enable marvel Pci-e driver from kernal pci=nomsi and marvel-99.rules

If I keep SD card as bootler and boot from SSD is totally fine for me. But so far I could not able to achieve this.

Any idea.



specs:
OS: OMV5

2 -SSD: RAID 1 setup

2 partitions done using LVM (OS, Configs)

I would like to boot the OS from this OS partition which is in RAID 1 setup.



Thanks
  Reply


Messages In This Thread
RE: Mainline U-Boot with SPI, NVMe and SATA boot support - by sivar93 - 06-18-2020, 05:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  enble boot after power loss/restore dkebler 18 8,948 12-04-2023, 12:14 PM
Last Post: ok38
Bug Broken boot: What am I missing? mkosarek 1 608 09-08-2023, 08:14 AM
Last Post: wdt
  Unable to boot Armbian on new RockPro64 mooseball 5 4,092 07-14-2023, 08:59 AM
Last Post: rockjonn
  no boot white led flashing moserwi 7 4,110 05-18-2023, 10:46 AM
Last Post: wdt
  u-boot locked on pine64pro ljones 1 1,479 09-06-2022, 10:32 AM
Last Post: ljones
  Cannot get my board to boot deutschlmao 11 7,839 09-05-2022, 04:23 PM
Last Post: ljones
  U-BOOT Tutorial hazz 0 1,109 07-19-2022, 10:48 PM
Last Post: hazz
  Installation Debian on emmc: which U-Boot and where? vongillus 3 2,678 07-02-2022, 09:24 AM
Last Post: dkebler
  ROCKPRO64 PCI SSD SD-boot Install pspgarret 0 1,116 06-09-2022, 10:56 AM
Last Post: pspgarret
  Support says "regulator" on the SBC burned out; how to fix? dmos 0 873 06-02-2022, 02:20 AM
Last Post: dmos

Forum Jump:


Users browsing this thread: 1 Guest(s)