Das Problem mit dem Sound ist mit folgendem Kernel behoben
[root@quartz64 ~]# uname -a Linux quartz64 5.16.0-rc1-6-MANJARO-ARM #1 SMP PREEMPT Sun Nov 21 15:42:16 UTC 2021 aarch64 GNU/LinuxQuartz64 - dts File bearbeiten
-
ACHTUNG, nur was für erfahrene Nutzer. Beschädigungen der Hardware nicht ausgeschlossen!! Also, Hirn einschalten!!
Was ist das dts File?
Wenn ich das alles richtig verstanden habe, wird in diesem File das SBC hardwaremäßig definiert.
Beispiel
cpus { #address-cells = <0x02>; #size-cells = <0x00>; cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x00 0x00>; clocks = <0x02 0x00>; #cooling-cells = <0x02>; enable-method = "psci"; operating-points-v2 = <0x03>; cpu-supply = <0x04>; phandle = <0x06>; }; cpu@100 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x00 0x100>; #cooling-cells = <0x02>; enable-method = "psci"; operating-points-v2 = <0x03>; cpu-supply = <0x04>; phandle = <0x07>; }; cpu@200 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x00 0x200>; #cooling-cells = <0x02>; enable-method = "psci"; operating-points-v2 = <0x03>; cpu-supply = <0x04>; phandle = <0x08>; }; cpu@300 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x00 0x300>; #cooling-cells = <0x02>; enable-method = "psci"; operating-points-v2 = <0x03>; cpu-supply = <0x04>; phandle = <0x09>; };
Das File liegt bei der Benutzung des Manjaro Images unter /boot/dtbs/rockchip/ und hat folgenden Namen
rk3566-quartz64-a.dtb
Es gibt auch ein rk3566-quartz64-b.dtb, das aber im Moment nicht gebraucht wird da kein Quartz64 Typ B auf dem Markt ist. Soll noch kommen....
Ok, diese Files sind Binärfiles, das heißt wir können sie nicht einfach lesen, ändern und speichern. Dazu braucht man ein Tool mit dem Namen Device-Tree-Compiler - oder auch dtc
snapd
Ich habe für das Manjaro Image dieses Tool nicht gefunden, aber folgende Webseite
https://snapcraft.io/install/device-tree-compiler/manjaro
Also den snapd installiert
pacman -S snapd systemctl enable --now snapd.socket ln -s /var/lib/snapd/snap /snap snap install device-tree-compiler
Danach kann man das Tool dtc benutzen
[root@quartz64 ~]# dtc WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement ^X^C [root@quartz64 ~]# dtc --help WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement Usage: dtc [options] <input file> Options: -[qI:O:o:V:d:R:S:p:a:fb:i:H:sW:E:@AThv] -q, --quiet Quiet: -q suppress warnings, -qq errors, -qqq all -I, --in-format <arg> Input formats are: dts - device tree source text dtb - device tree blob fs - /proc/device-tree style directory -o, --out <arg> Output file [..gekürzt..]
Dann kopiert man sich das .dts mal irgendwo hin, sicher ist sicher
Nun wandeln wir das File in ein lesbares Format um.
dtc -I dtb -O dts -o /root/testfile.dts /root/rk3566-quartz64-a.dtb
- -I dtb - Input format
- -O dts - Output format
- -o - Output file
- und am Ende das Sourcefile
Für mich etwas seltsamer Aufbau, so das ich immer durcheinander komme. Für mich wäre Quelle -> Ziel logischer. Aber gut, so schreibe ich das mal wieder hier hin, damit ich es beim nächsten Mal nachlesen kann.
Wir bekommen ein File mit dem Namen testfile.dts
.dts steht für Source File
.dtb steht für Binär FileDieses File ist ein ganz normales Textfile, was wir nun lesen, ändern und speichern können.
pmu { compatible = "arm,cortex-a55-pmu"; interrupts = <0x00 0xe4 0x04 0x00 0xe5 0x04 0x00 0xe6 0x04 0x00 0xe7 0x04>; interrupt-affinity = <0x06 0x07 0x08 0x09>; }; psci { compatible = "arm,psci-1.0"; method = "smc"; }; timer { compatible = "arm,armv8-timer"; interrupts = <0x01 0x0d 0x04 0x01 0x0e 0x04 0x01 0x0b 0x04 0x01 0x0a 0x04>; arm,no-tick-in-suspend; }; xin24m { compatible = "fixed-clock"; clock-frequency = <0x16e3600>; clock-output-names = "xin24m"; #clock-cells = <0x00>; phandle = <0xa8>; }; xin32k { compatible = "fixed-clock"; clock-frequency = <0x8000>; clock-output-names = "xin32k"; pinctrl-0 = <0x0a>; pinctrl-names = "default"; #clock-cells = <0x00>; phandle = <0xa9>; }; sram@10f000 { compatible = "mmio-sram"; reg = <0x00 0x10f000 0x00 0x100>; #address-cells = <0x01>; #size-cells = <0x01>; ranges = <0x00 0x00 0x10f000 0x100>; sram@0 { compatible = "arm,scmi-shmem"; reg = <0x00 0x100>; phandle = <0x05>; }; }; sata@fc400000 { compatible = "snps,dwc-ahci"; reg = <0x00 0xfc400000 0x00 0x1000>; clocks = <0x0b 0x9b 0x0b 0x9c 0x0b 0x9d>; clock-names = "sata\0pmalive\0rxoob"; interrupts = <0x00 0x5f 0x04>; interrupt-names = "hostc"; phys = <0x0c 0x01>; phy-names = "sata-phy"; ports-implemented = <0x01>; power-domains = <0x0d 0x0f>; status = "okay"; phandle = <0xaa>; };
wird fortgesetzt....
-
Teil 2
Wir wollen aus dem Souce-File wieder ein .dtb machen.
dtc -I dts -O dtb -o /root/testfile.dtb /root/testfile.dts
- -I dts - Input format
- -O dtb - Output format
- -o - Output file
- und am Ende das Sourcefile
Wir drehen die beiden Parameter -I und -O um und passen die Files an. Danach kommen ganz viele Warnungen, so was hier
/root/testfile.dts:1119.3-56: Warning (clocks_property): /mmc@fe2b0000:clocks: cell 0 is not a phandle reference /root/testfile.dts:1119.3-56: Warning (clocks_property): /mmc@fe2b0000:clocks: cell 2 is not a phandle reference
Aber, da fehlen mir die Kenntnisse um beurteilen zu können, ob das funktioniert.
-
Ich weiß nicht, wonach ich gesucht habe, vermutlich nach
apt install device-tree-compiler
das gibt es im Manjaro Image nicht, es heißt ganz einfach dtc
Also, ganz einfach mit
pacman -S dtc
installieren. Dann kann man sich diesen Umweg mit snapd sparen.