Bug 2189528

Summary: U-Boot fails to boot EFI on roc-cc-rk3328
Product: [Fedora] Fedora Reporter: Charles Timko <ctimko>
Component: uboot-toolsAssignee: Peter Robinson <pbrobinson>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 38CC: dan, dennis, jean, jordan, nrevo, ole.d, pbrobinson, pwhalen
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Charles Timko 2023-04-25 14:06:45 UTC
When attempting to boot the ROC-RK3328-CC Renegade into Fedora IoT 38, the boot fails to boot as far as the version of the package used by Fedora IoT 37.

Reproducible: Always

Steps to Reproduce:
1. Flash Fedora IoT 38 to SD Card using -
`arm-image-installer --image=Fedora-IoT-38.raw.xz --target=roc-cc-rk3328 --media=/dev/sdb --selinux=off --resizefs
2. Insert SD Card into slot and power up board (I have a UART/TTL connection)
3. Wait for boot to fail
Actual Results:  
U-Boot 2023.04 (Apr 04 2023 - 00:00:00 +0000)

Model: Firefly roc-rk3328-cc
DRAM:  2 GiB
PMIC:  RK8050 (on=0x40, off=0x00)
Core:  226 devices, 22 uclasses, devicetree: separate
MMC:   mmc@ff500000: 1, mmc@ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial@ff130000
Out:   serial@ff130000
Err:   serial@ff130000
Model: Firefly roc-rk3328-cc
Net:   eth0: ethernet@ff540000
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found EFI removable media binary efi/boot/bootaa64.efi
966711 bytes read in 55 ms (16.8 MiB/s)
Card did not respond to voltage select! : -110
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Booting /efi\boot\bootaa64.efi
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
Unknown Relocation off 910543ff type f
LoadImage failed: Load Error
Device path: "VenHw(E61D73B9-A384-4ACC-AEAB-82E828F3628B)/Path(131,26,0x01000000831A0800)/Path(131,26,0x0000000084013000)/HD(1,MBR,0xC1748067)/\EFI\fedora\shimaa64.efi"
01 04 14 00 B9 73 1D E6 84 A3 CC 4A AE AB 82 E8 
28 F3 62 8B 03 1A 05 00 01 03 1A 05 00 00 04 01 
2A 00 01 00 00 00 00 08 00 00 00 00 00 00 00 A8 
0F 00 00 00 00 00 67 80 74 C1 00 00 00 00 00 00 
00 00 00 00 00 00 01 01 04 04 36 00 5C 00 45 00 
46 00 49 00 5C 00 66 00 65 00 64 00 6F 00 72 00 
61 00 5C 00 73 00 68 00 69 00 6D 00 61 00 61 00 
36 00 34 00 2E 00 65 00 66 00 69 00 00 00 7F FF 
04 00 

Expected Results:  
Expect to see the boot selection window for ostree

I used Fedora-IoT-38.20230419.2-20230419.2.aarch64.raw.xz

Comment 1 Charles Timko 2023-04-25 14:09:15 UTC
I should also add, I'm not entirely certain that this is the fault of u-boot or Fedora IoT and the way it sets up the partitions.

Comment 2 Peter Robinson 2023-04-25 14:11:01 UTC
(In reply to Charles Timko from comment #0)
> When attempting to boot the ROC-RK3328-CC Renegade into Fedora IoT 38, the
> boot fails to boot as far as the version of the package used by Fedora IoT
> 37.

I don't quite understand what you mean here, do you mean the version shipped with F-37 works properly, and 2023.04 does not? Does the version shipped with F-37 (2022.10 based) work to boot F-38?

Comment 3 Peter Robinson 2023-04-25 14:12:36 UTC
(In reply to Charles Timko from comment #1)
> I should also add, I'm not entirely certain that this is the fault of u-boot
> or Fedora IoT and the way it sets up the partitions.

Does a Fedora minimal aarch64 image work?

We did have some issues upstream with 2023.04 with various rockchip platforms but I had at least one rk3328 device report as working with the final 2023.04 build.

Comment 4 Charles Timko 2023-04-25 14:44:31 UTC
I will do some testing on both of those and report back.

Comment 5 Charles Timko 2023-04-25 15:59:30 UTC
If I use `arm-image-installer` to install the Fedora-Server-38 and then use the 2022.10 uboot, it actually boots up. I'll check to see if 2023.04 works later today during a break.

Comment 6 Charles Timko 2023-04-25 18:20:26 UTC
It looks like 2023.04 also boots the server image. There is something wrong somewhere else and not in u-boot. Thanks for your help.