Skip to content

[HOWTO] ROCKPro64 - Boot

Verschoben Hardware
  • Im IRC von Pine64 bekomme ich die letzten Tage immer wieder mit, das die Leute Schwierigkeiten haben ihren ROCK64 zu booten. Da es auf dem ROCKPro64 genauso läuft, möchte ich hier mal eine kleine Anleitung dazu schreiben.

    0_1527157167158_IMG_20180523_111136.jpg
    Ob der ROCKPro64 auch davon booten kann werden wir dann zu einem späteren Zeitpunkt testen. Aktuell funktioniert die PCIe Schnittstelle noch nicht.

    Fangen wir an damit, was auf den ROCK's vorhanden ist.

    Some of PINE64 devices, such as the Rock64 and SOPine, are equipped with SPI Flash. This allows users to flash u-boot onto the SPI and boot from an external USB 2.0 or USB 3.0 SSD/HDD/thumb-drive, thereby forgoing using eMMC or an microSD card.
    Quelle: http://wiki.pine64.org/index.php/NOOB#Flashing_u-boot_to_SPI_Flash

    Kurze Erklärung:

    Serial EEPROMs are low power, non-volatile memory devices with robust operating ranges, small size and byte alterability, making them ideal for data and program storage. Serial EEPROMs can be written more than 1 Million times.
    Quelle: https://www.microchip.com/design-centers/memory

    Also für Laien, so ähnlich wie Euer BIOS in einem normalen Rechner. Dort liegt dann der u-boot, das Bootprogramm. Vorteil, man braucht dann keine SD-Karte mehr zum Booten, sondern kann direkt von z.B. einer HDD oder SDD booten.

    Boot Reihenfolge:

    • SPI flash
    • eMMC (disable with jumper)
    • microSD
    • USB drive
    • PXE

    Gut, damit haben wir einen Überblick wie das Booten auf den ROCK's so vonstatten geht. Im Auslieferungszustand ist im SPI-Speicher nichts drin. Somit kann ich ganz einfach mit einer microSD-Karte oder einer eMMC-Karte booten.

    Wichtig! Der aktuelle U-Boot unterstützt kein booten von einer PCIe Festplatte!


    microSD-Karte / eMMC-Karte

    Sicherstellen, das der SPI-Speicher leer ist! Wenn man das nicht zu 100% weiß, kann man ein Tool vom Ayufan benutzen um den SPI-Speicher zu löschen.

    https://forum.frank-mankel.org/category/19/tools

    Ob das Aktuell auf dem ROCKPro64 funktioniert, kann ich nicht bestätigen Das Tool funktioniert!

    Danach das Image auf die Karte schreiben, dazu kann man gut den Pine64-Installer benutzen. Der Pine64-Installer ist ein Fork von Etcher. Großer Vorteil von Etcher ist, das man sehr schwer versehentlich das falsche Laufwerk flasht und das das Ergebnis kontrolliert wird. Und viele weitere Vorteile.

    Dann die microSD-Karte in den Schacht und das Board damit booten.


    USB Laufwerk

    Um ein USB-Laufwerk zu booten, benutzt man jetzt den SPI-Speicher und schreibt dort den u-boot rein. Dann kommt auf die USB Platte das Linuxsystem und beim nächsten Start des ROCKPro64 wird dann von der Platte gestartet.

    Um den u-boot in den SPI-Speicher zu bekommen, gibt es ein Tool.

    https://forum.frank-mankel.org/category/19/tools

    Ob das Aktuell auf dem ROCKPro64 funktioniert, kann ich nicht bestätigen Das Tool funktioniert!

    Auf eine microSD-Karte damit, den ROCK gebootet und das Tool schreibt den u-boot in den SPI-Speicher.

    Danach microSD-Karte entfernen, eMMC-Karte entfernen und die vorbereitete USB-Platte anschließen. Auf dieser Platte muss ein Linuxsystem drauf sein. Also, z.B. mit Etcher das Image auf das Laufwerk schreiben.

    Danach den ROCK einschalten und schauen was passiert 🙂


    PXE Boot

    PXE bezeichnet dabei den Vorgang, um mit Hilfe einer PXE-fähigen Netzwerkkarte via DHCP eine Netzwerkkonfiguration (IP-Adresse, Adresse eines TFTP-Servers, ...) zu erhalten, und anschließend vom TFTP-Server einen Bootloader zu laden und auszuführen.

    Ok, das Thema überlassen wir mal den Profis, die werden schon wissen wie man das zum Laufen bekommt. Für uns Hobbybastler wahrscheinlich auch nicht so interessant.


    Wichtig

    Für mich sehr wichtig, egal was ich an den kleinen Platinen mache, eine serielle Konsole wo man alles mitlesen kann was so passiert. Also, so ziemlich das Wichtigste, wenn mal was klemmt.

    0_1527157138727_konsole.png

    Zur seriellen Konsole bitte hier nachlesen.


    Quellen

    https://github.com/ayufan-rock64/linux-build/blob/master/recipes/flash-spi.md

  • Mal ein paar Dinge aufschreiben zum Thema.

    Aktuell ist kein Booten von einer PCIe SSD möglich. Der U-Boot unterstützt das zur Zeit nicht! Schade 😞

    SPI Erase scheint zu funktionieren, aber Fehler bei den LED's
    SPI Flash funktioniert nicht

    18:49:37) tllim: the RK SPI Flash implementation is EFI and they will make an open source release.

    Das heißt, aktuell kann man nur von SD-Karte oder eMMC booten. Wobei eMMC, so weit ich weiß, nicht getestet ist.

  • Als kurze Ergänzung. Mittlerweile kann man von

    • SD-Karte
    • eMMC
    • USB2
    • PXE (nicht getestet)

    booten. USB3 funktioniert aus irgendeinem Grund nicht. On man mal von einer PCIe NVMe SSD oder einer PCIe SATA HDD booten kann, wird die Zukunft zeigen. Aktuell unterstützt der u-boot das nicht.

  • Von eMMC unter Mainline kann man im Moment nicht booten. Es besteht aber Hoffnung, das man das Problem gelöst bekommt. Mit diesem Patch geht es.

  • Das Problem sollte mit Kernel 4.19.0-rc4-1069-ayufan behoben sein.

  • linux-mainline-u-boot

    Angeheftet Images
    2
    0 Stimmen
    2 Beiträge
    349 Aufrufe
    FrankMF

    2020.01-ayufan-2014-gff2cdd38 released

    ayufan: rockchip: allow to boot scsi4, as JMS585 can have 5 drives
  • ROCKPro64 Übersicht - was geht?

    ROCKPro64
    4
    0 Stimmen
    4 Beiträge
    587 Aufrufe
    FrankMF
    WIFI

    Seit dem Release des Images 0.7.13 ist WiFi auch möglich. Weiterhin ungelöst ist das Problem PCIe & WiFi (also bei mir).

  • USB-SSD Boot klappt nicht

    Hardware
    14
    0 Stimmen
    14 Beiträge
    2k Aufrufe
    M

    Dann nochmals vielen Dank!

  • 0 Stimmen
    3 Beiträge
    2k Aufrufe
    FrankMF

    Echtes Problem gefunden.

    Wenn die eMMC-Karte verbaut ist, ich mit der SD-Karte starte (Jumper gesetzt), kann ich keinen Kernel updaten. Es ist alles ganz normal installiert, er startet aber immer den letzten vorhandenen.

    Jumper entfernt, eMMC-Modul entfernt!

    Bootvorgang mit unveränderter SD-Karte, neuer Kernel wird geladen.

    OK, das verstehe ich im Moment überhaupt nicht !?!?!?

  • Release Empfehlung für Einsteiger

    Verschoben Archiv
    2
    0 Stimmen
    2 Beiträge
    1k Aufrufe
    FrankMF

    Sieht so aus, als wenn wir ein neues Traumpaar haben. 🙂

    0.7.7

    und

    rock64@rockpro64:/mnt$ uname -a Linux rockpro64 4.18.0-rc3-1046-ayufan-ge76778b6aa4b #1 SMP PREEMPT Thu Jul 19 14:10:17 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
  • 0 Stimmen
    2 Beiträge
    749 Aufrufe
    FrankMF

    Offizielle Bestätigung -> http://files.pine64.org

  • 0 Stimmen
    2 Beiträge
    2k Aufrufe
    FrankMF
    Ergänzung

    Eine andere SATA-Karte und eine Riser-Karte mit angeschlossener GPU startet nicht.

    rock64@rockpro64v2_1:~$ uname -a Linux rockpro64v2_1 4.4.132-1075-rockchip-ayufan-ga83beded8524 #1 SMP Thu Jul 26 08:22:22 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
  • stretch-minimal-rockpro64

    Verschoben Linux
    3
    0 Stimmen
    3 Beiträge
    979 Aufrufe
    FrankMF

    Mal ein Test was der Speicher so kann.

    rock64@rockpro64:~/tinymembench$ ./tinymembench tinymembench v0.4.9 (simple benchmark for memory throughput and latency) ========================================================================== == Memory bandwidth tests == == == == Note 1: 1MB = 1000000 bytes == == Note 2: Results for 'copy' tests show how many bytes can be == == copied per second (adding together read and writen == == bytes would have provided twice higher numbers) == == Note 3: 2-pass copy means that we are using a small temporary buffer == == to first fetch data into it, and only then write it to the == == destination (source -> L1 cache, L1 cache -> destination) == == Note 4: If sample standard deviation exceeds 0.1%, it is shown in == == brackets == ========================================================================== C copy backwards : 2812.7 MB/s C copy backwards (32 byte blocks) : 2811.9 MB/s C copy backwards (64 byte blocks) : 2632.8 MB/s C copy : 2667.2 MB/s C copy prefetched (32 bytes step) : 2633.5 MB/s C copy prefetched (64 bytes step) : 2640.8 MB/s C 2-pass copy : 2509.8 MB/s C 2-pass copy prefetched (32 bytes step) : 2431.6 MB/s C 2-pass copy prefetched (64 bytes step) : 2424.1 MB/s C fill : 4887.7 MB/s (0.5%) C fill (shuffle within 16 byte blocks) : 4883.0 MB/s C fill (shuffle within 32 byte blocks) : 4889.3 MB/s C fill (shuffle within 64 byte blocks) : 4889.2 MB/s --- standard memcpy : 2807.3 MB/s standard memset : 4890.4 MB/s (0.3%) --- NEON LDP/STP copy : 2803.7 MB/s NEON LDP/STP copy pldl2strm (32 bytes step) : 2802.1 MB/s NEON LDP/STP copy pldl2strm (64 bytes step) : 2800.7 MB/s NEON LDP/STP copy pldl1keep (32 bytes step) : 2745.5 MB/s NEON LDP/STP copy pldl1keep (64 bytes step) : 2745.8 MB/s NEON LD1/ST1 copy : 2801.9 MB/s NEON STP fill : 4888.9 MB/s (0.3%) NEON STNP fill : 4850.1 MB/s ARM LDP/STP copy : 2803.8 MB/s ARM STP fill : 4893.0 MB/s (0.5%) ARM STNP fill : 4851.7 MB/s ========================================================================== == Framebuffer read tests. == == == == Many ARM devices use a part of the system memory as the framebuffer, == == typically mapped as uncached but with write-combining enabled. == == Writes to such framebuffers are quite fast, but reads are much == == slower and very sensitive to the alignment and the selection of == == CPU instructions which are used for accessing memory. == == == == Many x86 systems allocate the framebuffer in the GPU memory, == == accessible for the CPU via a relatively slow PCI-E bus. Moreover, == == PCI-E is asymmetric and handles reads a lot worse than writes. == == == == If uncached framebuffer reads are reasonably fast (at least 100 MB/s == == or preferably >300 MB/s), then using the shadow framebuffer layer == == is not necessary in Xorg DDX drivers, resulting in a nice overall == == performance improvement. For example, the xf86-video-fbturbo DDX == == uses this trick. == ========================================================================== NEON LDP/STP copy (from framebuffer) : 602.5 MB/s NEON LDP/STP 2-pass copy (from framebuffer) : 551.6 MB/s NEON LD1/ST1 copy (from framebuffer) : 667.1 MB/s NEON LD1/ST1 2-pass copy (from framebuffer) : 605.6 MB/s ARM LDP/STP copy (from framebuffer) : 445.3 MB/s ARM LDP/STP 2-pass copy (from framebuffer) : 428.8 MB/s ========================================================================== == Memory latency test == == == == Average time is measured for random memory accesses in the buffers == == of different sizes. The larger is the buffer, the more significant == == are relative contributions of TLB, L1/L2 cache misses and SDRAM == == accesses. For extremely large buffer sizes we are expecting to see == == page table walk with several requests to SDRAM for almost every == == memory access (though 64MiB is not nearly large enough to experience == == this effect to its fullest). == == == == Note 1: All the numbers are representing extra time, which needs to == == be added to L1 cache latency. The cycle timings for L1 cache == == latency can be usually found in the processor documentation. == == Note 2: Dual random read means that we are simultaneously performing == == two independent memory accesses at a time. In the case if == == the memory subsystem can't handle multiple outstanding == == requests, dual random read has the same timings as two == == single reads performed one after another. == ========================================================================== block size : single random read / dual random read 1024 : 0.0 ns / 0.0 ns 2048 : 0.0 ns / 0.0 ns 4096 : 0.0 ns / 0.0 ns 8192 : 0.0 ns / 0.0 ns 16384 : 0.0 ns / 0.0 ns 32768 : 0.0 ns / 0.0 ns 65536 : 4.5 ns / 7.2 ns 131072 : 6.8 ns / 9.7 ns 262144 : 9.8 ns / 12.8 ns 524288 : 11.4 ns / 14.7 ns 1048576 : 16.0 ns / 22.6 ns 2097152 : 114.0 ns / 175.3 ns 4194304 : 161.7 ns / 219.9 ns 8388608 : 190.7 ns / 241.5 ns 16777216 : 205.3 ns / 250.5 ns 33554432 : 212.9 ns / 255.5 ns 67108864 : 222.3 ns / 271.1 ns