jaredmcneill / quartz64_uefi

EDK2 UEFI for Rockchip RK3566 and RK3568 based SBCs.
153 stars 61 forks source link

Unable to boot on Orange Pi 3B #64

Closed MrSuicideParrot closed 9 months ago

MrSuicideParrot commented 1 year ago

Hi! I noticed that the last commit from @mariobalanica added support for the Orange Pi 3B. I manually built the sdcard image for the Orange PI, but unfortunately the image wasn't able to boot. The version of my orange pi 3B is v1.1.1, I placed the image on an sd card and tested multiple sd cards, and every time with the same result.

The log of the boot is the following one:

DDR Version V1.10 20210810
ln
ddrconfig:7
LPDDR4X, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=4096MB
tdqss: cs0 dqs0: -72ps, dqs1: -217ps, dqs2: -120ps, dqs3: -192ps, 
tdqss: cs1 dqs0: -96ps, dqs1: -217ps, dqs2: -144ps, dqs3: -192ps, 

change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x65

change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58

change to: 780MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58

change to: 1056MHz(final freq)
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:22%
dram drv:40,odt:80
vref_ca:00000071
clk skew:0x4d
cs 0:
the read training result:
DQS0:0x40, DQS1:0x3b, DQS2:0x41, DQS3:0x3b, 
min  : 0xc  0xc  0xe  0xd  0x1  0x3  0x5  0x5 , 0x6  0x7  0x3  0x1  0x9  0xe 0x10 0x10 ,
       0x3  0x1 0x10 0x10  0xd  0xd  0xf  0xb , 0x6  0x4  0x9  0x1  0xd  0xd  0xd  0xb ,
mid  :0x2b 0x2a 0x2b 0x2b 0x1f 0x20 0x23 0x25 ,0x23 0x24 0x20 0x1e 0x27 0x2d 0x2e 0x2d ,
      0x21 0x20 0x2c 0x2c 0x29 0x2a 0x2b 0x29 ,0x24 0x23 0x27 0x1f 0x2b 0x2b 0x2a 0x29 ,
max  :0x4a 0x48 0x49 0x4a 0x3d 0x3e 0x41 0x45 ,0x40 0x41 0x3e 0x3c 0x45 0x4c 0x4c 0x4a ,
      0x40 0x3f 0x49 0x48 0x46 0x47 0x47 0x47 ,0x42 0x42 0x46 0x3d 0x49 0x49 0x48 0x47 ,
range:0x3e 0x3c 0x3b 0x3d 0x3c 0x3b 0x3c 0x40 ,0x3a 0x3a 0x3b 0x3b 0x3c 0x3e 0x3c 0x3a ,
      0x3d 0x3e 0x39 0x38 0x39 0x3a 0x38 0x3c ,0x3c 0x3e 0x3d 0x3c 0x3c 0x3c 0x3b 0x3c ,
the write training result:
DQS0:0x44, DQS1:0x30, DQS2:0x3d, DQS3:0x34, 
min  :0x5c 0x5d 0x5e 0x5f 0x54 0x53 0x55 0x5a 0x59 ,0x46 0x47 0x46 0x42 0x4a 0x50 0x4f 0x51 0x4d ,
      0x4c 0x4a 0x57 0x56 0x54 0x53 0x55 0x55 0x54 ,0x4b 0x4b 0x4f 0x4a 0x52 0x51 0x54 0x53 0x4d ,
mid  :0x78 0x79 0x7a 0x7a 0x6f 0x6f 0x71 0x76 0x74 ,0x63 0x63 0x61 0x5f 0x66 0x6c 0x6c 0x6e 0x69 ,
      0x69 0x67 0x73 0x73 0x70 0x6f 0x70 0x70 0x70 ,0x67 0x67 0x6b 0x65 0x6e 0x6e 0x70 0x6f 0x69 ,
max  :0x95 0x95 0x97 0x95 0x8a 0x8b 0x8d 0x92 0x90 ,0x81 0x80 0x7c 0x7c 0x83 0x89 0x89 0x8c 0x86 ,
      0x86 0x84 0x8f 0x91 0x8c 0x8b 0x8b 0x8c 0x8d ,0x83 0x84 0x87 0x80 0x8a 0x8c 0x8d 0x8b 0x85 ,
range:0x39 0x38 0x39 0x36 0x36 0x38 0x38 0x38 0x37 ,0x3b 0x39 0x36 0x3a 0x39 0x39 0x3a 0x3b 0x39 ,
      0x3a 0x3a 0x38 0x3b 0x38 0x38 0x36 0x37 0x39 ,0x38 0x39 0x38 0x36 0x38 0x3b 0x39 0x38 0x38 ,
cs 1:
the read training result:
DQS0:0x40, DQS1:0x3d, DQS2:0x40, DQS3:0x3b, 
min  : 0xa  0x9  0xc  0xc  0x1  0x2  0x4  0x4 , 0x7  0x6  0x5  0x1  0x9  0xf 0x10 0x10 ,
       0x3  0x0 0x10  0xf  0xc  0xd  0xf  0xb , 0x6  0x4  0x9  0x1  0xc  0xd  0xe  0xc ,
mid  :0x2a 0x29 0x2b 0x2c 0x20 0x21 0x23 0x25 ,0x25 0x25 0x24 0x1f 0x28 0x2f 0x2f 0x2e ,
      0x20 0x1f 0x2c 0x2b 0x28 0x29 0x2a 0x28 ,0x24 0x22 0x27 0x1f 0x2a 0x2a 0x2b 0x2a ,
max  :0x4b 0x49 0x4a 0x4c 0x40 0x41 0x42 0x46 ,0x44 0x44 0x43 0x3e 0x47 0x50 0x4f 0x4d ,
      0x3e 0x3f 0x49 0x47 0x45 0x46 0x46 0x46 ,0x42 0x41 0x46 0x3d 0x49 0x48 0x49 0x48 ,
range:0x41 0x40 0x3e 0x40 0x3f 0x3f 0x3e 0x42 ,0x3d 0x3e 0x3e 0x3d 0x3e 0x41 0x3f 0x3d ,
      0x3b 0x3f 0x39 0x38 0x39 0x39 0x37 0x3b ,0x3c 0x3d 0x3d 0x3c 0x3d 0x3b 0x3b 0x3c ,
the write training result:
DQS0:0x44, DQS1:0x30, DQS2:0x3d, DQS3:0x34, 
min  :0x59 0x5b 0x5c 0x5d 0x52 0x51 0x53 0x58 0x57 ,0x47 0x47 0x47 0x43 0x4d 0x50 0x51 0x53 0x4e ,
      0x49 0x47 0x54 0x54 0x50 0x50 0x52 0x53 0x52 ,0x4b 0x4b 0x4f 0x49 0x53 0x51 0x53 0x53 0x4d ,
mid  :0x75 0x76 0x77 0x78 0x6d 0x6d 0x6f 0x73 0x72 ,0x63 0x63 0x61 0x5e 0x67 0x6c 0x6c 0x6e 0x6a ,
      0x65 0x64 0x6f 0x70 0x6c 0x6c 0x6d 0x6d 0x6d ,0x67 0x67 0x6b 0x65 0x6f 0x6f 0x6f 0x6f 0x69 ,
max  :0x92 0x92 0x93 0x93 0x89 0x89 0x8b 0x8f 0x8e ,0x7f 0x80 0x7c 0x7a 0x82 0x88 0x88 0x8a 0x86 ,
      0x82 0x82 0x8b 0x8d 0x89 0x88 0x88 0x87 0x88 ,0x83 0x84 0x88 0x82 0x8b 0x8d 0x8c 0x8c 0x86 ,
range:0x39 0x37 0x37 0x36 0x37 0x38 0x38 0x37 0x37 ,0x38 0x39 0x35 0x37 0x35 0x38 0x37 0x37 0x38 ,
      0x39 0x3b 0x37 0x39 0x39 0x38 0x36 0x34 0x36 ,0x38 0x39 0x39 0x39 0x38 0x3c 0x39 0x39 0x39 ,
CA Training result:
cs:0 min  :0x45 0x41 0x3f 0x3c 0x40 0x39 0x42 ,0x47 0x3f 0x45 0x3e 0x42 0x39 0x43 ,
cs:0 mid  :0x82 0x81 0x7b 0x7d 0x7c 0x7a 0x6f ,0x82 0x81 0x7f 0x7d 0x7d 0x7b 0x70 ,
cs:0 max  :0xc0 0xc2 0xb8 0xbf 0xb9 0xbb 0x9d ,0xbe 0xc4 0xba 0xbc 0xb8 0xbd 0x9d ,
cs:0 range:0x7b 0x81 0x79 0x83 0x79 0x82 0x5b ,0x77 0x85 0x75 0x7e 0x76 0x84 0x5a ,
cs:1 min  :0x45 0x42 0x3e 0x3e 0x3e 0x3c 0x40 ,0x43 0x43 0x40 0x3e 0x3f 0x3c 0x42 ,
cs:1 mid  :0x84 0x81 0x7c 0x7e 0x7c 0x7b 0x6f ,0x81 0x81 0x7e 0x7c 0x7c 0x7a 0x6e ,
cs:1 max  :0xc3 0xc1 0xba 0xbe 0xba 0xbb 0x9e ,0xbf 0xbf 0xbc 0xbb 0xb9 0xb9 0x9b ,
cs:1 range:0x7e 0x7f 0x7c 0x80 0x7c 0x7f 0x5e ,0x7c 0x7c 0x7c 0x7d 0x7a 0x7d 0x59 ,
out
U-Boot SPL board init
U-Boot SPL 2017.09-orangepi (Aug 15 2023 - 14:24:38)
Trying to boot from MMC1
No misc partition
Trying fit image at 0x4000 sector
Not fit magic
Trying fit image at 0x5400 sector
Not fit magic
Trying fit image at 0x4000 sector
Not fit magic
Trying fit image at 0x5400 sector
Not fit magic
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MTD2
sys malloc pool space exhausted
alloc_read_gpt_entries: ERROR: Can't allocate lX bytes for GPT Entries
GPT: Failed to allocate memory for PTE
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
sys malloc pool space exhausted
alloc_read_gpt_entries: ERROR: Can't allocate lX bytes for GPT Entries
GPT: Failed to allocate memory for PTE
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
sys malloc pool space exhausted
alloc_read_gpt_entries: ERROR: Can't allocate lX bytes for GPT Entries
GPT: Failed to allocate memory for PTE
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
No misc partition
sys malloc pool space exhausted
alloc_read_gpt_entries: ERROR: Can't allocate lX bytes for GPT Entries
GPT: Failed to allocate memory for PTE
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
sys malloc pool space exhausted
alloc_read_gpt_entries: ERROR: Can't allocate lX bytes for GPT Entries
GPT: Failed to allocate memory for PTE
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
Trying fit image at 0x400 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(2f01bd8955...) + OK
## Checking uboot 0x00a00000 ... sha256(ed4b06accc...) + OK
## Checking fdt 0x00b3faf8 ... sha256(1f3b8cb579...) + OK
## Checking atf-2 0xfdcc9000 ... sha256(f1fecab971...) + OK
sys malloc pool space exhausted
## Checking atf-3 0xfdcd0000 ... sha256hw_fit_calculate_hash: algo sha256 failed, ret=-22
 error!
Unsupported hash algorithm for 'hash' hash node in 'atf-3' image node
Trying fit image at 0x1800 sector
Not fit magic
sys malloc pool space exhausted
alloc_read_gpt_entries: ERROR: Can't allocate lX bytes for GPT Entries
GPT: Failed to allocate memory for PTE
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
sys malloc pool space exhausted
alloc_read_gpt_entries: ERROR: Can't allocate lX bytes for GPT Entries
GPT: Failed to allocate memory for PTE
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
# Reset the board to bootrom #

Does anyone have an idea about the reason behind this error? Or can help me debug this?

PrestarLin commented 11 months ago

I am also,i Swipe image to tf card,but keyboard esc cannot be identified.Just use roc 3566-efi.img is ok when keyboard connect to the usb2.0 side to usb3.0.

jaredmcneill commented 9 months ago

It looks like this is chain loading from U-Boot. @mariobalanica can you help here? I don't have one of these boards to test.

mariobalanica commented 9 months ago

Looks like it's booting from another media which has U-Boot on it (eMMC, SPI NOR?). IIRC, the SPI NOR has higher precedence than SD. You need to wipe that first.

MrSuicideParrot commented 9 months ago

Thank you very much! I can confirm that it was the case. The OrangePi 3B has an eeprom with U-Boot pre-installed. After erasing it, I was able to run EDK2 UEFI.

sxIhsan commented 8 months ago

Thank you very much! I can confirm that it was the case. The OrangePi 3B has an eeprom with U-Boot pre-installed. After erasing it, I was able to run EDK2 UEFI.

Hello, do you still have the image for Orange Pi 3b? I am interested to testing this as well