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..

To talk to U-boot 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
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..

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, 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)
 * Understand U-boot scripting to make changing kernel cmdline easier?

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

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.

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.

x is the image, yy 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.