Booting from USB SSD
Hello,
Thank you very much for all your efforts on this,
I am testing the build on an Orange Pi 5, and am looking to boot from usb. While it appears that I am effectively booting from usb after following the instructions in the docs, it also appears the Orange Pi will not boot is there isn't an SD card in the card slot. Is this the expected behavior?
Thanks
The system will boot from the SD card first. If there is an operating system on the SD card, it should boot. But I don't know what will happen if the SD card does not have an operating system. Ill take a look when I have time.
Thanks. As far as I could see, with SD card absent, or with no operating system on it, the orange pi will not boot. It would be nice if it boots regardless of the SD card state, so we do not need to have a card just sitting there with no purpose.
Thanks again for all your help!
On Fri, Apr 28, 2023, 10:32 AM Joshua Riek @.***> wrote:
The system will boot from the SD card first. If there is an operating system on the SD card, it should boot. But I don't know what will happen if the SD card does not have an operating system. Ill take a look when I have time.
— Reply to this email directly, view it on GitHub https://github.com/Joshua-Riek/ubuntu-orange-pi5/issues/131#issuecomment-1527570243, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW5CXYUIC34SWULKJTPZ3TXDPBGRANCNFSM6AAAAAAXPG4NCA . You are receiving this because you authored the thread.Message ID: @.***>
I double-checked the latest release, and the system can boot without an SD card inserted. However, there is a prerequisite, and you must flash the bootloader to the SPI. This can be done with the below command, which may take around 5 minutes to finish.
sudo dd if=/lib/u-boot-orangepi-rk3588/rkspi_loader.img of=/dev/mtdblock0 conv=notrunc
Also, if you use a USB to SSD converter, that will not work. I have a SATA to USB converter, and it does not work to boot the system. It produces some boot errors that are out of my knowledge to fix.
Thanks Joshua, That was helpful. I actually was able to flash the bootloader, before doing the tests, that is why i opened the ticket.
My scenario is exactly the second one (USB to SSD), and I can confirm that without the SD card, it won't boot. Can you direct me where do you see the errors? Maybe I can snoop around, I am interested in getting that specific Scenario working.
Thanks!
On Fri, Apr 28, 2023 at 2:54 PM Joshua Riek @.***> wrote:
I double-checked the latest release, and the system can boot without an SD card inserted. However, there is a prerequisite, and you must flash the bootloader to the SPI. This can be done with the below command, which may take around 5 minutes to finish.
sudo dd if=/lib/u-boot-orangepi-rk3588/rkspi_loader.img of=/dev/mtdblock0 conv=notrunc
Also, if you use a USB to SSD converter, that will not work. I have a SATA to USB converter, and it does not work to boot the system. It produces some boot errors that are out of my knowledge to fix.
— Reply to this email directly, view it on GitHub https://github.com/Joshua-Riek/ubuntu-orange-pi5/issues/131#issuecomment-1527900585, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW5CX7XFJRYDNGME44RGQDXDP76RANCNFSM6AAAAAAXPG4NCA . You are receiving this because you authored the thread.Message ID: @.***>
Idk if you are familiar with using a serial cable to connect to the board, but this is the output. The system will hang at the end of the below log, with the last messing being scanning bus usb@fc880000 for devices... WARN: interface 0 has 6 endpoint descriptor, different from the interface descriptor's value: 2
I'll take a quick look to see if I can find any solution. It's been a few weeks since I last looked; maybe someone has a fix.
DDR Version V1.08 20220617
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
Manufacturer ID:0x1 Samsung
CH0 RX Vref:31.7%, TX Vref:19.8%,20.8%
CH1 RX Vref:31.7%, TX Vref:20.8%,21.8%
CH2 RX Vref:30.7%, TX Vref:19.8%,19.8%
CH3 RX Vref:33.7%, TX Vref:20.8%,22.8%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
U-Boot SPL board init
U-Boot SPL 2017.09-orangepi-rk3588 (Apr 20 2023 - 00:24:29)
Trying to boot from MMC1
spl: mmc init failed with error: -123
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MTD2
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(d21d14728d...) + OK
## Checking uboot 0x00200000 ... sha256(ce0d909c7c...) + OK
## Checking fdt 0x00349348 ... sha256(6a0656d703...) + OK
## Checking atf-2 0x000f0000 ... sha256(c00c7fd75b...) + OK
## Checking atf-3 0xff100000 ... sha256(71c3a5841b...) + OK
## Checking atf-4 0xff001000 ... sha256(2301cf73be...) + OK
Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00040000)
Total: 506.570 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-391-g856309329:derrick.huang
NOTICE: BL31: Built : 14:15:50, Jul 18 2022
INFO: ext 32k is valid
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: system boots from cpu-hwid-0
INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR: Error initializing runtime service opteed_fast
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2017.09-orangepi-rk3588 (Apr 20 2023 - 00:24:29 +0000)
Model: Orange Pi 5
PreSerial: 2, raw, 0xfeb50000
DRAM: 7.7 GiB
Sysmem: init
Relocation Offset: eda2d000
Relocation fdt: eb9f9008 - eb9fecc0
CR: M/C/I
Using default environment
SF: Detected sfc_nor with page size 256 Bytes, erase size 4 KiB, total 16 MiB
Bootdev(atags): mtd 2
PartType: EFI
DM: v2
boot mode: None
Model: Orange Pi 5
CLK: (sync kernel. arm: enter 1008000 KHz, init 1008000 KHz, kernel 0N/A)
b0pll 24000 KHz
b1pll 24000 KHz
lpll 24000 KHz
v0pll 24000 KHz
aupll 24000 KHz
cpll 1500000 KHz
gpll 1188000 KHz
npll 24000 KHz
ppll 1100000 KHz
aclk_center_root 702000 KHz
pclk_center_root 100000 KHz
hclk_center_root 396000 KHz
aclk_center_low_root 500000 KHz
aclk_top_root 750000 KHz
pclk_top_root 100000 KHz
aclk_low_top_root 396000 KHz
Net: No ethernet found.
Hit key to stop autoboot('CTRL+C'): 0
no mmc device at slot 0
mmc@fe2c0000: 0
mmc@fe2e0000: 1
Card did not respond to voltage select!
PCIe-0 Link Fail
Device 0: unknown device
scanning bus for devices...
Device 0: unknown device
Device 2: Vendor: 0x2207 Rev: V1.00 Prod: sfc_nor
Type: Hard Disk
Capacity: 16.0 MB = 0.0 GB (32768 x 512)
... is now current device
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Device 1:
Device 0: unknown device
starting USB...
Bus usb@fc000000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fc800000: USB EHCI 1.00
Bus usb@fc840000: USB OHCI 1.0
Bus usb@fc880000: USB EHCI 1.00
Bus usb@fc8c0000: USB OHCI 1.0
Bus usb@fcd00000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fc000000 for devices... 1 USB Device(s) found
scanning bus usb@fc800000 for devices... 1 USB Device(s) found
scanning bus usb@fc840000 for devices... 1 USB Device(s) found
scanning bus usb@fc880000 for devices... WARN: interface 0 has 6 endpoint descriptor, different from the interface descriptor's value: 2
Yeah, i can connect a console, i will take a look too.
The strange thing is that, even with the SD card in, the system appears to be booting from the SD.
Thanks
On Fri, Apr 28, 2023, 3:12 PM Joshua Riek @.***> wrote:
Idk if you are familiar with using a serial cable to connect to the board, but this is the output. The system will hang at the end of the below log, with the last messing being scanning bus @.*** for devices... WARN: interface 0 has 6 endpoint descriptor, different from the interface descriptor's value: 2
I'll take a quick look to see if I can find any solution. It's been a few weeks since I last looked; maybe someone has a fix.
DDR Version V1.08 20220617 LPDDR4X, 2112MHz channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB Manufacturer ID:0x1 Samsung CH0 RX Vref:31.7%, TX Vref:19.8%,20.8% CH1 RX Vref:31.7%, TX Vref:20.8%,21.8% CH2 RX Vref:30.7%, TX Vref:19.8%,19.8% CH3 RX Vref:33.7%, TX Vref:20.8%,22.8% change to F1: 528MHz change to F2: 1068MHz change to F3: 1560MHz change to F0: 2112MHz out U-Boot SPL board init U-Boot SPL 2017.09-orangepi-rk3588 (Apr 20 2023 - 00:24:29) Trying to boot from MMC1 spl: mmc init failed with error: -123 Trying to boot from MMC2 Card did not respond to voltage select! spl: mmc init failed with error: -95 Trying to boot from MTD2 Trying fit image at 0x4000 sector
Verified-boot: 0
Checking atf-1 0x00040000 ... sha256(d21d14728d...) + OK
Checking uboot 0x00200000 ... sha256(ce0d909c7c...) + OK
Checking fdt 0x00349348 ... sha256(6a0656d703...) + OK
Checking atf-2 0x000f0000 ... sha256(c00c7fd75b...) + OK
Checking atf-3 0xff100000 ... sha256(71c3a5841b...) + OK
Checking atf-4 0xff001000 ... sha256(2301cf73be...) + OK
Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00040000) Total: 506.570 ms
INFO: Preloader serial: 2 NOTICE: BL31: v2.3():v2.3-391-g856309329:derrick.huang NOTICE: BL31: Built : 14:15:50, Jul 18 2022 INFO: ext 32k is valid INFO: GICv3 without legacy support detected. INFO: ARM GICv3 driver initialized in EL3 INFO: system boots from cpu-hwid-0 INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001 INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz INFO: BL31: Initialising Exception Handling Framework INFO: BL31: Initializing runtime services WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK ERROR: Error initializing runtime service opteed_fast INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x200000 INFO: SPSR = 0x3c9
U-Boot 2017.09-orangepi-rk3588 (Apr 20 2023 - 00:24:29 +0000)
Model: Orange Pi 5 PreSerial: 2, raw, 0xfeb50000 DRAM: 7.7 GiB Sysmem: init Relocation Offset: eda2d000 Relocation fdt: eb9f9008 - eb9fecc0 CR: M/C/I Using default environment
SF: Detected sfc_nor with page size 256 Bytes, erase size 4 KiB, total 16 MiB Bootdev(atags): mtd 2 PartType: EFI DM: v2 boot mode: None Model: Orange Pi 5 CLK: (sync kernel. arm: enter 1008000 KHz, init 1008000 KHz, kernel 0N/A) b0pll 24000 KHz b1pll 24000 KHz lpll 24000 KHz v0pll 24000 KHz aupll 24000 KHz cpll 1500000 KHz gpll 1188000 KHz npll 24000 KHz ppll 1100000 KHz aclk_center_root 702000 KHz pclk_center_root 100000 KHz hclk_center_root 396000 KHz aclk_center_low_root 500000 KHz aclk_top_root 750000 KHz pclk_top_root 100000 KHz aclk_low_top_root 396000 KHz Net: No ethernet found. Hit key to stop autoboot('CTRL+C'): 0 no mmc device at slot 0 @.: 0 @.: 1 Card did not respond to voltage select! PCIe-0 Link Fail
Device 0: unknown device scanning bus for devices...
Device 0: unknown device
Device 2: Vendor: 0x2207 Rev: V1.00 Prod: sfc_nor Type: Hard Disk Capacity: 16.0 MB = 0.0 GB (32768 x 512) ... is now current device Failed to mount ext2 filesystem... ** Unrecognized filesystem type **
Device 1: Device 0: unknown device starting USB... Bus @.: Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.10 Bus @.: USB EHCI 1.00 Bus @.: USB OHCI 1.0 Bus @.: USB EHCI 1.00 Bus @.: USB OHCI 1.0 Bus @.: Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.10 scanning bus @.*** for devices... 1 USB Device(s) found scanning bus @.*** for devices... 1 USB Device(s) found scanning bus @.*** for devices... 1 USB Device(s) found scanning bus @.*** for devices... WARN: interface 0 has 6 endpoint descriptor, different from the interface descriptor's value: 2
— Reply to this email directly, view it on GitHub https://github.com/Joshua-Riek/ubuntu-orange-pi5/issues/131#issuecomment-1527922581, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW5CX4BCPQKNLAI2CGHEDLXDQCAJANCNFSM6AAAAAAXPG4NCA . You are receiving this because you authored the thread.Message ID: @.***>
I'm also interested in a solution for this if it ever comes available. :)
But does this affect ssd boot on the Pi 5 Plus?
Surely directly it would boot from SSD or does that bug presist here too?
Yes, the bug also occurs on the Orange Pi 5 Plus, both devices use the same Rockchip BSP U-Boot version.
rk3588.dtsi is already in the mainline latest version, I wonder if they have something that's not in your fork of it. Should we try to rebase to main and make a PR for Orange Pi 5 Plus to the mainline?
I found this blog with amazing updates to the dts file that supports 6.6 mainline.
How come there is not hdmi support at all? Is there a known background?