How do I persist Devicetree with OrangePi5 Plus on MicroOS

I have a k3s cluster running on 3 Orange Pi 5 Plus systems and MicroOS. I have installed EDK2 and it all works wonderfully. Thank you!

I want to use the NPUs on the rk3588 and they do not seem to be detected. I have fixed this by installing: dtb-rockchip-7.1.4-1.1.aarch64. I copied the rk3588-orange-pi-5-plus.dtb from /boot/dtb/ in to /boot/efi/dtbs/rk3588-orange-pi-5-plus.dtb and then I created a new file in /boot/efi/loader/entries called npu.conf by copying the newest entry and added the line:
devicetree /dtbs/rk3588-orangepi-5-plus.dtb

It works. I can boot in to that, the rocket drivce is detected and installed:

[    6.549533] [    T575] [drm] Initialized rocket 0.0.0 for rknn on minor 0
[    6.549737] [    T575] rocket fdab0000.npu: Rockchip NPU core 0 version: 1179210309
[    6.550650] [    T575] rocket fdac0000.npu: Rockchip NPU core 1 version: 1179210309
[    6.552300] [    T575] rocket fdad0000.npu: Rockchip NPU core 2 version: 1179210309

I have device nodes in /dev/accel.

Is there a proper fix for this so that it’s automatic? I expect a new 7.1.5 kernel in the coming weeks. Will I have to make a new entry and make sure files are installed in to the right places in the efi partition? Or is there a way to sort of make this work going forward?

There is a make devicetree or make dtb in the kernel. You need to match to version, you can’t take it from build and apply to diff rev.

dtb-rockchip appears to be matched to the kernel version. I just want to get systemd-boot to add it to the entries automatically each time there is a new kernel

Does orangepi5 use uboot?

Seems like there’s a way to load devicetree from there similar to how rpi5 does it

I’m using MicroOS mainline which uses systemd-boot.

It looks like /usr/lib/kernel/install.d/90-loaderentry.install Has some logic to do what is needed, I just need to reverse engineer it and figure out how to make it do it

You should log into IRC or Matrix and join the ARM room and ask there…

I found the solution.

echo 'DEVICETREE_SOURCE="/boot/dtb-%V/rockchip/rk3588-orangepi-5-plus.dtb"' >> /etc/default/sdbootutil

Putting it here for future googlers and this thread can be closed.