Can I ask a question. Why are you using 3 Linux Data partitions on the ROCK3A EDK2 firmware?
It has me somewhat confused.
I am guessing these directories are related to the EDK2 build which I read from you that Linux was easier to build EDK2 with. Is that the case? These partitions contain the BIOS or associated files?
An image for Rock-3A based on 13.2 was created a long time ago
when a bug in the implementation of pcie in 14.0-current hasn't been fixed yet.
Using 14.0 and FDT mode was then not possible on the Rock-3A.
The CURRENT 14.0 images are recent and PCIe works correctly in them.
But I do not yet have a DTB file that I would be sure of for Rock-3A.
Most likely both files are wrong.
You need to take DTS files from Linux as a basis
dts/rockchip/rk3568-rock-3a.dts
1. The difficulty is that this device-tree version is not yet included in the 14.0 source code,
and it is an interesting task to create a DTB for Rock-3A for FreeBSD.
2. We can do otherwise, create a new version of UEFI for Rock-3A, now pcie30 can already work in it, which means direct launch of loader.efi(bootaa64.efi) from the EFI partition on NVMe will work.
After that, UEFI can be written to EMMc, and completely abandon the SD card.
I built a new version of UEFI for Rock-3A but haven't tested it yet.
We need to do both the first and second,
because so far UEFI has not implemented the simultaneous operation of pcie20 and pcie30.
And if we want both an NVMe and a WiFi card on the pcie20 bus to work on FreeBSD,
we need the correct DTB and 14.0 CURRENT in FDT mode.
Of course, when creating an SD card image or an image for EMMc, we need to take into account the features of the SoC RockChip. And the EFI partition must have a certain offset.
Writing UEFI to an SD card is done similarly to writing U-Boot, these are two separate files and two dd commands, and it is not necessary to arrange them as separate partitions on the SD card.
Bash:
#!/bin/sh
DISK_MD="da0"
EFI=ROCK-3A_EFI
URL="https://personalbsd.org/download/UEFI-RK356x"
UBOOT_BIN="idblock.bin"
UBOOT_PATH="/tmp"
fetch ${URL}/${UBOOT_BIN} -o ${UBOOT_PATH}/${UBOOT_BIN}
fetch ${URL}/${EFI}.itb -o ${UBOOT_PATH}/${EFI}.itb
rk356x_uefi_write () {
echo "Installing EDK2 on ${DISK_MD}"
if [ -f ${UBOOT_PATH}/${UBOOT_BIN} ]; then
dd if=${UBOOT_PATH}/idblock.bin of=/dev/${DISK_MD} bs=512 seek=64 conv=notrunc
dd if=${UBOOT_PATH}/${EFI}.itb of=/dev/${DISK_MD} bs=512 seek=20480 conv=notrunc
fi
}
# Insert SD card reader in to USB,
# uncomment next line an run
# rk356x_uefi_write