Difference between revisions of "ROCKPro64 Getting Started"

From PINE64
Jump to navigation Jump to search
(Page moved)
 
Line 137: Line 137:
The [https://files.pine64.org/doc/rockpro64/ROCKPro64%20NAS%20Case%20Exploded%20View%20Diagram.pdf Exploded View Installation Diagram] for the [https://pine64.com/product/rockpro64-metal-desktop-nas-casing NAS case from the Pine store].
The [https://files.pine64.org/doc/rockpro64/ROCKPro64%20NAS%20Case%20Exploded%20View%20Diagram.pdf Exploded View Installation Diagram] for the [https://pine64.com/product/rockpro64-metal-desktop-nas-casing NAS case from the Pine store].


Detailed '''NAS Case overview and assembly instructions''' can be found [[NASCase | here]].
Detailed '''NAS Case overview and assembly instructions''' can be found [[NAS Case|here]].

Latest revision as of 13:16, 1 September 2024

This section gives important information to get the board up and running.

Video Playback

Hardware video acceleration is supported in recent kernels and user needs only to install the relevant Mesa packages/ports, specifically the Mesa DRI drivers for Mali GPUs (Midgard/Bifrost). One can confirm via software glxinfo, or having the library file such as .../lib/dri/panfrost_dri.so.

Ayufan has some old documentation on video playback here. For your ROCKPro64 the install should be

sudo apt-get install ffmpeg mpv libmali-rk-midgard-t86x-r14p0-gbm

(These modules are included in the Ayufan desktop releases.) At which stage rkmpv myvideo.mp4 will play a fullscreen, hardware assisted, version of your video. rkmpv is at /usr/local/bin/rkmpv

Using an NVMe Disk as rootfs

Forum member Bullet64 has documented how to move rootfs to an NVMe disk. This is useful until we get a full SPI option to boot from the NVMe.

Setup a Serial Console (UART2)

Warning: RockPro64 is designed to use 3VDC3A (3 Volts Direct Current 3 Ampere) for the connection, using 5VDC and more might damage the board!

To use Serial Console you will a need operating system that supports it on your RockPro64, by default the serial console is provided for baud 9 600 which is far too slow for rockpro64 so consider using 1 500 000 (1.5Mbps) instead IF your serial console device supports it (many doesn't which results in their inability to use the console).

Warning: Do not connect RxD (pin 10) until the U-Boot SPL is running (see RK3399 boot sequence) or the SPL will not start. To avoid this issue, a simple ROCKPro64 Serial Buffer Circuit can be installed between the RockPro64 and the serial adapter.

In terms of connections you need to perform the following from your serial console-capable device e.g. Pine64's Woodpecker available in store:

  • GND <-> GND (pin 6)
  • RxD <-> TxD (pin 8)
  • TxD <-> RxD (pin 10)

After the configuration of your preferred operating system you can connect to the serial console using any of these commands:

 $ screen /dev/ttyUSB0 1500000
 $ picocom /dev/ttyUSB0 -b 1500000
 $ minicom -D /dev/ttyUSB0 -b 1500000

NOTE: You might need a root permission if your user is not in the appropriate user-group e.g. dialup on GNU/Linux

Alternatively there is a detailed guide on forums: https://forum.pine64.org/showthread.php?tid=6387

GNU/Linux:

  • With GNU/Linux on your RockPro64 the built-in support for serial console can be enabled by parsing parse e.g. console=ttyS2,1500000n8 in the kernel command line, many distributions make this available by default, but consider verifying the contents of /boot/extlinux/extlinux.conf if you encounter issues.
  • NOTE: the n8 in the kernel argument means no parity, 8 bits per character

Booting from USB or PXE

The default choice of boot device is first eMMC (if present) then SDcard. See jumpers above for details on adjusting this sequence.

It is possible to flash the SPI to extend the options for boot devices to USB drives or PXE. The preferred method is now the rock64_write_spi_flash.sh script (see useful scripts above.) The Getting started wiki article has more details here.

Background info and historic details of this usage can be found here.

Booting from SATA

U-Boot supports booting from SATA devices. However, it seems that this support was broken for the RockPro64 until U-Boot 2023.04. This version is not yet supplied by ManjaroARM, but can be compiled relatively easily in ManjaroARM and installed. The PKGBUILD here provides a version of U-Boot that supports SATA boot: https://aur.archlinux.org/packages/uboot-rockpro64-foss There are instructions in the pinned comment on how to build this in ArchLinuxARM if needed.

Note that with this configuration, U-Boot is compiled to be installed on a micro SD card or EMMC module (at a specific address - not in a filesystem). The install hook provided in this PKGBUILD will ask you if you want to write U-Boot to an EMMC module. If you want to install to a micro SD card instead, press 'n' when prompted and modify the `dd` commands that are printed out. The installer will then prompt to check if you want to install U-Boot to SPI flash. Hit 'Y' and then enter if this is what you want to do, but be sure that you know how to recover from a corrupted SPI flash (as SPI is the first boot device). If you would prefer to install U-Boot to SPI flash yourself, see the guide here: https://wiki.gentoo.org/wiki/PINE64_ROCKPro64/Installing_U-Boot.

Once installed, both the boot partition and root partition may now exist on a SATA device.

Alternative way to setup

There's a howto about creating software raids on sata disks for your system, installing u-boot into SPI to boot of the software raid and configuring boot using an Armbian Installation on eMMC/sdcard. All of the work can be done from the linux command line or even remote via ssh.

https://git.sr.ht/~chrichri/RockPro64_u-boot_SATA_software_RAID_howto

Troubleshooting

If U-Boot fails to boot from SATA, you can attempt to debug the issue through the U-Boot command line.

  • After booting your RockPro64, press any key repeatedly. Enter works well as it won't type anything on the screen when the prompt comes up.
  • Once you get a prompt, type pci and hit enter. This will initialize the U-Boot PCIe subsystem. It is necessary for scanning for SATA devices.
  • Now, type scsi scan and hit enter. This will scan for SATA devices. You should see your SATA device show up in the list with its reported capacity.
  • You can now attempt to list partitions on the SATA device by running part list scsi 0. You may need to change the device number on the end (0 in the example) to match what was reported by the scsi scan command.

Booting from SPI using u-boot

Warning: idbloader is not open-source

Always be prepared to recover from a broken SPI boot BEFORE flashing or you will end up with a broken boot.

In general the recovery is killswitching SPI through shorting pins 23 <-> 25 together and then loading u-boot from a storage device e.g. SD-card or eMMC where majority of GNU distributions e.g. Manjaro usually have u-boot packaged with the provided images.

Follow instructions in https://github.com/sigmaris/u-boot/wiki/Flashing-U-Boot-to-SPI#instructions-for-rockpro64

Boot sequence

The RockPro64 boot sequence has been documented here by sigmaris.

OTG Mode

You can boot your ROCKPro64 into OTG mode with the use of the Recover button (see switch 28 above.) Note there are 2 OTG ports on your ROCKPro64: the type-C USB 3 socket is definitely one. From the schematic it appears the USB 3 (type A) socket is the other, but this has yet to be confirmed.

The method is to power off the board. Then push and hold the Recover button and push and release the Power button.

  • If you have an Ayufan bootable image in either the SD-card or eMMC then there are 4 OTG modes described here including Android fastboot, RockUSB and MaskROM modes. Releasing the Recover button as soon as the white LED lights counts as 1 blink. Keeping it pressed you will get 2 blinks of the white LED etc. Once the board enters OTG mode the red LED will be lit. In mode 1 the boot and linux-root partitions of the card with the Ayufan image (partitions 6 & 7 of a Linux installation) are made available as devices. In all cases the USB device made available at the host has device ID 18d1:d00d.
  • If you do not have an Ayufan image in either the SD-card or the eMMC, then neither white nor red LEDs will light, but the board will enter MaskROM mode where the USB device made available at the host has device ID 2207:330c.

NVMe Drives

Please be aware that the PINE64 SSD interface card is intended for use with NVMe devices. These can be identified by the fact they have a single (Key M) notch, e.g. the WD Black devices.

While M2/NGFF SATA devices (with a Key B notch, typically have Key M as well) will physically fit, they will not work. e.g. WD Blue devices.

SATA Drives

SATA drives can be connected directly via the ROCKPro64 PCIe interface card. Please note the card does not include the power cable - that is a separate item. Equally you must be aware that connecting SATA drives in this manner means they will be drawing power from your ROCKPro64 - please ensure you are using a 5A or better power supply.

ExplainingComputers did a YouTube ROCKPro64 PCIe SATA card review and tests using a Ubuntu console and OpenMediaVault.

Wi-Fi & Bluetooth Module

If you have bought the Wi-Fi and Bluetooth module from the Pine store then instructions for connecting it can be found on the accessories page here. Please note that the 0.7.9 Ayufan's Linux releases (August 2018) have deliberately DISABLED support for this module in the search for stability. It can be tested and used with the Android image.

It can also be used on Manjaro by installing ap6256-firmware and wireless-regdb packages.

7" LCD Touch Screen

Instructions for connecting the LCD touch screen from the Pine are here.

Note at present (August 2018) this screen is only supported by the Android image.

Warning: When using the touchscreen ensure the cables are properly connected and tightened down and that you do not let the metal backplate touch the SBC

RTC Battery Backup

The Pine store has a couple of options for RTC battery backups: a AAA version here or a CR-2032 version here. Instructions for plugging in either of them are also on the Accessories page . For the ROCKPro64, the backup plugs into the RTC connector, number 6 in the board layout diagram above, next to the USB3 and case screw point.

Acrylic Open Enclosure

Assembly instructions for the acrylic enclosure from the Pine store are also on the Accessories page

NAS case

The Exploded View Installation Diagram for the NAS case from the Pine store.

Detailed NAS Case overview and assembly instructions can be found here.