-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Locked out of mtdblock edk2 updates on orangepi 5 plus #140
Comments
You need to use a DTB compatible with your kernel version. The one bundled with the firmware only works along Rockchip's SDK kernel. Updating the firmware on SPI NOR is not currently supported with ACPI boot, so you'd have to use a separate computer. |
OK, so let me have another go at this. Just to be clear, when you say "you need to use a DTB compatible with your kernel version" what do you mean precisely? Are you talking about https://github.com/edk2-porting/edk2-rk3588?tab=readme-ov-file#custom-device-tree-blob-dtb-override-and-overlays? |
Yes. |
OK, thanks. So I actually have tried doing that but the system crashes and I cannot really see where. Initially it seemed to crash when accessing my nvme SATA 5 ports card but I will have to test again. |
It needs to be placed in the same partition as the bootloader, that is the FAT32 EFI System Partition.
Yes, the firmware only looks in that specific location. You could probably load the DTB from another path with Grub instead. |
Thanks, I was able to move on by using a separate computer. |
EDK2 vs U-Boot is just a matter of preference in this case, either will do provided you use a compatible device tree. I am not up-to-date on the mainlining efforts, but the plan is to eventually include mainline DTBs for a few of the supported boards in EDK2, which would greatly simplify booting off-the-shelf distro images. |
This is interesting. Are you actually testing it? And who's going to declare that a board is "supported"? From what I see the level of "support" is never black and white... Are you going to provide both a mainline DTB and a legacy one? |
Yeah, I'd need to test a few distros that have recent enough kernel by that time. So Fedora would be a candidate.
"Supported" in the sense that I have validated it to boot and has reasonable functionality (goal is better than ACPI). For this, I am only going to pick popular boards that have decent mainline support. Still missing functionality in Linux falls outside the scope of this project. Mainline DTBs will only be provided for convenience.
True. As soon as you leave Rockchip's legacy BSP, your mileage will greatly vary. Since most board vendors don't care about investing in mainline, proper firmware, etc, users are at the mercy of community support (i.e. if it even exists for the board in question). This has always been the case with SBCs.
Yes, that's the plan. |
So, 6.10.0rc1 exists on koji and I tried to run it. However (as I kind of expected) while panthor is compiled, is not loaded and if I try force loading it it doesn't get used. |
SATA likely needs a DT overlay. See: https://github.com/edk2-porting/edk2-rk3588?tab=readme-ov-file#device-tree-configuration for more info. |
You mean something like this? But for the pcie3 nvme slot? And in my case (I'm just trying here...):
Or maybe just:
|
Hello @mariobalanica . I did not make any progress here, can you help me? Can you suggest where to look for a device tree overlay that will work with my JMB585 based m.2 adapter? Right now I either stay in ACPI mode with no access to emmc/sd cards and more (that while working well enough for my uses seems to be clearly a dead end) or I have a device that boots but dies as soon as it tries to activate the SATA disks using DTB mode.. |
So you're trying to use a PCIe SATA adapter on the bottom M.2 slot? In this case you don't need any overlay. Are you using a DTB that matches the kernel version? The included DTB most certainly won't work properly with mainline kernels. |
I am, and it works fine in ACPI mode but in that case I cannot use sd cards or emmc and I cannot access the SPI memory, making managing boot loaders and stuff a big PITA. Yes, I tried the DTB included in Fedora rawhide latest, but as I said it boots and it seems to die when it tries accessing the SATA device. |
Please attach full dmesg here. |
I need to connect the serial console. It will take a bit of time. One more thing... do you think that 0.10 will change anything compared to 0.9.1+ that I'm using currently? |
No. If it works in ACPI mode but not DT, then it's either an issue with the RK PCIe driver in Linux or something missing in the device tree itself. |
Here's a fresh capture of the serial console output, hope it helps. By the way, I was wrong when I said that the system would crash. What I think it happens is that the SATA disks are simply not found and fedora waits forever for the boot SATA disk. Also, the green lights in the controller board are green during boot but at some point they go off. That's what made me think that linux had crashed. |
Finally, the difference between this failed boot and a working one is me adding GRUB_DEFAULT_DTB=dtb/rockchip/rk3588-orangepi-5-plus.dtb in /etc/default/grub If I remove the resulting devicetree=... line from the grub menu, the system boots. The fact that I see no mention of loading rk3588-orangepi-5-plus.dtb in the capture.txt is disappointing but I am no expert of device tree loading... |
You're still booting in ACPI mode:
See https://github.com/edk2-porting/edk2-rk3588?tab=readme-ov-file#device-tree-configuration for how to configure the firmware to boot using DTB (and override the internal one with a copy from mainline). Once that's done, it should print to the serial console that ACPI is disabled and later on (after selecting the boot option) the DTB file path. |
Ah, nevermind. I see Linux booted successfully with DTB (passed by Grub?) However, the PCIe controllers are not being loaded: Sounds like the DTB is missing something regarding the PHYs or the kernel modules are not there. That would be a question for the folks involved in rk3588 upstreaming and/or the person who worked on adding OPi 5 Plus support, as it's not a firmware issue. |
Ah, that's the breakthrough I was hoping for. Thanks very much for it. |
It's part of the SoC, but each board can route things slightly differently.
I'm judging by the devices being loaded (e.g. I don't know if it's possible to make Grub more verbose in this regard. But if you use the documented firmware DTB override facility instead, it will print which file got loaded precisely. Note that this is completely pointless if you still have any |
I am using Fedora 40/rawhide on my orangepi 5 plus after having installed edk2 on the mtdblock device (latest nightly release version in order to get a working keyboard).
I can't update the firmware anymore because fedora doesn't see any mtd devices (using ACPI, it won't work, that's understood) and if I try using dtb the system just fails rebooting. Do you have a suggestion on how to break the deadlock?
The text was updated successfully, but these errors were encountered: