Skip to content

Quartz64 - dts File bearbeiten

Angeheftet Verschoben Quartz64
  • 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
    

    oder

      rk3566-quartz64-b.dtb
    

    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

    Installiert man unter Manjaro mit

    pacman -S dtc
    

    Dann kopiert man sich das .dtb mal irgendwo hin, sicher ist sicher 😉

    cp /boot/dtbs/rockchip/rk3566-quartz64-b.dtb /root
    

    Nun wandeln wir das File in ein lesbares Format um.

    dtc -I dtb -O dts -o /root/testfile.dts /root/rk3566-quartz64-b.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 File

    Dieses 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/rk3566-quartz64-b.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.

    Zum Schluss kopiert man das fertig geändert .dtb wieder in den /boot Ordner.

    cp /root/rk3566-quartz64-b.dtb /boot/dtbs/rockchip/
    

    Das Bord neustarten und hoffen 🙂

  • 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.

  • FrankMF FrankM verschob dieses Thema von Quartz64 am
  • FrankMF FrankM verschob dieses Thema von Quartz64 - A am
  • FrankMF FrankM hat dieses Thema am angepinnt

  • PHP - ChatGPT

    PHP
    1
    0 Stimmen
    1 Beiträge
    69 Aufrufe
    Niemand hat geantwortet
  • Armbian Images

    Armbian
    1
    0 Stimmen
    1 Beiträge
    256 Aufrufe
    Niemand hat geantwortet
  • LUKS verschlüsselte Platte mounten

    Linux
    2
    0 Stimmen
    2 Beiträge
    652 Aufrufe
    FrankMF

    So, jetzt das ganze noch einen Ticken komplizierter 🙂

    Ich habe ja heute, für eine Neuinstallation von Ubuntu 20.04 Focal eine zweite NVMe SSD eingebaut. Meinen Bericht zu dem Thema findet ihr hier. Aber, darum soll es jetzt hier nicht gehen.

    Wir haben jetzt zwei verschlüsselte Ubuntu NVMe SSD Riegel im System. Jetzt klappt die ganze Sache da oben nicht mehr. Es kommt immer einen Fehlermeldung.

    unbekannter Dateisystemtyp „LVM2_member“.

    Ok, kurz googlen und dann findet man heraus, das es nicht klappen kann, weil beide LVM Gruppen, den selben Namen benutzen.

    root@frank-MS-7C37:/mnt/crypthome/root# vgdisplay --- Volume group --- VG Name vgubuntu2 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 1 Max PV 0 Cur PV 1 Act PV 1 VG Size <464,53 GiB PE Size 4,00 MiB Total PE 118919 Alloc PE / Size 118919 / <464,53 GiB Free PE / Size 0 / 0 VG UUID lpZxyv-cNOS-ld2L-XgvG-QILa-caHS-AaIC3A --- Volume group --- VG Name vgubuntu System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size <475,71 GiB PE Size 4,00 MiB Total PE 121781 Alloc PE / Size 121781 / <475,71 GiB Free PE / Size 0 / 0 VG UUID jRYTXL-zjpY-lYr6-KODT-u0LJ-9fYf-YVDna7

    Hier oben sieht man das schon mit geändertem Namen. Der VG Name muss unterschiedlich sein. Auch dafür gibt es ein Tool.

    root@frank-MS-7C37:/mnt/crypthome/root# vgrename --help vgrename - Rename a volume group Rename a VG. vgrename VG VG_new [ COMMON_OPTIONS ] Rename a VG by specifying the VG UUID. vgrename String VG_new [ COMMON_OPTIONS ] Common options for command: [ -A|--autobackup y|n ] [ -f|--force ] [ --reportformat basic|json ] Common options for lvm: [ -d|--debug ] [ -h|--help ] [ -q|--quiet ] [ -v|--verbose ] [ -y|--yes ] [ -t|--test ] [ --commandprofile String ] [ --config String ] [ --driverloaded y|n ] [ --nolocking ] [ --lockopt String ] [ --longhelp ] [ --profile String ] [ --version ] Use --longhelp to show all options and advanced commands.

    Das muss dann so aussehen!

    vgrename lpZxyv-cNOS-ld2L-XgvG-QILa-caHS-AaIC3A vgubuntu2 ACHTUNG Es kann zu Datenverlust kommen, also wie immer, Hirn einschalten!

    Ich weiß, das die erste eingebaute Platte mit der Nummer /dev/nvme0n1 geführt wird. Die zweite, heute verbaute, hört dann auf den Namen /dev/nvme1n1. Die darf ich nicht anpacken, weil sonst das System nicht mehr startet.

    /etc/fstab

    # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> /dev/mapper/vgubuntu-root / ext4 errors=remount-ro 0 1 # /boot was on /dev/nvme1n1p2 during installation UUID=178c7e51-a1d7-4ead-bbdf-a956eb7b754f /boot ext4 defaults 0 2 # /boot/efi was on /dev/nvme0n1p1 during installation UUID=7416-4553 /boot/efi vfat umask=0077 0 1 /dev/mapper/vgubuntu-swap_1 none swap sw 0 0

    Jo, wenn jetzt die Partition /dev/mapper/vgubuntu2-root / anstatt /dev/mapper/vgubuntu-root / heißt läuft nichts mehr. Nur um das zu verdeutlichen, auch das könnte man problemlos reparieren. Aber, ich möchte nur warnen!!

    Nachdem die Änderung durchgeführt wurde, habe ich den Rechner neugestartet. Puuh, Glück gehabt, richtige NVMe SSD erwischt 🙂

    Festplatte /dev/mapper/vgubuntu2-root: 463,58 GiB, 497754832896 Bytes, 972177408 Sektoren Einheiten: Sektoren von 1 * 512 = 512 Bytes Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes

    Nun können wir die Platte ganz normal, wie oben beschrieben, mounten. Nun kann ich noch ein paar Dinge kopieren 😉

  • SCP mit IPv6 nutzen

    Linux
    1
    0 Stimmen
    1 Beiträge
    203 Aufrufe
    Niemand hat geantwortet
  • Restic - Ein Backupkonzept

    Angeheftet Restic
    1
    0 Stimmen
    1 Beiträge
    1k Aufrufe
    Niemand hat geantwortet
  • 0 Stimmen
    1 Beiträge
    774 Aufrufe
    Niemand hat geantwortet
  • NodeBB - nach Plugin platt

    NodeBB
    1
    0 Stimmen
    1 Beiträge
    583 Aufrufe
    Niemand hat geantwortet
  • NodeBB - Update

    NodeBB
    1
    0 Stimmen
    1 Beiträge
    659 Aufrufe
    Niemand hat geantwortet