1:29 PM
4
Q: Is there a guide on porting edk2 to a new ARM64 platform?

bruinI am new to EDK2. For porting ekd2 firmware to a new ARM64 platform, it would be good to first get a minimum edk2 port which can run UEFI Shell at least, improvements can be added gradually based on that. It seems that the first step is rather steep, e.g., how to determine a minimal set of "items"...

 
Hello, I am very interested in your post because I am doing the same project like that. Can you give me your contact (email, LinkedIn, Facebook, etc.) ? I would like to discuss with you more. Thanks a lot!
I really need your help, please response me when you see this comment. Thanks!
 
Hi, @Vietnamese. I am glad that you find the thread of interest. Unfortunately, I did not continue on this subject (EDK2) since then ... it was more than 2 years ago, and I almost forget the details...
 
Did you finally succeed in creating EDK2 Firmware for your platform? Which platform did you work with?
Did you succeed with this method?
 
Yes, I handled over the work to another engineer who made the system work based on my work posted here. We were working on a proprietary platform based on A76.
 
Could you give me the contact information of the engineer that you mentioned? Thank you very much!
If possible, could you give me the documents that note what you did with this subject? Thank you very much!
Please help me :( I am in a mess and do not find the solution
 
1:29 PM
Well, that's what I can do for you: <github.com/xiongyw/docs/commit/…>. I wish I did not touch EDK2, as it's really hard...
 
Do you remember how did you enter into shell boot? Did you use the keyboard of PC host or keyboard connected by USB to press the button F1?
 
IIRC, I entered the shell via UART for the first time. Btw, it seems that EDK2 presents the shell to both UART and graphics display (if present) at the same time.
 
So did you write UART for your platform? Can you precise me how to use UART to receive letter entered from keyboard? I tried to enter on RPi4, RPi3 and my platform too but it does not work. Perhaps because I do not how to configure it to work
 
In my notes on github: 1. search "Customize platform-specific drivers", the first driver is UART (SerialPortLib). This is where how to port UART for my platform, which happens to have a DWC UART controller; 2. search "How to boot into UEFI Shell?", you will see how to enter the shell via UART once you see BdsWait....
 
I think I customized well the UART-TX so that I could send the message to my PC host through minicom but I did not customize well UART-RX so that it can receive the message from my PC host. However, I still don't understand why I can not use UART from my PC host to choose options ESC (setup), F1 (shell), ENTER (boot) for Raspberry Pi. Did you try to use UART for RPi?
 
1:29 PM
If your UART-RX EDK2 porting is not working well, it's not a surprise that EDK2 cannot response correctly with your inputs from PC host; IIRC, I only used UART on RPi4.
 
How did you use UART on RPi4? This means that what tool you use to connect with RPi4? For example, I use Minicom USB and connect with 3 pins (RX, TX and GND) of RPi4
I found my problem, it is due to minicom. I tried gtkterm and I could use UART-RX of RPi4. Thanks a lot
Did you have error that the boot process stop at [Bds]BdsWait(5)..Zzzz...?
When I come to here, the while loop does not work and it stops
 
2:28 PM
Do you know why?

[Bds] Entry...
[BdsDxe] Locate Variable Policy protocol - Success
DXE - Total Runtime Image Count: 0x7
DXE - Dump Runtime Image Records:
MonotonicCounterRuntimeDxe.efi: 0x1070B0000 - 0x1070E0000
Code Section: 0x1070C0000 - 0x1070D0000
CapsuleRuntimeDxe.efi: 0x1070F0000 - 0x107120000
Code Section: 0x107100000 - 0x107110000
RealTimeClock.efi: 0x107130000 - 0x107160000
Code Section: 0x107140000 - 0x107150000
VariableRuntimeDxe.efi: 0x107190000 - 0x1071D0000
Code Section: 0x1071A0000 - 0x1071B0000
Is it an error?
 
 
2 hours later…
4:15 PM
Ah no, it is not an error