Skip to content
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

EDK2 on Rock5B #7337

Open
isarrider opened this issue Dec 30, 2024 · 15 comments
Open

EDK2 on Rock5B #7337

isarrider opened this issue Dec 30, 2024 · 15 comments

Comments

@isarrider
Copy link

Hi,

I would like to try this out with a mainline kernel...
https://github.com/edk2-porting/edk2-rk3588
Is there an easy way to switch to the latest mainline kernel?
(I guess that would be the latest Debian Mainline Arm64 Kernel)...

Has anyone experimented with it?

BR,
Alex

@MichaIng
Copy link
Owner

MichaIng commented Dec 31, 2024

I did not try it yet, but the latest rockchip64 edge kernel should work (the "current" one as well, now that it is Linux 6.12), though with limited features. There is a recent build: https://dietpi.com/downloads/binaries/testing/

You need the image and dtb packages both. And verify that /boot/dietpiEnv.txt defines an existing device trees via fdtfile= line, check in /boot/dtb/rockchip which one matches. They might be named differently between mainline and vendor kernel.

Debian kernel is too old, and too genetic as well.

@isarrider
Copy link
Author

By "current" you mean when I freshly download the latest Rock5 Image?

@isarrider
Copy link
Author

Maybe I should test that on my current Rock5C quickly...
(The latest current ones from your link)

@isarrider
Copy link
Author

I must be doing sth wrong - my Rock5C wont come up again...

@MichaIng
Copy link
Owner

MichaIng commented Jan 1, 2025

I mean like that:

cd /tmp
wget https://dietpi.com/downloads/binaries/linux-{dtb,image}-current-rockchip64.deb
dpkg -i linux-{dtb,image}-current-rockchip64.deb

Then check the name of the correct device tree:

ls -l /boot/dtb/rockchip

and assure it matches the one in dietpiEnv.txt:

nano /boot/dietpiEnv.txt

Since this kernel is a major/LTS version upgrade 6.6 => 6.12, I did not push it to our APT server yet. I want to test it on all my Rockchip SBCs first, as there have almost always been problems the first weeks.

@isarrider
Copy link
Author

Thats basically what I did but to be sure I did exactly these steps again...
It wont come up again...
(and happy new year)!

@MichaIng
Copy link
Owner

MichaIng commented Jan 2, 2025

Happy New Year to you as well 🙂 🥳 !

Do you have a USB-UART adapter to check serial console logs? The device tree is the same.

One thing I just recognised is that the serial console surely won't be ttyFIQ0 anymore, but likely ttyS2. That would need to be adjusted in /boot/dietpiEnv.txt as well. It may break as well bootloader output, but it should not break boot.

But maybe the vendor bootloader is not compatible with the mainline kernel for some other reason.

I am building an image with mainline kernel and bootloader: https://github.com/MichaIng/DietPi/actions/runs/12581152457
Can be found here, once done: https://dietpi.com/downloads/images/testing/

@isarrider
Copy link
Author

Let me give that a try later...
Would you be able to do one for my Rock5c too
(so means a Rock5A build)?
That one is already setup to use...

@isarrider
Copy link
Author

and my UART debugging days are long over ;)

@isarrider
Copy link
Author

Ok, didnt wanna be lazy, the image you provided comes up nicely on my Rock5B...
Pulls 1 update, the armbian firmware...

@isarrider
Copy link
Author

little weird is the constant disk write reported by htop:

image

@isarrider
Copy link
Author

seems the I/O went away now...

@MichaIng
Copy link
Owner

MichaIng commented Jan 3, 2025

I guess the disk I/O was the kernel, writing the write buffer to disk.

Okay so far so great, many thanks for testing. Do you still have the old vendor kernel image? I wonder whether really the bootloader was the issue, i.e. whether we can offer a migration for all RK3588 SBCs at some point. Armbian offers images with this kernel for at least most of them already, so major issues should show up soon. Some features will be missing, like NPU and hardware acceleration will be gone, though the latter requires usually panfork/unofficial Mesa libs and software specifically compiled against those, which is easily available on Ubuntu only (there is a PPA). Also overlays are missing, like those to switch the M.2 SSD port from NVMe to SATA and such. An idea would be to do the other way round: offer images with mainline Linux, but keep vendor kernel in repo for those who needs missing hardware features, in case mainline U-Boot does support the vendor kernel.

At least I'll build all mainline kernel and bootloader packages for all RK3588 boards now and push them to the APT repo, to make testing them + the migration easier.

@isarrider
Copy link
Author

Well - first of all its more like thank YOU - I did basically nth ;)
I dont have the old image anymore...
Regarding your idea - as mainline will get more and more features and fixes,
I would prefer it that way (Offer mainline images and who needs sth should get the vendor kernel).
Happy to test also on my Rock 4C (I like this board price/perf wise a lot)...

@isarrider
Copy link
Author

In the coming days I hope to be able to test the UARTs,
sth that I would need to read out my Smart Meter...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants