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

DTC not working on RK3588 5.10.xxx #194

Open
NicoD-SBC opened this issue Jun 13, 2023 · 7 comments
Open

DTC not working on RK3588 5.10.xxx #194

NicoD-SBC opened this issue Jun 13, 2023 · 7 comments

Comments

@NicoD-SBC
Copy link

When going to System -> DTC on the RK3588 then you only get an empty nano window.
Using the Mekotronics R58 Mini with Armbian Jammy Gnome 5.10.160-rockchip-rk3588
This is what messages I get.

SoC manufacturer: rockchip
board name: rk3588-hugsun-minipc-linux
FATAL ERROR: Couldn't open "": No such file or directory
stat: cannot statx '/tmp/tmp.8A9CyDcpFo/current.dts': No such file or directory
stat: cannot statx '/tmp/tmp.8A9CyDcpFo/current.dts': No such file or directory
Do you want to edit the device tree again? (y/n)
@igorpecovnik
Copy link
Member

Can you try again after installing dtc;
sudo apt install device-tree-compiler

@NicoD-SBC
Copy link
Author

NicoD-SBC commented Jun 13, 2023

Can you try again after installing dtc; sudo apt install device-tree-compiler

nicod@mekotronics-r58-minipc:~$
sudo apt install device-tree-compiler
[sudo] password for nicod:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
device-tree-compiler is already the newest version (1.6.1-1).

@igorpecovnik
Copy link
Member

Not a trivial solution then :(

@rpardini
Copy link
Member

Confirmed. The "DTC" editing code in armbian-config was introduced here #123 and lives mostly here https://github.com/armbian/config/blame/ed8fe64aae4bbf3e6cf775ff26b6ebb6c0c8d129/debian-config-jobs#L1519-L1647

@igorpecovnik it already does install dtc if not installed.

This code is trying to read the compatible from /proc/device-tree/compatible, find/compute the soc_manufacturer from that, then find the board based on ?, and find the DTB file that is actually used via glob matches. This is very error prone...

As we can see from @NicoD-SBC's logs, with the rk3588 legacy kernel (and probably many, many others) the compatible doesn't match, errors are ignored (as always in armbian-config), everything fails but an editor opens with an empty file.

Sincerely we should drop all this, read /boot/armbianEnv.txt for the fdtfile= which will get us directly to the .dtb that is in use. (for extlinux, parse /boot/extlinux/extlinux.conf for the first fdt stanza amounts to the same).

@rpardini
Copy link
Member

Alternatively: we can get the running DT blob (whatever it is, wherever it comes from) via

dtc -I fs /sys/firmware/devicetree/base

@rpardini
Copy link
Member

@jeanrhum what do you think?

@jeanrhum
Copy link
Contributor

@rpardini Sorry for answering late. I was very busy the last months...
I agree that using the extconf fdt field info is better. However, if I remember well some (old supported) boards was not using this file when I wrote this code (but maybe I am wrong).
If all officially supported boards now use this file to specify the dtb, I think that the modification you suggest should be used.

I can try to update the code in this way, but I haven't any rk3588 board to test it. I'll only test on my boards based on other socs (Allwinner h3 h6, Amlogic s805x a311d, Rockchip rk3328 rk3399).

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

No branches or pull requests

4 participants