User:PeterL/Rockpro64

Serial comms
I'm using a C232HD DDHSP-0 - FTDI based USB -> Serial (3.3v) connector

Connected GND (black) to pin 6 and (yellow) Rx (i.e. RockPro64 Tx) to pin 8. RockPro64 Wiki

This is just to monitor when things go wrong.

Note: If build of Das U-boot is successful, it should be possible to use Monitor and Keyboard if U-Boot fails to boot the kernel.

To talk to U-boot using the serial interface, also connect pin 10 to Tx (Orange), but only after powered up and starting of U-boot as there seems to be an issue if connected before.

Creating Gentoo env on Arch Linux
Skip this section if not relevant to you..

Laptop has Arch Linux installed - coming from Arch Linux..

Create a chroot gentoo env

Mount necessary partitions for Gentoo chroot env, only do this once after each laptop restart

Chroot into Gentoo env, each time I need to switch to Gentoo env

First time do this...

Then create a .bashrc with the above commands to avoid repeating next time

Once only - set up portage - standard stuff..

Setup cross-compiler in chroot Gentoo env on Arch Linux
Create a separate ebuild repositry as per link above, reminds below..

Alternative (need to check this out)?

Build Arm64 tool chain

RockPro64 installation steps
From the factory nothing stored in SPI flash. I don't have eMMC, just a 32G SD-Card..

Step 1 build das U-boot
Useful links:


 * Blobless boot with RockPro64

Install Software required for building U-boot
Device tree compiler

Das U-Boot tools

Kernel sources

Das U-Boot

Arm trusted firmware (ATF)

Build
Das U-Boot menuconfig is like kernel menuconfig, so you can modify the build config.

ideas I want to try are:


 * Changing location of U-Boot / ATF as it needs to be at offset 16384 x block size in SD-Card which seems lot of space wasted at start of SD-CARD?
 * Remove Network bootloading functionality (don't need this)

Result should be two files idbloader.img & u_boot.itb

see Boot Sequence for details of boot sequence, but in summary ROM code -> TPL -> Rom Code -> SPL -> ATF -> U-Boot

For future reference a defconfig can be saved like so

My latest defconfig can downloaded from guthub using

Step 2 Format SD-Card
Format the SD-CARD with GPT (see Handbook:AMD64/Installation/Disks), but importantly, allowing enough freespace after the GPT before the first partition for U-Boot images.

dev names are those seen when mounted on rockpro64. For MMC devices, eMMC = 0, SD-CARD = 1

Note: device name depends on the host PC; for me they are sdbX on my laptop

Note: Normal GPT block ends at LBA 63 so avoid exceeding this.

Use dd to place idloader.img & u_boot.itb at the necessary sector/Block address like so.

xxx is the image, yyy is 64 or 16384

Create the other filesystems in the normal way, use FAT 32 for the boot to comply to EFI. I used ext4 for the Root, but pick your favourite.

Step 3 Install stage3
Get stage3 for the Arm64 "stage3-arm64-openrc-xxx.tar.bz2

Mount sd card root parition and untar stage3, standard stuff (see elsewhere for details)..::

Get portage portage-latest.tar.bz2

unzip, standard stuff (see elsewhere for details)..::

Step 4 Build Kernel
First get latest standard kernel source like so:

Obtain a kernel build configuration for the rockpro64 platform. I originally started with a known working distro see RockPro64 Wiki

My latest config can be downloaded from and is called rockpro64_linux_config.

Make a Symlink. The exact path depends on the version of linux source installed.

Copy the default config to "/usr/src/linux/arch/arm64/configs".

change to directory of the kernel sources "/usr/src/linux" and run the usually commands to cross-compile the kernel like so:

where menuconfig can be used to tweak the build configuration.

The configuration can be saved for future reference like so

Step 5 Install kernel & U-boot script

 * TODO: Copy dtb and kernel to boot parition

The following boot.cmd file was created

Note: Change where applicable. e.g. if kernel image or root filesystem is different or kernel cmdline is different

Use mkimage from u-boot-tools to compile to a script for Das U-Boot

Copy boot.scr to the boot partition of sd-card.

Step 6 Boot the board

 * TODO: issues see, plus solutions...

RockPro64 Additional software, etc

 * TODO: