Difference between revisions of "QuartzPro64 Development"

From PINE64
Jump to navigation Jump to search
m (trivial typo fix)
m (→‎Flasing the eMMC: spell it as "rk3588_spl_loader")
 
(120 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[File:Quartzpro64_whole_board_top_resized.jpeg|250px|thumb|right|The QuartzPro64 development board]]
[[File:Quartzpro64_whole_board_top_resized.jpeg|250px|thumb|right|The QuartzPro64 development board, front side]]
[[File:BoardBackSide.jpg|100px|thumb|right|Board back side]]
[[File:BoardBackSide.jpg|250px|thumb|right|Back side of the board]]


A '''QuartzPro64 Development''' Wiki page before a '''QuartzPro64''' Wiki page? It's more likely than you think!
A '''QuartzPro64 Development''' Wiki page before a '''QuartzPro64''' Wiki page? It's more likely than you think!
Line 6: Line 6:
This page will be used for both documenting the current development efforts and the board in general, as we don't know yet how a generally available QuartzPro64 will look like so documenting the dev board is probably best left to the development page.
This page will be used for both documenting the current development efforts and the board in general, as we don't know yet how a generally available QuartzPro64 will look like so documenting the dev board is probably best left to the development page.


= Upstreaming Status =
== Obtaining a Development Board ==
 
Register for a preorder: [https://preorder.pine64.org/#/quartzpro64 https://preorder.pine64.org/#/quartzpro64]
 
== Upstreaming Status ==
 
* Upstream Linux kernel DT: https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts
* Upstream U-Boot DT: https://github.com/u-boot/u-boot/blob/master/arch/arm/dts/rk3588-quartzpro64-u-boot.dtsi


{| class="wikitable plainrowheaders" border="1"
{| class="wikitable plainrowheaders" border="1"
Line 21: Line 28:
! scope="row" | Video Input
! scope="row" | Video Input
| colspan="2" style="background:#F99; text-align:center;"|Needs porting
| colspan="2" style="background:#F99; text-align:center;"|Needs porting
|
| <code>rk_hdmirx</code>
| Huge 3600 line driver, but generally seems to be in good condition
|-
|-
! scope="row" | 3D Acceleration  
! scope="row" | 3D Acceleration  
Line 43: Line 51:
| [[User:CounterPillow]] is doing a little work on this. VDPU720 handling JPEG
| [[User:CounterPillow]] is doing a little work on this. VDPU720 handling JPEG
|-
|-
| style="background:#F99; text-align:center;"|Needs writing
| style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=721724]</sup>
| <code>?</code> using <code>v4l2-requests</code>
| <code>hantro</code> using <code>v4l2-requests</code>
| Collabora said they'll work on this. VDPU981 handling 4K60 AV1
| Collabora is working on this. VDPU981 handling 4K60 AV1
|-
|-
! scope="row" rowspan="3" | Video Encode  
! scope="row" rowspan="3" | Video Encode  
Line 64: Line 72:
|-
|-
! scope="row" rowspan="2" | Audio  
! scope="row" rowspan="2" | Audio  
| colspan="2"  style="background:#F99; text-align:center;"|Needs porting
| colspan="2"  style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>rockchip-i2s-tdm</code>
| <code>rockchip-i2s-tdm</code>
| CounterPillow has ported the necessary changes for this, but hasn't submitted it yet as it needs more testing
| As of 6.2<sup>[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c619bd4268ff9895760dab303b4eb15ed3d0f7e9]</sup>
|-
|-
| colspan="2" style="background:PaleGreen; text-align:center;"|Linux Mainline
| colspan="2" style="background:PaleGreen; text-align:center;"|Linux Mainline
Line 73: Line 81:
|-
|-
! scope="row" | CRU
! scope="row" | CRU
| colspan="2" style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=653281]</sup>
| colspan="2" style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>clk-rk3588</code>
| <code>clk-rk3588</code>
|
| As of 6.2<sup>[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1c506d152ff235ad621d3c25d061cb16da67214]</sup>
|-
|-
! scope="row" | MMC
! scope="row" | MMC
Line 88: Line 96:
|-
|-
! scope="row" | GPIO
! scope="row" | GPIO
| colspan="2" style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=653284]</sup>
| colspan="2" style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>rockchip-gpio</code>
| <code>rockchip-gpio</code>
|
| As of 6.1<sup>[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc165ba48aaf7d792e99d0c7e4b12e9625bc73e3]</sup>
|-
|-
! scope="row" | I<sup>2</sup>C
! scope="row" | I<sup>2</sup>C
| colspan="2"  style="background:PaleGreen; text-align:center;"|Linux Mainline?
| colspan="2"  style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>rk3x-i2c</code>
| <code>rk3x-i2c</code>
| Should be the same as RK3399, just needs devicetree work
| Should be the same as RK3399, just needs devicetree work
|-
|-
! scope="row" | SPI
! scope="row" | SPI
| colspan="2"  style="background:PaleGreen; text-align:center;"|Linux Mainline?
| colspan="2"  style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>rockchip-spi</code>
| <code>rockchip-spi</code>
| Should be the same as previous SoCs, just needs devicetree work
| Should be the same as previous SoCs, just needs devicetree work
|-
! scope="row" | PMU
| colspan="2"  style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=687286]</sup>
| <code>rk806</code>
| Talks over SPI
|-
|-
! scope="row" | Regulators
! scope="row" | Regulators
| colspan="2"  style="background:#F99; text-align:center;"|Needs porting
| colspan="2"  style="background:#F99; text-align:center;"|Needs porting
| <code>rk806</code>
| <code>rk860</code>
|
| Talks over I<sup>2</sup>C
|-
|-
! scope="row" | GMAC
! scope="row" | GMAC
| colspan="2"  style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=654255]</sup>
| colspan="2"  style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>dwmac-rk</code>
| <code>dwmac-rk</code>
|
| As of 6.1<sup>[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f2b60a0ec2826e5a2b2a1ddf68994a868dccbc1]</sup>
|-
|-
! scope="row" | Power Domains
! scope="row" | Power Domains
| colspan="2"  style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=653289]</sup>
| colspan="2"  style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>rockchip-pm-domain</code>
| <code>rockchip-pm-domain</code>
| As of 6.1<sup>[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6541b424ce1dda616d3946e839f015c984df7a99]</sup>
|-
! scope="row" | CAN
| colspan="2" style="background:#F99; text-align:center;"|Needs porting
| <code>rockchip_canfd</code>
| Not broken out on the QuartzPro64, so we probably won't be the ones porting it
|-
! scope="row" | SPDIF TX
| colspan="2" style="background:#F99; text-align:center;"|May need porting
| <code>rockchip-spdif</code>
| Genuinely just needs the compatible string added, I think, otherwise we're all good. Not broken out on QuartzPro64 dev board
|-
! scope="row" | SPDIF RX
| colspan="2" style="background:#F99; text-align:center;"|Needs porting
| <code>rockchip-spdifrx</code>
| Not broken out on QuartzPro64 dev board
|-
! scope="row" | PCIe
| colspan="2" style="background:#F99; text-align:center;"|May need porting
| <code>rockchip-dw-pcie</code>
| Downstream driver and upstream are quite different, look into how much work actually needs doing. Seems to be the same controller as rk3568 so maybe none?
|-
! scope="row" | NPU
| style="background:#F99; text-align:center;"|Needs porting/writing
| style="text-align:center;"|?
| <code>rockchip-rknpu</code>
|-
! scope="row" | USB 2.0
| colspan="2" style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=749871]</sup>
| <code>phy-rockchip-inno-usb2</code>
| There's probably more to USB 2 than just the PHY but this is what I found for now
|-
! scope="row" | USB 3.0
| colspan="2" style="background:#F99; text-align:center;"|?
| <code>?</code>
|
|-
! scope="row" | SATA
| colspan="2" style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>ahci-dwc</code>
| Just needs the compatible added to the bindings, done in [https://patchwork.kernel.org/project/linux-rockchip/list/?series=749876]
|-
! scope="row" | Thermal
| colspan="2" style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=687619]</sup>
| <code>rockchip-thermal</code>
|
|-
! scope="row" | Wifi & Bluetooth
| colspan="2" style="background:#F99; text-align:center;"|?
| <code>?</code>
|
|-
! scope="row" | HWRNG
| colspan="2" style="background:#F99; text-align:center;"|Needs porting
| <code>rockchip-rng</code>
| The code & DT work is easy to port & working
|
|-
! scope="row" | RTC
| colspan="2" style="background:PaleGreen; text-align:center;"|Linux Mainline
| <code>hym8563</code>
| Should only need DT work (see [https://patchwork.kernel.org/project/linux-rockchip/list/?series=736799 here] for an example)
|-
! scope="row" | OTP
| colspan="2" style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=744118]</sup>
| <code>rockchip-otp</code>
|
|-
! scope="row" | SARADC
| colspan="2" style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=748188]</sup>
| <code>rockchip_saradc</code>
|
|
|}
|}


= Hardware =
== Hardware ==


[[File:Quartzpro64_soc_and_ram_resized.jpeg|200px|thumb|right|The SoC and RAM packages]]
[[File:Quartzpro64_soc_and_ram_resized.jpeg|200px|thumb|right|The SoC and RAM packages]]


== General ==
=== General ===


* RK3588 SoC
* RK3588 SoC (8 cores: 4x A76 at 2.4&nbsp;GHz + 4x A55 at 1.8&nbsp;GHz)
* 16 GB SK hynix DRAM
* Mali G610MC4 GPU (4x Valhalla cores)
* 16&nbsp;GB of LPDDR4X (SK hynix)
* 64&nbsp;GB eMMC (Foresee, soldered)
* 1x USB-C (with video-alt mode)
* 1x USB-C (FTDI debug UART, FT232RL)
* 1x USB 3.0
* 2x USB 2.0
* 1x HDMI in
* 2x HDMI out
* 1x PCIe 3.0 slot (open-ended)
* 1x SD / TF card slot
* 2x SATA ports
* 2x Gigabit Ethernet (1x from SoC, 1x on PCIe, RTL8211F, RTL8111HS)
* 1x WiFi & Bluetooth module (AMPAK Tech AP6275PR3)
* 2x SMA Antenna
* 2x MIPI DPHY
* 1x MIPI D/C PHY
* 1x MIPI CSI
* 1x PWM Fan header (four pins)
* 1x RTC battery socket (CR1220, 3&nbsp;V, see [[#Documentation|QuartzPro64 board schematics PDF]], page 21)
* 1x MIC (soldered)
* 1x audio output 3.5&nbsp;mm jack
* DC 12&nbsp;V power input


== Cooler ==
=== Cooler ===


The board comes with two cooler mounts, a 4-hole mount that appears to be spaced 55x55mm apart, and the ~60mm diagonal "northbridge heatsink" mount the ROCKPro64 and Quartz64 Model A uses.
The board comes with two cooler mounts, a 4-hole mount that appears to be spaced 55x55mm apart, and the ~60mm diagonal "northbridge heatsink" mount the ROCKPro64 and Quartz64 Model A uses.
Line 133: Line 239:
RK3588 is slightly (<1mm?) taller than the DRAM chips, use a thick enough thermal pad instead of thermal compound.
RK3588 is slightly (<1mm?) taller than the DRAM chips, use a thick enough thermal pad instead of thermal compound.


== UART ==
=== UART ===
 
Plug in the USB-C port labelled "<tt>DEBUG PORT</tt>" on the QP64 board to another computer with a USB-A-to-C cable.
 
It will show up as a FT232 USB Serial adapter in <code>lsusb</code>:
<pre>
$ lsusb
[...]
Bus 005 Device 027: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
[...]
</pre>


Plug in the USB-C port labelled "<tt>DEBUG PORT</tt>" on the board, it will show up as a FT232 USB Serial adapter. Baud rate is as usual 1.5mbauds or 1500000.
Baud rate is 1.5 mbauds or 1500000.


== Mounting Holes ==
Ensure you have the driver module loaded:
<pre>
# modprobe ftdi_sio
# lsmod | grep ftdi_sio
ftdi_sio              61440  0
usbserial              53248  1 ftdi_sio
usbcore              290816  7 ftdi_sio,usbserial,xhci_hcd,usbhid,usbkbd,usbmouse,xhci_pci
</pre>


Can't be bothered to take a precise measurement of all the holes right now, just use [https://www.ebay.com/sch/i.html?kw=pc%20standoff%20kit some PC standoffs] and have the board sit on your desk, it's a dev board after all.
If the above is not working, check the required driver is supported by your kernel, using one of the following commands:
<pre>
$ zgrep FTDI_SIO /proc/config.gz
CONFIG_USB_SERIAL_FTDI_SIO=m
$ grep FTDI_SIO "/boot/config-$(uname -r)"
CONFIG_USB_SERIAL_FTDI_SIO=m
</pre>


== Storage ==
Using the <code>dmesg</code> command, you should see something like the following:
<pre>
[24784.535804] usb 5-3: new full-speed USB device number 3 using xhci_hcd
[24784.710714] usb 5-3: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[24784.710723] usb 5-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24784.710725] usb 5-3: Product: FT232R USB UART
[24784.710727] usb 5-3: Manufacturer: FTDI
[24784.710728] usb 5-3: SerialNumber: A10LLO86
[24784.723858] usbcore: registered new interface driver usbserial_generic
[24784.723865] usbserial: USB Serial support registered for generic
[24784.725286] usbcore: registered new interface driver ftdi_sio
[24784.725295] usbserial: USB Serial support registered for FTDI USB Serial Device
[24784.725348] ftdi_sio 5-3:1.0: FTDI USB Serial Device converter detected
[24784.725368] usb 5-3: Detected FT232RL
[24784.731685] usb 5-3: FTDI USB Serial Device converter now attached to ttyUSB0
</pre>
 
Then you can get console output from the QP64 with, for example:
 
<pre>
screen /dev/ttyUSB0 1500000
</pre>
 
=== Mounting Holes ===
 
Mounting holes are 3&nbsp;mm in diameter, so standard standoffs can be used, preferably the 2.5&nbsp;mm variant.  See also the PCB layout PDF files, linked in the [https://wiki.pine64.org/wiki/QuartzPro64_Development#Documentation Documentation] section.
 
The height from the bottom of the PCB to the top of the USB ports as the tallest components is 18&nbsp;mm, which can be used as a data point for selecting the suitable standoff length to place some acrylic top cover over the board.  However, that doesn't account for the heatsink that needs to be mounted on the RK3588 SoC, for which a suitable rectangular hole can be cut in the top cover.
 
=== Storage ===


[[File:Quartzpro64_emmc_resized.jpeg|200px|thumb|right|The eMMC on the dev board]]
[[File:Quartzpro64_emmc_resized.jpeg|200px|thumb|right|The eMMC on the dev board]]


* Soldered on 64 GB FORESEE eMMC chip, it comes pre-flashed with some Android (you'll even get a brief bit of HDMI output)
* Soldered 64&nbsp;GB FORESEE eMMC chip, which comes pre-flashed with some Android build
* microSD card slot
* One microSD card slot
* 2x SATA 3.0 (molex power connector for it not populated, but easy to remedy)
* Two SATA 3.0 ports (standard Molex power connector is not populated)


== Power ==
=== Power ===


[[File:Power_and_switch.jpg|100px|thumb|right|Power switch & barrel connector]]
[[File:Power_and_switch.jpg|100px|thumb|right|Power switch & barrel connector]]
Line 157: Line 315:
There is a hardware flip switch to power up / down the board.
There is a hardware flip switch to power up / down the board.


== PMU ==
=== PMU ===


[[File:Quartzpro64_pmu.jpeg|100px|thumb|right|The PMU]]
[[File:Quartzpro64_pmu.jpeg|100px|thumb|right|The PMU]]
Line 165: Line 323:
Verify this once we have access to SDK sources.
Verify this once we have access to SDK sources.


= Immediate TODOs =
=== Ethernet ===


== Port RK806 Driver ==
The RGMII ethernet port (near the SDCARD socket) is working if you use neg2led's linux-quartz64 repo.


For giving the SD card power, we need the RK806 driver.
The other port (near the sound jack) is hooked to the SoC via PCIe and is currently reported working (on the matrix channel) with latest neggles kernel.


== Put Regulator/Power Controller Stuff In Device Tree ==
== Boot ==


Needed for SD card, which is crucial to a good development experience.
The board can boot from the following interfaces:
* SPI
* eMMC
* SD/MMC


= Ways To Do Things =
TODO: in which priority / order are those boot options tried ?


== Using rkdeveloptool ==
== Recovery ==
 
In the case you erase the eMMC and are unable to boot the board, you can use rkdeveloptool to recover the board. While you can use the [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool Pine64 Fork], it is recommended to use [https://gitlab.com/cypheon/rkdeveloptool/-/tree/main?ref_type=heads cypheon's Fork] until some Pending PRs are merged in to [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool/-/merge_requests?scope=all&state=opened&author_username=cypheon resolve issues] with larger files. This is important when working with the larger 64&nbsp;GB eMMC on the QuartzPro64.
 
With rkdeveloptool installed, you will also need the rk3588_spl_loader from rockchip to init the memory/flash when in maskrom mode. This can be downloaded from the [https://github.com/rockchip-linux/rkbin/blob/master/bin/rk35/rk3588_spl_v1.12.bin rockchip-linux/rkbin repo].
 
Build the rk3588_spl_loader:
'''git clone https://github.com/rockchip-linux/rkbin.git'''
Cloning into 'rkbin'...
[...]
Resolving deltas: 100% (11368/11368), done.
'''cd rkbin'''
'''./tools/boot_merger RKBOOT/RK3588MINIALL.ini'''
********boot_merger ver 1.34********
Info:Pack loader ok.
'''ls -lh rk3588_spl_loader_v1.16.113.bin'''
-rw-r--r-- 1 user group 477K Aug 18 17:23 rk3588_spl_loader_v1.16.113.bin
 
Entering maskrom can be done in a variety of ways:
 
* Hold the maskrom button (little white button labelled "MASKROM" next to SATA socket) during powerup, OR
* Enter rockusb mode, and execute "rkdeveloptool reboot-maskrom".
* Bork your eMMC and SD devices (how? erase?), in which case bootup will fallback to maskrom.
 
=== Dumping the eMMC ===
 
Boot the device into maskrom mode, and then verify rkdeveloptool can see the board.
'''# rkdeveloptool list'''
DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=503 Maskrom
 
Once the board shows up, load the rk3588_spl_loader you downloaded or built earlier, and verify that the eMMC can be seen.
'''# rkdeveloptool boot ./rk3588_spl_loader_v1.08.111.bin'''
Downloading bootloader succeeded.
'''# rkdeveloptool read-flash-info'''
Flash Info:
Manufacturer: SAMSUNG, value=00
Flash Size: 59000 MB
Flash Size: 120832000 Sectors
Block Size: 512 KB
Page Size: 2 KB
ECC Bits: 0
Access Time: 40
Flash CS: Flash<0>
 
You can now dump the eMMC using the read command. Note that first you have to calculate the eMMC size, which can be done using the output from the previous flash info command. You need to take the sector count, and times it by the sector size, to get the total number of bytes. So in the above example, 120832000*512 so the total flash size is 61865984000.
 
Using the calculated size, you can now dump the eMMC. Please note this will take 1-2 minutes.
'''# rkdeveloptool read 0x0 61865984000 ./quartzpro64_emmc_dump.bin'''
Read LBA to file (0%)
...
Read LBA to file (100%)
 
You now have a full dump of the entire eMMC (SHA256 62cb4ae8d02aeacccf231fa1d00087cdc74b599790a274569305693aa205318d). Note that you can also use the list-partitions and read-partition commands to dump specific partitions, but this only shows GPT partitions on the eMMC. Because of this, it will NOT include the spl_loader found in the first 4MB of the eMMC!
 
=== Flasing the eMMC ===
 
Boot the device into maskrom mode, and then verify rkdeveloptool can see the board.
'''# rkdeveloptool list'''
DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=503 Maskrom
 
Once the board shows up, load the rk3588_spl_loader you downloaded or built earlier, and verify that the eMMC can be seen.
'''# rkdeveloptool boot ./rk3588_spl_loader_v1.08.111.bin'''
Downloading bootloader succeeded.
'''# rkdeveloptool read-flash-info'''
Flash Info:
Manufacturer: SAMSUNG, value=00
Flash Size: 59000 MB
Flash Size: 120832000 Sectors
Block Size: 512 KB
Page Size: 2 KB
ECC Bits: 0
Access Time: 40
Flash CS: Flash<0>
 
You can now flash the device using either the write command, or write-partition command, depending on what you are trying to do. If you are looking to restore the entire eMMC from a backup you made, you would use the command below to accomplish this.
'''rkdeveloptool write 0 ./quartzpro64_emmc_dump.bin'''
 
== Ways To Do Things ==
 
=== To build required components ===
 
See the Notes projects in the "Collabora RK3588 integration" repository. See in Resources / Misc, below.
 
=== Using rkdeveloptool ===


Use the [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool PINE64 fork of rkdeveloptool].
Use the [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool PINE64 fork of rkdeveloptool].
Line 183: Line 427:
Connect a USB-C cable to the "DEBUG PORT" USB-C port, and a second to the "DOWNLOAD" USB-C port. '''Cable direction for the latter matters, so if it doesn't show up after entering download mode, try rotating the USB-C connector to the other side!'''
Connect a USB-C cable to the "DEBUG PORT" USB-C port, and a second to the "DOWNLOAD" USB-C port. '''Cable direction for the latter matters, so if it doesn't show up after entering download mode, try rotating the USB-C connector to the other side!'''


Interrupt the boot by mashing Ctrl+C very quickly on the serial comms, then type <code>download</code> to enter rockusb download mode.
To enter rockusb mode, interrupt the boot by holding the "V+/REC" on-board button or mashing Ctrl+C very quickly on the serial comms, then type <code>download</code>.


  $ rkdeveloptool list
  $ rkdeveloptool list
Line 192: Line 436:
  DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=204    Loader
  DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=204    Loader


{{Template:note|'''Note:''' If you receive an error about being unable to create the comms object in the following steps, make sure you have the udev rules installed with CounterPillow's RK3588 device id patch, install them to <code>/etc/udev/rules.d/</code> and <code>udevadm control --reload</code>}}
{{Template:note|'''Note:''' If you receive an error about being unable to create the comms object in the following steps, make sure you have the udev rules installed with [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool/-/merge_requests/19 CounterPillow's RK3588 device id patch], install them to <code>/etc/udev/rules.d/</code> and <code>udevadm control --reload</code>}}


Now, we can e.g. show the partitions on the eMMC:
Now, we can e.g. show the partitions on the eMMC:
Line 215: Line 459:
You can now use <code>rkdeveloptool write-partition partitionname yourfile</code> to overwrite one of the eMMC partitions.
You can now use <code>rkdeveloptool write-partition partitionname yourfile</code> to overwrite one of the eMMC partitions.


== U-Boot + Kernel On SD, RootFS On eMMC ==
=== U-Boot + Kernel On SD, RootFS On eMMC ===


This is the setup [[User:CounterPillow]] currently uses. In short, you'll need a vendor U-Boot on your SD card, with a boot partition on it that contains your <tt>extlinux.conf</tt>, device tree and kernel.
This is the setup [[User:CounterPillow]] currently uses. In short, you'll need a vendor U-Boot on your SD card, with a boot partition on it that contains your <tt>extlinux.conf</tt>, device tree and kernel.


=== Setting Up The SD Card ===
==== Setting Up The SD Card ====


Assuming your SD card is <tt>/dev/sdX</tt>, partition as e.g. follows:
Assuming your SD card is <tt>/dev/sdX</tt>, partition as e.g. follows:
Line 256: Line 500:
Unmount it, we're done with the SD card.
Unmount it, we're done with the SD card.


=== Creating The Root File System ===
==== Creating The Root File System ====


Make a file of the size of the <tt>userdata</tt> partition of your eMMC, e.g. for the 57610829824 bytes (57.6 GB) CounterPillow's was, do:  
First, allocate a file the size of your desired root partition (larger sizes will take longer to transfer, don't make the same mistakes as CounterPillow did), here we choose 16G:
  $ dd if=/dev/zero of=rootpart.bin bs=1024 count=56260576
  $ fallocate -l 16G rootpart.bin


then, make the filesystem on it. CounterPillow went for ext4 because nobody has ever been fired for using ext4:
then, make the filesystem on it. CounterPillow went for ext4 because nobody has ever been fired for using ext4:
Line 281: Line 525:
Unmount <tt>/mnt/emmc-root</tt>, we're done with it.
Unmount <tt>/mnt/emmc-root</tt>, we're done with it.


=== Flashing The Root File System With RockUSB ===
==== Flashing The Root File System With RockUSB ====


{{Template:warning|This '''will''' destroy whatever data is on that userdata partition. But you're here to run Linux, not Android, right?}}
{{Template:warning|This '''will''' destroy whatever data is on that userdata partition. But you're here to run Linux, not Android, right?}}
Line 294: Line 538:
  $ rkdeveloptool write-partition userdata rootpart.bin
  $ rkdeveloptool write-partition userdata rootpart.bin


=== Booting ===
==== Booting ====


Unplug the download USB-C cable once done.
Unplug the download USB-C cable once done.
Line 302: Line 546:
To update kernels or the device tree, just shut down the board, take out the SD card, write a new kernel or dtb to it, and plug it back in. No more need for rkdeveloptool, yay.
To update kernels or the device tree, just shut down the board, take out the SD card, write a new kernel or dtb to it, and plug it back in. No more need for rkdeveloptool, yay.


= Resources =
== Resources ==


* [https://patchwork.kernel.org/project/linux-rockchip/list/ linux-rockchip patchwork]
=== Kernel ===
 
* [http://lists.infradead.org/pipermail/linux-rockchip/ The linux-rockchip mailing list archives]
* [https://patchwork.kernel.org/project/linux-rockchip/list/ The linux-rockchip patchwork]
* [https://github.com/rockchip-linux/kernel Rockchip BSP kernel tree]
* [https://github.com/radxa/kernel/tree/stable-5.10-rock5 Radxa kernel tree]
 
=== Misc ===
 
* The quartz64 and quartz-dev channels on the PINE64 chats (bridged IRC, Matrix, Discord and Telegram)
* [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool PINE64 rkdeveloptool fork]
* [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool PINE64 rkdeveloptool fork]
* [https://github.com/rockchip-linux/rkbin/ Rockchip binary blobs repository]
* [https://opensource.rock-chips.com/wiki_Main_Page Rockchip OpenSource wiki]
* [https://github.com/collabora/rockchiprs rockchiprs] (rkdeveloptool replacement written in Rust)
* [https://gitlab.collabora.com/hardware-enablement/rockchip-3588 Collabora RK3588 integration (u-boot, kernel, Status table, etc.)] - A lot of good information is here
=== Documentation ===
The documentation for the QuartzPro64 board and most of the documentation for the chips it uses hasn't been publicly released yet, but if you do own a QuartzPro64 board, [[User:CounterPillow|CounterPillow]] or [[User:Dsimic|dsimic]] will happily provide the documentation to you for the research or development purposes, if you ask them in the PINE64 [[Main Page#Chat Platforms|chat channels]]. We've got the following documents, some of which can also be found elsewhere on the Internet rather easily:
* RK3588 datasheet
* RK3588 technical reference manual (TRM), parts 1 and 2
* RK3588 hardware design guide, machine translated to English from Chinese, and the original version in Chinese
* RK860 datasheet, including register descriptions
* RK806 datasheet, including register descriptions
* [https://devzone.pine64.org/uploads/d392f228-d53b-11ec-9ab8-fe0395c0c83d/9fee695f-39a4-4858-a58a-c91b86d4fa2c/QuartzPro64-DevBoard-Schematic-V1.0_20220216.pdf QuartzPro64 schematics]
* [https://devzone.pine64.org/uploads/d392f228-d53b-11ec-9ab8-fe0395c0c83d/cf368836-966e-4c3c-9e0d-04a82a705d45/QuartzPro64-DevBoard-PCB-V1.0_20220216_topplace.pdf QuartzPro64 PCB top layout]
* [https://devzone.pine64.org/uploads/d392f228-d53b-11ec-9ab8-fe0395c0c83d/ec260213-d4f7-4c61-ad1f-40ee7b7b7a35/QuartzPro64-DevBoard-PCB-V1.0_20220216_bottomplace.pdf QuartzPro64 PCB bottom layout]
* [https://datasheet.lcsc.com/lcsc/2203311530_AMPAK-Tech-AP6275PR3_C2984106.pdf AMPAK AP6275PR3 (WiFi + BT module) datasheet]
* AMPAK AP6275P (WiFi + BT module) datasheet


[[Category:Rockchip RK3588]]
[[Category:Rockchip RK3588]]
[[Category:QuartzPro64]]

Latest revision as of 15:27, 18 August 2024

The QuartzPro64 development board, front side
Back side of the board

A QuartzPro64 Development Wiki page before a QuartzPro64 Wiki page? It's more likely than you think!

This page will be used for both documenting the current development efforts and the board in general, as we don't know yet how a generally available QuartzPro64 will look like so documenting the dev board is probably best left to the development page.

Obtaining a Development Board

Register for a preorder: https://preorder.pine64.org/#/quartzpro64

Upstreaming Status

Function Status Component Notes
Video Output Needs porting VOP2 Collabora said they'll work on this. The video output IP on the RK3588 should mostly be the same as the one on the RK356x, but the chip specific stuff will need to be integrated into the vop2 driver.
Video Input Needs porting rk_hdmirx Huge 3600 line driver, but generally seems to be in good condition
3D Acceleration Needs writing Needs writing panfrost Collabora said they'll work on this. New architecture, reportedly needs many changes to the kernel component of Panfrost.
Video Decode Needs writing GStreamer only, no ffmpeg[1] hantro using v4l2-requests VDPU121 handling 1080p60 H.263/MPEG-4, MPEG-1 and MPEG-2
Needs writing rkvdec2 using v4l2-requests Nobody is known to be working on this for now. VDPU346 handling 8K60 H.265, H.264, VP9 and AVS
Needs writing rkdjpeg using v4l2-requests User:CounterPillow is doing a little work on this. VDPU720 handling JPEG
In review[2] hantro using v4l2-requests Collabora is working on this. VDPU981 handling 4K60 AV1
Video Encode Needs writing GStreamer only JPEG on VEPU121 Driver already exists, only minor changes needed.
Needs writing ? H.264 on VEPU580
Needs writing ? H.265 on VEPU580
Audio Linux Mainline rockchip-i2s-tdm As of 6.2[3]
Linux Mainline es8388 CODEC
CRU Linux Mainline clk-rk3588 As of 6.2[4]
MMC Linux Mainline sdhci-of-dwcmshc As of 5.19[5]
pinctrl Linux Mainline pinctrl-rockchip As of 5.19[6]
GPIO Linux Mainline rockchip-gpio As of 6.1[7]
I2C Linux Mainline rk3x-i2c Should be the same as RK3399, just needs devicetree work
SPI Linux Mainline rockchip-spi Should be the same as previous SoCs, just needs devicetree work
PMU In review[8] rk806 Talks over SPI
Regulators Needs porting rk860 Talks over I2C
GMAC Linux Mainline dwmac-rk As of 6.1[9]
Power Domains Linux Mainline rockchip-pm-domain As of 6.1[10]
CAN Needs porting rockchip_canfd Not broken out on the QuartzPro64, so we probably won't be the ones porting it
SPDIF TX May need porting rockchip-spdif Genuinely just needs the compatible string added, I think, otherwise we're all good. Not broken out on QuartzPro64 dev board
SPDIF RX Needs porting rockchip-spdifrx Not broken out on QuartzPro64 dev board
PCIe May need porting rockchip-dw-pcie Downstream driver and upstream are quite different, look into how much work actually needs doing. Seems to be the same controller as rk3568 so maybe none?
NPU Needs porting/writing ? rockchip-rknpu
USB 2.0 In review[11] phy-rockchip-inno-usb2 There's probably more to USB 2 than just the PHY but this is what I found for now
USB 3.0 ? ?
SATA Linux Mainline ahci-dwc Just needs the compatible added to the bindings, done in [12]
Thermal In review[13] rockchip-thermal
Wifi & Bluetooth ? ?
HWRNG Needs porting rockchip-rng The code & DT work is easy to port & working
RTC Linux Mainline hym8563 Should only need DT work (see here for an example)
OTP In review[14] rockchip-otp
SARADC In review[15] rockchip_saradc

Hardware

The SoC and RAM packages

General

  • RK3588 SoC (8 cores: 4x A76 at 2.4 GHz + 4x A55 at 1.8 GHz)
  • Mali G610MC4 GPU (4x Valhalla cores)
  • 16 GB of LPDDR4X (SK hynix)
  • 64 GB eMMC (Foresee, soldered)
  • 1x USB-C (with video-alt mode)
  • 1x USB-C (FTDI debug UART, FT232RL)
  • 1x USB 3.0
  • 2x USB 2.0
  • 1x HDMI in
  • 2x HDMI out
  • 1x PCIe 3.0 slot (open-ended)
  • 1x SD / TF card slot
  • 2x SATA ports
  • 2x Gigabit Ethernet (1x from SoC, 1x on PCIe, RTL8211F, RTL8111HS)
  • 1x WiFi & Bluetooth module (AMPAK Tech AP6275PR3)
  • 2x SMA Antenna
  • 2x MIPI DPHY
  • 1x MIPI D/C PHY
  • 1x MIPI CSI
  • 1x PWM Fan header (four pins)
  • 1x RTC battery socket (CR1220, 3 V, see QuartzPro64 board schematics PDF, page 21)
  • 1x MIC (soldered)
  • 1x audio output 3.5 mm jack
  • DC 12 V power input

Cooler

The board comes with two cooler mounts, a 4-hole mount that appears to be spaced 55x55mm apart, and the ~60mm diagonal "northbridge heatsink" mount the ROCKPro64 and Quartz64 Model A uses.

RK3588 is slightly (<1mm?) taller than the DRAM chips, use a thick enough thermal pad instead of thermal compound.

UART

Plug in the USB-C port labelled "DEBUG PORT" on the QP64 board to another computer with a USB-A-to-C cable.

It will show up as a FT232 USB Serial adapter in lsusb:

$ lsusb
[...]
Bus 005 Device 027: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
[...]

Baud rate is 1.5 mbauds or 1500000.

Ensure you have the driver module loaded:

# modprobe ftdi_sio
# lsmod | grep ftdi_sio
ftdi_sio               61440  0
usbserial              53248  1 ftdi_sio
usbcore               290816  7 ftdi_sio,usbserial,xhci_hcd,usbhid,usbkbd,usbmouse,xhci_pci

If the above is not working, check the required driver is supported by your kernel, using one of the following commands:

$ zgrep FTDI_SIO /proc/config.gz
CONFIG_USB_SERIAL_FTDI_SIO=m
$ grep FTDI_SIO "/boot/config-$(uname -r)"
CONFIG_USB_SERIAL_FTDI_SIO=m

Using the dmesg command, you should see something like the following:

[24784.535804] usb 5-3: new full-speed USB device number 3 using xhci_hcd
[24784.710714] usb 5-3: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[24784.710723] usb 5-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24784.710725] usb 5-3: Product: FT232R USB UART
[24784.710727] usb 5-3: Manufacturer: FTDI
[24784.710728] usb 5-3: SerialNumber: A10LLO86
[24784.723858] usbcore: registered new interface driver usbserial_generic
[24784.723865] usbserial: USB Serial support registered for generic
[24784.725286] usbcore: registered new interface driver ftdi_sio
[24784.725295] usbserial: USB Serial support registered for FTDI USB Serial Device
[24784.725348] ftdi_sio 5-3:1.0: FTDI USB Serial Device converter detected
[24784.725368] usb 5-3: Detected FT232RL
[24784.731685] usb 5-3: FTDI USB Serial Device converter now attached to ttyUSB0

Then you can get console output from the QP64 with, for example:

screen /dev/ttyUSB0 1500000

Mounting Holes

Mounting holes are 3 mm in diameter, so standard standoffs can be used, preferably the 2.5 mm variant. See also the PCB layout PDF files, linked in the Documentation section.

The height from the bottom of the PCB to the top of the USB ports as the tallest components is 18 mm, which can be used as a data point for selecting the suitable standoff length to place some acrylic top cover over the board. However, that doesn't account for the heatsink that needs to be mounted on the RK3588 SoC, for which a suitable rectangular hole can be cut in the top cover.

Storage

The eMMC on the dev board
  • Soldered 64 GB FORESEE eMMC chip, which comes pre-flashed with some Android build
  • One microSD card slot
  • Two SATA 3.0 ports (standard Molex power connector is not populated)

Power

Power switch & barrel connector

You can provide power to the board via the 12V barrel connector, it's 5.5mm OD/2.1mm ID barrel 'coaxial' type "M" centre-positive, the ROCKPro64 5A power supply from the PINE64 store will work. (TODO: add alternative ways).

There is a hardware flip switch to power up / down the board.

PMU

The PMU

2x RK806-2, not RK808 compatible. It's a dual PMU configuration where one PMU is a subordinate of the other.

Verify this once we have access to SDK sources.

Ethernet

The RGMII ethernet port (near the SDCARD socket) is working if you use neg2led's linux-quartz64 repo.

The other port (near the sound jack) is hooked to the SoC via PCIe and is currently reported working (on the matrix channel) with latest neggles kernel.

Boot

The board can boot from the following interfaces:

  • SPI
  • eMMC
  • SD/MMC

TODO: in which priority / order are those boot options tried ?

Recovery

In the case you erase the eMMC and are unable to boot the board, you can use rkdeveloptool to recover the board. While you can use the Pine64 Fork, it is recommended to use cypheon's Fork until some Pending PRs are merged in to resolve issues with larger files. This is important when working with the larger 64 GB eMMC on the QuartzPro64.

With rkdeveloptool installed, you will also need the rk3588_spl_loader from rockchip to init the memory/flash when in maskrom mode. This can be downloaded from the rockchip-linux/rkbin repo.

Build the rk3588_spl_loader:

git clone https://github.com/rockchip-linux/rkbin.git
Cloning into 'rkbin'...
[...]
Resolving deltas: 100% (11368/11368), done.
cd rkbin
./tools/boot_merger RKBOOT/RK3588MINIALL.ini
********boot_merger ver 1.34********
Info:Pack loader ok.
ls -lh rk3588_spl_loader_v1.16.113.bin
-rw-r--r-- 1 user group 477K Aug 18 17:23 rk3588_spl_loader_v1.16.113.bin

Entering maskrom can be done in a variety of ways:

  • Hold the maskrom button (little white button labelled "MASKROM" next to SATA socket) during powerup, OR
  • Enter rockusb mode, and execute "rkdeveloptool reboot-maskrom".
  • Bork your eMMC and SD devices (how? erase?), in which case bootup will fallback to maskrom.

Dumping the eMMC

Boot the device into maskrom mode, and then verify rkdeveloptool can see the board.

# rkdeveloptool list
DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=503	Maskrom

Once the board shows up, load the rk3588_spl_loader you downloaded or built earlier, and verify that the eMMC can be seen.

# rkdeveloptool boot ./rk3588_spl_loader_v1.08.111.bin
Downloading bootloader succeeded.
# rkdeveloptool read-flash-info
Flash Info:
	Manufacturer: SAMSUNG, value=00
	Flash Size: 59000 MB
	Flash Size: 120832000 Sectors
	Block Size: 512 KB
	Page Size: 2 KB
	ECC Bits: 0
	Access Time: 40
	Flash CS: Flash<0>

You can now dump the eMMC using the read command. Note that first you have to calculate the eMMC size, which can be done using the output from the previous flash info command. You need to take the sector count, and times it by the sector size, to get the total number of bytes. So in the above example, 120832000*512 so the total flash size is 61865984000.

Using the calculated size, you can now dump the eMMC. Please note this will take 1-2 minutes.

# rkdeveloptool read 0x0 61865984000 ./quartzpro64_emmc_dump.bin
Read LBA to file (0%)
...
Read LBA to file (100%)

You now have a full dump of the entire eMMC (SHA256 62cb4ae8d02aeacccf231fa1d00087cdc74b599790a274569305693aa205318d). Note that you can also use the list-partitions and read-partition commands to dump specific partitions, but this only shows GPT partitions on the eMMC. Because of this, it will NOT include the spl_loader found in the first 4MB of the eMMC!

Flasing the eMMC

Boot the device into maskrom mode, and then verify rkdeveloptool can see the board.

# rkdeveloptool list
DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=503	Maskrom

Once the board shows up, load the rk3588_spl_loader you downloaded or built earlier, and verify that the eMMC can be seen.

# rkdeveloptool boot ./rk3588_spl_loader_v1.08.111.bin
Downloading bootloader succeeded.
# rkdeveloptool read-flash-info
Flash Info:
	Manufacturer: SAMSUNG, value=00
	Flash Size: 59000 MB
	Flash Size: 120832000 Sectors
	Block Size: 512 KB
	Page Size: 2 KB
	ECC Bits: 0
	Access Time: 40
	Flash CS: Flash<0>

You can now flash the device using either the write command, or write-partition command, depending on what you are trying to do. If you are looking to restore the entire eMMC from a backup you made, you would use the command below to accomplish this.

rkdeveloptool write 0 ./quartzpro64_emmc_dump.bin

Ways To Do Things

To build required components

See the Notes projects in the "Collabora RK3588 integration" repository. See in Resources / Misc, below.

Using rkdeveloptool

Use the PINE64 fork of rkdeveloptool.

Connect a USB-C cable to the "DEBUG PORT" USB-C port, and a second to the "DOWNLOAD" USB-C port. Cable direction for the latter matters, so if it doesn't show up after entering download mode, try rotating the USB-C connector to the other side!

To enter rockusb mode, interrupt the boot by holding the "V+/REC" on-board button or mashing Ctrl+C very quickly on the serial comms, then type download.

$ rkdeveloptool list

should now show you the device somewhat like this:

$ rkdeveloptool list
DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=204    Loader
Note: If you receive an error about being unable to create the comms object in the following steps, make sure you have the udev rules installed with CounterPillow's RK3588 device id patch, install them to /etc/udev/rules.d/ and udevadm control --reload

Now, we can e.g. show the partitions on the eMMC:

$ rkdeveloptool list-partitions
#   LBA start (sectors)  LBA end (sectors)  Size (bytes)       Name                
00                 8192              16383       4194304       security
01                16384              24575       4194304       uboot
02                24576              32767       4194304       trust
03                32768              40959       4194304       misc
04                40960              49151       4194304       dtbo
05                49152              51199       1048576       vbmeta
06                51200             133119      41943040       boot
07               133120             329727     100663296       recovery
08               329728            1116159     402653184       backup
09              1116160            1902591     402653184       cache
10              1902592            1935359      16777216       metadata
11              1935360            1937407       1048576       baseparameter
12              1937408            8310783    3263168512       super
13              8310784          120831935   57610829824       userdata

You can now use rkdeveloptool write-partition partitionname yourfile to overwrite one of the eMMC partitions.

U-Boot + Kernel On SD, RootFS On eMMC

This is the setup User:CounterPillow currently uses. In short, you'll need a vendor U-Boot on your SD card, with a boot partition on it that contains your extlinux.conf, device tree and kernel.

Setting Up The SD Card

Assuming your SD card is /dev/sdX, partition as e.g. follows:

# parted -s /dev/sdX mklabel gpt
# parted -s /dev/sdX mkpart loader 64s 8MiB
# parted -s /dev/sdX mkpart uboot 8MiB 16MiB
# parted -s /dev/sdX mkpart env 16MiB 32MiB
# parted -s /dev/sdX mkpart efi fat32 32MiB 544MiB    # increase size as you wish
# parted -s /dev/sdX set 4 boot on

Flash SPL and u-boot:

# dd if=rk3588_spl_loader_v1.06.109.bin of=/dev/sdX1
# dd if=uboot.img of=/dev/sdX2

Then make the filesystem:

# mkfs.vfat -n "efi" /dev/sdX4

Mount it to e.g. /mnt/sdcardboot:

# mount /dev/sda4 /mnt/sdcardboot

Put the following in /mnt/sdcardboot/extlinux/extlinux.conf:

default l0
menu title QuartzPro64 Boot Menu
prompt 0
timeout 50

label l0
menu label Boot Jank Kernel SDMMC
linux /jank
fdt /dtbs/rockchip/rk3588-evb1-v10.dtb
append earlycon=uart8250,mmio32,0xfeb50000 console=ttyS2,1500000n8 root=/dev/mmcblk0p14 rw rootwait

Copy your kernel to /mnt/sdcardboot/jank and your DTB to /mnt/sdcardboot/dtbs/rockchip/rk3588-evb1-v10.dtb.

Unmount it, we're done with the SD card.

Creating The Root File System

First, allocate a file the size of your desired root partition (larger sizes will take longer to transfer, don't make the same mistakes as CounterPillow did), here we choose 16G:

$ fallocate -l 16G rootpart.bin

then, make the filesystem on it. CounterPillow went for ext4 because nobody has ever been fired for using ext4:

$ mkfs.ext4 rootpart.bin

Cool, now mount it:

# mount rootpart.bin /mnt/emmc-root

Now we'll download the Arch Linux ARM generic rootfs tarball and go to town:

$ wget -N http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz{,.sig}
$ curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x68b3537f39a313b3e574d06777193f152bdbe6a6' | gpg --import=-    # in case you're lacking the key
$ gpg --verify ArchLinuxARM-aarch64-latest.tar.gz.sig    # don't you dare skip this
# bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C /mnt/emmc-root    # notice that this is run as root

Then we just need to edit fstab. Get the UUID (not PARTUUID) from lsblk:

$ lsblk -o NAME,SIZE,MOUNTPOINTS,UUID

and put it in /mnt/emmc-root/etc/fstab as follows:

UUID=root-uuid-here  /       ext4    defaults        0       1

Unmount /mnt/emmc-root, we're done with it.

Flashing The Root File System With RockUSB

Warning: This will destroy whatever data is on that userdata partition. But you're here to run Linux, not Android, right?

Plug one USB-C cable into the debug UART port, the other into the download port. Yes you will need two USB-C cables (or A-to-C cables) for this, get over it.

Plug in your board, reset it while hammering Ctrl+c on the debug UART until you get into a u-boot command line. Now enter the download command.

If your device doesn't show up in lsusb or rkdeveloptool list command, pull out the download USB-C plug, rotate it axially by 180 Euler degrees, and plug it back in.

Next, flash the partition. Depending on the size of it, this can take over an hour:

$ rkdeveloptool write-partition userdata rootpart.bin

Booting

Unplug the download USB-C cable once done.

Put the SD card in the board. Reset it. You can now boot and your rootfs on eMMC will be mounted and contains an ALARM userland.

To update kernels or the device tree, just shut down the board, take out the SD card, write a new kernel or dtb to it, and plug it back in. No more need for rkdeveloptool, yay.

Resources

Kernel

Misc

Documentation

The documentation for the QuartzPro64 board and most of the documentation for the chips it uses hasn't been publicly released yet, but if you do own a QuartzPro64 board, CounterPillow or dsimic will happily provide the documentation to you for the research or development purposes, if you ask them in the PINE64 chat channels. We've got the following documents, some of which can also be found elsewhere on the Internet rather easily: