PINE64 RockPro64 Instruction Manual

2022/07/05 14:37 (UTC) 1/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
Slackware ARM project web site | Forum | Slackware ARM development documentation | Slackware
ARM installation guides
Installing Slackware on the RockPro64
Target
Platform AArch64/ARM64
Hardware Model Rock Pro64
Document Version 1.00, Dec 2021
Author Stuart Winter <mozes@slackware>
Contributors Brenton Earl <el0226@slackware> (R&D for the RK3399 Hardware Models)
Video Tutorial
This tutorial is also available in video form.
Pine64 also provide unboxing and setup videos which you may find useful.
Help / Support
Please post questions to the Slackware ARM forum.
Installation Lifecycle
The Installation consists of a number of distinct stages:
Acquiring all required hardware1.
Setting up local environment to support the installation over the network2.
Downloading and verifying the Slackware assets3.
Writing the Initialisation Bootware to the Micro SD card4.
Setup of the RockPro64 hardware5.
Initialising the RockPro64 with the Bootware6.
Writing the Slackware Installer to the Micro SD card7.
Booting the Slackware Installer8.
Installing Slackware9.
Completing the installation10.
Booting the Slackware OS11.
Post installation configuration and tweaks12.
Requirements
Hardware

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
Item Specification Notes
RockPro64 4GB version The RockPro64 (2GB version may work but
hasn't been tested)
RockPro64
Power Supply
('PSU')
Pine64's own
There is a cheaper alternative, but this
version is recommended. Note that the link
here is for the EU version - a US version is
also available in the Pine64 store
Micro SD Card 8GB minimum capacity, Class 10
(fast speed), good quality make Used as Slackware's /boot partition
USB Multi-Card
Reader Must accept Micro SD cards
Used to write the Bootware on your host Linux
computer. This isn't required if your host
computer has a Micro SD card reader.
USB to Serial
adapter
PL2303 chip. Other models may
work, but this one has been tested.
If your model has the option to set
voltages, ensure 3volts is set!
Optional: This document covers installing
using an HDMI monitor (you can find
information about the Serial/UART adapter at
the foot of this document), but a USB to
Serial/UART adapter is recommended if you
want to access the Boot Loader and Linux tty
(serial line) remotely. The serial adapter is
also required for developers needing to debug
the boot process.
Jumper or
Dupont cable See images below
This is to bridge the pins required for initial
firmware deployment and/or Hardware Model
recovery
USB to SATA
adapter
Many models will work, but this one
has been tested.
For a simple installation you require either
storage attached to a USB interface, or using
the SATA PCI card (see below).
PCIe to dual
SATA 3.0
Interface Card
PINE64's own You can use this or the USB to SATA adapter
(see row above)
PCIe to quad
SATA 3.0
Interface Card
MZHOU / Marvell chipset If you would like to use SATA storage, this is
the recommended interface card
SATA storage /
SSD
The Kingston-SA400S37-240G has
thoroughly proved itself in the
Slackware ARM build infrastructure -
most build machines use these, but
any SSD or spinning hard disk
should work
Will contain the Operating System. You can
install to other storage, but this
documentation covers this particular
configuration only.
Wifi and
Bluetooth
module
Pine64's own Optional
Heat sink and
CPU fan Pine64's own
Either a heat sink or fan are required. Some of
the cases have built-in heat sinks, so check
the options
SATA power
cable Pine64's own
Optional - depends if you use the SATA PCI
card and choose to power the drives from the
board (see notes below around stability)
Real Time Clock
('RTC') battery
holder
Pine64's own
An RTC is used to keep the time when the
Hardware Model is powered down. This is
recommended but optional. Time can also be
set via NTP once the OS has booted.

2022/07/05 14:37 (UTC) 3/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
Notes on storage setup
The setup documented here (2.5“ SSD connected to a USB-to-Serial adapter for power and data) has
proven stable for this author.
However, powering spinning 3.5” SATA drives from the RockPro64 directly have resulted in instability
of the hardware. This was resolved by powering the drives and CPU fan from an external power
supply. The Slackware AArch64 primary build machines run with this power configuration and have
proven stable over time.
eMMC
From the factory, your RockPro64 may contain an eMMC storage module. During the development of
Slackware AArch64, it was found that the life span of these storage modules is short which makes
them inappropriate for housing an Operating System. Whilst it's possible to use eMMC with Slackware,
this documented installation process does not provide a supported path and the eMMC should be
removed.
Computing / Network Environment
Item Specification Notes
Host Computer: an
Internet-connected
computer running an
existing Linux
distribution
Preferably a full installation of
Slackware x86/64, but any
distribution that can provide the
required Python environment and
HTTP server module. The Host
Computer needs approximately 5GB
free storage to download the
required software assets. You must
be able to obtain root access to
this Host computer.
This will be used to download the
Slackware distribution from the
Internet, and serve the RockPro64
client to install Slackware over the LAN
(Local Area Network).
Network DHCP server
Provide an IP address and routing
information for the RockPro64 to be
able to contact the Linux Host
Computer (to download the
Slackware tree) and the Internet (to
set date via NTP)
This document expects the RockPro64
to be able to obtain an IP address via
DHCP over the LAN. However, you can
also manually configure an IP address
once the Slackware Installer has
booted (note that a lack of DHCP
server will stall the Installer by several
seconds). You could also copy the
Slackware media to a USB stick and
install from there. This is outside of the
scope of this document, however this
document describes how to set up a
simple DHCP service on Slackware.
Most home routers equipped with Ethernet ports provide a DHCP server which should
suffice for this setup

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
Hardware Setup
In this section we'll prepare the physical aspects of the RockPro64 to receive Slackware Linux.
1. Place the computer onto a non-conductive surface ready for setup
If you have a case, install the board into it. If you do not, it should be placed onto a non-conductive
surface such as plastic, wood or rubber.
Remove eMMC storage module
In the image above you will see that the eMMC module has been removed (bottom right, left hand
side of 'Head phones jack'). See the note above for the reasons behind this.
Gently prize the eMMC module from the board and store it some place safe as you may wish to
experiment with it in the future.
If you are planning on using the RockPro64 as an 'embedded' device, the eMMC may
be sufficient. However, for a regular OS upon which you will be
reading/writing/updating, it has insufficient longevity for this author to recommend its
use for Slackware
2. Connect the peripherals
Connect the CPU fan or heat sink
Connect the Wifi & Bluetooth module (optional)
Connect the storage (the image shows the USB-to-SATA adapter, but you may use the PCI card).
If using the USB adapter, connect it to the blue USB3.0 port.
Connect the Ethernet cable

2022/07/05 14:37 (UTC) 5/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
Connect the HDMI cable
Connect the USB keyboard and mouse
The basic hardware setup is complete.
Software and Network Environment Setup
In this section, we'll prepare the Linux Host Computer to receive and download the Slackware assets
required for the installation.
1. Downloading the Slackware Linux AArch64 Distribution and Installation Assets
The '$' prefixes in the commands indicates the shell prompt - it's not to be
typed/copied
Open a shell on the Linux Host Computer.
Prepare a directory to hold and serve the Slackware Distribution
We'll download the Slackware Linux distribution into a directory named 'slackware'.
The contents of this directory will be served via an HTTP server to the LAN (Local Area
Network), so only place the Slackware assets here.
$ cd ## returns to the root of your home directory
$ mkdir slackware
$ cd slackware

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
Determine where you are within the Host Computer's Filesystem
$ pwd
/home/mozes/slackware
Note the directory location returned - you'll need this later
Installing the Slackware ARM GPG key
The Slackware ARM GPG key will be used to verify the Bootware and Slackware Installation images.
$ curl -sSL https://www.slackware.com/infra/keys/arm/GPG-KEY | gpg --import
-
Set the version of Slackware AArch64 to download
At the time of writing, the only version available is 'current'.
$ SLKVER=current
Set the distribution server
If you are using a mirror server rather than the master Slackware ARM server, set it here. The format
is: <hostname>::<rsync module name>
$ SLKSRV=ftp.arm.slackware.com::slackwarearm
Download the Bootware
Note the period/full stop after the rsync commands - this instructs rsync to download
to the current directory (it's not punctuation!)
The U-Boot Boot Loader that will be installed onto the SPI flash:
rsync -PavL $SLKSRV/platform/aarch64/bootware/recovery/rk3399/flash-spi-
rockpro64.img.xz .
rsync -PavL $SLKSRV/platform/aarch64/bootware/recovery/rk3399/flash-spi-
rockpro64.img.xz.asc .
The Bootware (recovery/initialisation) images are approximately 400KBytes in size.

2022/07/05 14:37 (UTC) 7/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
Download the Slackware Linux installer for the RK3399 AArch64 platform
rsync -PavL $SLKSRV/platform/aarch64/bootware/installer/slackwareaarch64-
${SLKVER}/rk3399_generic.sdimg_latest.img.xz .
rsync -PavL $SLKSRV/platform/aarch64/bootware/installer/slackwareaarch64-
${SLKVER}/rk3399_generic.sdimg_latest.img.xz.asc .
The Slackware Installer images are approximately 300MBytes in size.
Download the Slackware tree verification tool
rsync -PavL $SLKSRV/platform/all/scripts .
Download the Slackware AArch64 tree
You will now download the Slackware distribution. This contains all of the software included within
Slackware.
rsync \
--exclude '*/source/*' \
--delete -Prlvv \
$SLKSRV/slackwareaarch64-${SLKVER} .
The Slackware distribution is approximately 4.5GBytes in size.
Verify the assets
Verify the digital signature of the verification tool:
gpg --verify-files scripts/slacksigchk.sh.asc
The output will be similar to this. You are looking for 'Good signature from Slackware ARM…'
gpg: assuming signed data in 'scripts/slacksigchk.sh'
gpg: Signature made Wed 24 Nov 2021 06:07:44 PM BST
gpg: using RSA key F7ABB8691623FC33
gpg: Good signature from "Slackware ARM (Slackware ARM Linux Project)
<[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the
owner.
Primary key fingerprint: 36D3 7609 2F12 9B6B 3D59 A517 F7AB B869 1623 FC33
Verify the Bootware and Slackware tree:
chmod 755 scripts/slacksigchk.sh

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
./scripts/slacksigchk.sh slackwareaarch64-${SLKVER}
If you see 'BAD signature' you should re-download as it may have become corrupt. If
this doesn't help, drop a note to the Slackware ARM forum
Write the Initialisation Bootware to the SD Card
Slackware stores the U-Boot Boot Loader firmware within the SPI flash of the Hardware Models that
use the RK3399 SoC (including the Pinebook Pro, RockPro64 et al).
In this step, we'll write the Boot Loader firmware to the same Micro SD card that will later be used to
contain the Slackware Installer, and subsequently the Slackware OS' /boot partition. If you have
multiple Micro SD cards available, you may prefer to use separate SD cards; but this document
assumes the availability of a single Micro SD card.
Elevate yourself to root
On your Host Computer, obtain root:
The # prefix indicates that you're using the root user - it's not to be typed in!
$ su - ## Note the hyphen - it's required
Check what block devices are present
Prior to inserting the Micro SD Card into the USB adapter, we need to see what's already present
within the OS so that we can easily locate our Micro SD card:
# lsblk -d
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
As you can see, this Host Computer there is a single storage device - sda.
Now insert the Micro SD card into your USB Card Reader and connect the adapter to a free USB port
on the Host Computer.
Run lsblk again:
# lsblk -d
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
sdc 8:32 1 58G 0 disk

2022/07/05 14:37 (UTC) 9/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
sdd 8:48 1 0B 0 disk
As you can see, sdc is 58GBytes in size. This is the Micro SD card (in this example, it's labeled as
'64GB' on the exterior of Micro SD card).
If your Micro SD card has existing partitions, you will not see them surfaced in this list - use lsblk -b to
view them.
You'll also observe the presence of sdd - often the USB adapter itself obtains a block
device. You can ignore this as it's 0Bytes.
Write the Bootware Initialisation Image to the Micro SD Card
Still as the root user, we'll switch to the directory to which the the Slackware assets have been
downloaded (see earlier steps):
# cd /home/mozes/slackware/
Write the Bootware Initialisation Image to the device identified as our Micro SD card. You'll then exit
the root shell, returning to your usual standard user environment:
All data on this Micro SD Card will be erased! Ensure you have inserted the correct
card!
# dd if=/dev/zero of=/dev/sdc count=10 bs=1M ## Replace /dev/sdc with the
correct block device (presented above by the lsblk tool) on your Host
Computer
# xzcat flash-spi-rockpro64.img.xz > /dev/sdc ## Replace /dev/sdc with the
correct block device (presented above by the lsblk tool) on your Host
Computer
# sync
Logout of the root user:
# logout
The Bootware Initialisation image is now ready to boot on the RockPro64.
Installing the Boot Loader to SPI flash
You need to perform this one-time step to flash a Slackware version of the U-Boot Boot Loader to the
SPI flash of the RockPro64.
This is required if your RockPro64 is brand new out of the box, or has previously had another Linux

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
distribution running on it.
If you reinstall Slackware you do not need to repeat this step, as long as the
Slackware version of U-Boot remains within the SPI flash.
Position the jumper/Dupont cable so that it links pin 23 (SPI_CLK_M2) and pin 25 (GND)1.
Insert the Micro SD card into the RockPro64's Micro SD slot2.
Connect the power to the RockPro643.
Power on the RockPro64: hold down the Power button for 2 seconds (it may also auto-power on)4.
Do NOT connect any USB peripherals yet as these tend to cause the flashing process
to hang
After a few seconds, you should see a message appearing on the screen - instructing you that the
process will begin in 10 seconds' time.
Now remove the jumper/Dupont cable
The flashing process will begin and takes approximately 1 minute to complete.
Once the process completes, hold the power button for approximately 8 seconds. The RockPro64 will
power off.
Write the Slackware Installer image onto the MicroSD card

2022/07/05 14:37 (UTC) 11/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
Now that the Boot Loader has been installed to the RockPro64's SPI flash, we will install the Slackware
Installer image onto the same MicroSD card.
Remove the MicroSD card from the RockPro64
Insert the MicroSD card back into the Host Computer (as in the earlier section)
Elevate yourself to root
On your Host Computer, obtain root:
The # prefix indicates that you're using the root user
$ su - ## Note the hyphen - it's required
Write the Slackware Installer to the Micro SD card
Follow the instructions in the previous section to determine which block device name it occupies.
Typically the block device will remain the same (in this tutorial it's /dev/sdc) but you
should verify each time using lsblk.
The # prefix indicates that you're using the root user - it's not to be typed in!
Enter the directory into which the Slackware assets were downloaded previously:
# cd /home/mozes/slackware
# xzcat rk3399_generic.sdimg_latest.img.xz > /dev/sdc ## Replace /dev/sdc
with the correct block device
# sync
# exit
Remove the MicroSD card from the Host Computer
You may now disconnect the USB adapter from the Host Computer and remove the MicroSD card.
Start the installation media server
We will direct the Slackware Installer to download the packages from a web server that we'll run
temporarily on your Linux Host Computer.

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
Determine the Linux Host Computer's IP address
For most basic installations, the following command will provide the correct IP. If your Linux Host
Computer has a more complex setup, you'll need to determine the IP address yourself using ifconfig
or one of the other tools.
$ hostname -I
192.168.1.1
In this example, the IP address of the Linux Host Computer is 192.168.1.1
Start the HTTP server on the Linux Host Computer
As your normal (not root) user on your Linux Host Computer, we'll enter the Slackware AArch64
directory and start the HTTP web server:
$ cd ~/slackware/slackwareaarch64-*/
$ python3 -m http.server
The HTTP server will remain in the foreground - you may now leave it. We will return to
close it post installation.
Installing Slackware
To proceed, you must have:
Connected the storage to the RockPro64
Connected the HDMI monitor
Connected the keyboard (and optionally, mouse)
Connected the Ethernet cable, and have a DHCP server serving the network from which the
RockPro64 can obtain an IP address
Inserted the Micro SD card containing the Slackware Installer
Encrypted storage
If you'd like to encrypt your storage, check the Disk Encryption Guide.
Begin installation
Disconnect any USB storage devices that aren't required for the OS installation

2022/07/05 14:37 (UTC) 13/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
Power on the RockPro64
Press the Power Button for aproximately two seconds
After a few seconds, the you will see the following on screen:
It takes several seconds to load and boot the installer, and it may take several seconds more for any
further output to appear on the HDMI monitor. The process of obtaining an IP address via DHCP can
also delay the ability to interact with the Installer.
Once an IP address has been obtained, you will be presented with a prompt. Press ENTER
Set the keymap

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
Set the date/time
Even if you have a battery pack for the RTC (Real Time Clock), the date on your system may be
incorrect. We will sync the date from a highly-available NTP server:
ntpdate clock.akamai.com
hwclock -w
Setup disk partitions
For this installation a basic partitioning scheme will be created.
Partition
Partition number Device name Size Purpose
1 /dev/sda1 4GB Swap
2 /dev/sda2 Rest of storage OS root ('/') partition

2022/07/05 14:37 (UTC) 15/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
/boot will reside on the Micro SD card and is automatically configured by the Slackware
Installer
Open fdisk against the /dev/sda block device. In this guide, /dev/sda will be your primary storage, and
in this guide is the SSD connected to the USB adapter.
fdisk /dev/sda
Clear an existing partition table: Press 'o' to clear the partition table
Create the Swap partition:
Type 'n' for new partition:
Type 'p' for primary partition type:
Press ENTER for the 'First sector'
Type '+4G' for the 'Last Sector'/size:
Change the partition type to 'Swap'. Type 't' then hex code '82':
Create the partition for the root filesystem ('/'):
Type 'n' for new partition. Press ENTER to accept the defaults - this will create partition 2 as the
maximum size available.

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
Type 'a' to mark the root partition (number 2) as bootable Type '2' to select partition 2.
Type 'p' to print to view the partition table.
Type 'w' to write the partition table:
fdisk will now exit.
Load the Setup menu
Setup Swap partition

2022/07/05 14:37 (UTC) 19/36 Installing Slackware on the RockPro64
SlackDocs - https://docs.slackware.com/
The Micro SD card that contains the /boot partition presently occupies approximately 1GB. Most
MicroSD cards are several GBs in size. This option will resize the partition to its full capacity to avoid
wasting storage. If you plan on manually adding partions to this later, you will want to choose 'No'
here.
It's important that the Micro SD card is not used for heavy read/writes as it'll damage
it and will cause your system not to boot. This option exists simply to avoid wasting
space on the MicroSD card.
Boot Loader Configuration
The Installer will configure the Boot Loader and the OS' /etc/fstab automatically:

Last update: 2022/07/04
07:53 (UTC) slackwarearm:inst_sa64_rk3399_rockpro64 https://docs.slackware.com/slackwarearm:inst_sa64_rk3399_rockpro64
https://docs.slackware.com/ Printed on 2022/07/05 14:37 (UTC)
On the ARM platform, the Swap and root file systems are addressed by labels (see
above: 'LABEL=') where as on x86/64 it's addressed by a direct reference to the block
device (e.g. /dev/sda).
The swap partitions are labeled 'SLKswap<x>', the root file system 'SLKroot', and the
/boot partition 'SLKboot'.
The rationale behind this divergence is that on x86 the root file system is typically on
a storage bus (SCSI, SATA, ATA), where the physical configuration (which port the
storage is connected to) of the storage rarely changes. This can be the case on ARM,
but it's generally to a lesser extent and the root file system may be connected to a
hot-plug bus such as USB. This lends itself to the risk of device re-ordering across boot
cycles (e.g. /dev/sda becomes /dev/sdb), causing boot failure.
Please be aware that the Slackware Installer only labels the swap and root file system.
Therefore you are advised to manually label the file systems and modify the OS
/etc/fstab accordingly. If you have only a single storage device and don't plan on
adding more, you can use the settings that the Slackware Installer configures.
Select Source Media
Table of contents
Other PINE64 Single Board Computer manuals