Jump to content

[OPI4 LTS] Pcie to m.2. nvme ssd fails to boot 90% of the time


Turbine
 Share

Recommended Posts

Hi everyone,

After migrating to a nvme ssd using the recommended official adapters, I've run into this issue. (Been really frustrating not been able to boot reliably, replug it until it works)

 

Before I migrated, if I went fdisk -l it would start flashing and always show up. It's only when booting, it seems to be unable to boot/stay on most of the time.

 

1) I put power into pi.

2) The ssd blinks, if it stops blinking, it didn't boot. If it keeps blinking success.

 

Is there a way to delay mounting the ssd or better debug this issue? 

Link to comment
Share on other sites

You have free download capacity? Woud you like to mirror Armbian?

Best debugging chances you get when hooking up a serial console via USB uart adapter.

 

Also check your wiring. Voltage drop due to bad PSU, connectors and cables can lead into all sort of weird issues.

Link to comment
Share on other sites

Hi Werner, I just collected output using UART for a successful and unsuccessful boot. I can't see anything that really sticks out, other than one gets stuck on 'starting kernel...', is there any way I can delay the booting of the SSD?

 

Well I've tried a bunch of different USB type c cables and 2 x 5V 3A & 2 x 5V 2A adapters. So I can't help but feel there's a bug. As if it actually boots, it's fine from then on. There may be a power spike draw on boot or something.


Successful boot:

Quote

DDR Version 1.25 20210517
In
channel 0
CS = 0
MR0=0x18
MR4=0x1
MR5=0x1
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x18
MR4=0x1
MR5=0x1
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 416MHz 0,1
Channel 0: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
256B stride
channel 0
CS = 0
MR0=0x18
MR4=0x1
MR5=0x1
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x18
MR4=0x1
MR5=0x1
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
channel 0, cs 0, advanced training done
channel 1, cs 0, advanced training done
change freq to 856MHz 1,0
ch 0 ddrconfig = 0x101, ddrsize = 0x40
ch 1 ddrconfig = 0x101, ddrsize = 0x40
pmugrf_os_reg[2] = 0x32C1F2C1, stride = 0xD
ddr_set_rate to 328MHZ
ddr_set_rate to 666MHZ
ddr_set_rate to 928MHZ
channel 0, cs 0, advanced training done
channel 1, cs 0, advanced training done
ddr_set_rate to 416MHZ, ctl_index 0
ddr_set_rate to 856MHZ, ctl_index 1
support 416 856 328 666 928 MHz, current 856MHz
OUT
Boot1 Release Time: May 29 2020 17:36:36, version: 1.26
CPUId = 0x0
ChipType = 0x10, 351
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
emmc reinit
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmROR: Card did not respond to voltage select!
emmc reinit
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
SdmmcInit=2 1
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=61056MB
FwPartOffset=2000 , 0
StorageInit ok = 44915
SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit read PBA: 0x1404
SecureInit read PBA: 0x1804
SecureInit read PBA: 0x1c04
SecureInit ret = 0, SecureMode = 0
atags_seet:(0)
GPT 0x3335db8 signature is wrong
recovery gpt...
GPT 0x3335db8 signature is wrong
recovery gpt fail!
Trust Addr:0x4000, 0x58334c42
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xd7c10
RunBL31 0x40000 @ 162768 us
NOTICE:  BL31: v1.3(release):845ee93
NOTICE:  BL31: Built : 15:51:11, Jul 22 2020
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFcpu mask: 0
INFO:    plat_rockchip_pmu_init(1196): pd status 3e
INFO:    BL: Initializing runtime services
WARNING: No OPTEE provided by Bt 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 2022.04-armbian (Jun 22 2022 - 07:16:37 +0000)

SoC: Rockchip rk3399
Reset cause: POR
Model: OrangePi 4 AI board
DRAM:  3.9 GiB
PMIC:  RK808
Core:  224 devices, 22 uclasses, devicetree: separate
MMC:   mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC... Card did not respond to voltage select! : -110
*** Warning - No block device, using default environment

In:    serial
Out:   serial
Err:   serial
Model: OrangePi 4 AI board
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0
starting USB...
Bus usb@fe380000: ehci_generic usb@fe380000: failed to get usb phy
Port not available.
Bus usb@fe3c0000: ehci_generic usb@fe3c0000: failed to get usb phy
Port not available.
USB is stopped. Please issue 'usb start' first.
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
3185 bytes read in 5 ms (622.1 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 1
295 bytes read in 4 ms (71.3 KiB/s)
16356930 bytes read in 696 ms (22.4 MiB/s)
30540288 bytes read in 1294 ms (22.5 MiB/s)
81458 bytes read in 14 ms (5.5 MiB/s)
267 bytes read in 8 ms (32.2 KiB/s)
Applying kernel provided DT overlay rockchip-pcie-gen2.dtbo
376 bytes read in 8 ms (45.9 KiB/s)
Applying kernel provided DT overlay rockchip-rk3399-opp-2ghz.dtbo
384 bytes read in 8 ms (46.9 KiB/s)
Applying kernel provided DT overlay rockchip-uart4.dtbo
2698 bytes read in 8 ms (329.1 KiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 09000000
Moving Image from 0x2080000 to 0x2200000, end=3fc0000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    16356866 Bytes = 15.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f4f65000, end f5efe602 ... OK
   Loading Device Tree to 00000000f4ee8000, end 00000000f4f64fff ... OK

Starting kernel ...

[    8.304287] mtd device must be supplied (device name is empty)

Armbian 22.05.4 Jammy ttyS2

opi4 login:

 

Unsuccessful boot:
 

Quote

DDR Version 1.25 20210517
In
channel 0
CS = 0
MR0=0x18
MR4=0x1
MR5=0x1
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x18
MR4=0x1
MR5=0x1
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 416MHz 0,1
Channel 0: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Di-Width=16 Size=2048MB
Channel 1: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
256B stride
channel 0
CS = 0
MR0=0x18
MR4=0x1
MR5=0x1
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x18
MR4=0x1
MR5=0x1
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
channel 0, cs 0, advanced training done
channel 1, cs 0, advanced training done
change freq to 856MHz 1,0
ch 0 ddrconfig = 0x101, ddrsize = 0x40
ch 1 ddrconfig = 0x101, ddrsize = 0x40
pmugrf_os_reg[2] = 0x32C1F2C1, stride = 0xD
ddr_set_rate to 328MHZ
ddr_set_rate to 666MHZ
ddr_set_rate to 928MHZ
channel 0, cs 0, advanced training done
channel 1, cs 0, advanced training done
ddr_set_rate to 416MHZ, ctl_index 0
ddr_set_rate to 856MHZ, ctl_index 1
support 416 856 328 666 928 MHz, current 856MHz
OUT
Boot1 Release Time: May 29 2020 17:36:36, version: 1.26
CPUId = 0x0
ChipType = 0x10, 352
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
emmc reinit
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmRROR: Card did not respond to voltage select!
emmc reinit
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
SdmmcInit=2 1
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=61056MB
FwPartOffset=2000 , 0
StorageInit ok = 44665
SecureMode = 0
SecureInit reaPBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit read PBA: 0x1404
SecureInit read PBA: 0x1804
SecureInit read PBA: 0x1c04
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT 0x3335db8 signature is wrong
recovery gpt...
GPT 0x3335db8 signature is wrong
recovery gpt fail!
Trust Addr:0x4000, 0x58334c42
No fin30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xd7c10
RunBL31 0x40000 @ 162512 us
NOTICE:  BL31: v1.3(release):845ee93
NOTICE:  BL31: Built : 15:51:11, Jul 22 2020
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    plat_rockchip_pmu_init(1196): pd status 3e
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will ret SMC_UNK
ERROR:   Error initializing runtime service opteed_fas   BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2022.04-armbian (Jun 22 2022 - 07:16:37 +0000)

SoC: Rockchip rk3399
Reset cause: POR
Model: OrangePi 4 AI board
DRAM:  3.9 GiB
PMIC:  RK808
Core:  224 devices, 22 uclasses, devicetree: separate
MMC:   mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC... Card did not respond to voltage select! : -110
*** Warning - No block device, using default environment

In:    serial
Out:   serial
Err:   serial
Model: OrangePi 4 AI board
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0
starting USB...
Bus usb@fe380000: ehci_generic usb@fe380000: failed to get usb phy
Port not available.
Bus usb@fe3c0000: ehci_generic usb@fe3c0000: failed to get usb phy
Port not available.
USB is stopped. Please issue 'usb start' first.
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
3185 bytes read in 5 ms (622.1 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 1
295 bytes read in 4 ms (71.3 KiB/s)
16356930 bytes read in 696 ms (22.4 MiB/s)
30540288 bytes read in 1294 ms (22.5 MiB/s)
81458 bytes read in 14 ms (5.5 MiB/s)
267 bytes read in 8 ms (32.2 KiB/s)
Applying kernel provided DT overlay rockchip-pcie-gen2.dtbo
                                                           376 bytes read in 8 ms (45.9 KiB/s)
Applying kernel provided DT overlay rockchip-rk3399-opp-2ghz.dtbo
384 bytes read in 8 ms (46.9 KiB/s)
Applying kernel provided DT overlay rockchip-uart4.dtbo
2698 bytes read in 9 ms (292 KiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 09000000
Moving Image from 0x2080000 to 0x2200000, end=3fc0000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Tye:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    16356866 Bytes = 15.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loadinamdisk to f4f65000, end f5efe602 ... OK
   Loading Device Tree to 00000000f4ee8000, end 00000000f4f64fff ... OK

Starting kernel ...
 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...