Leap 16.0 on a Turing Pi RK1

Holy moly, it works! Pre-generated assets are at the end of the post.

After yesterday’s openSUSE Leap 16.0 Release (yay!) and because I’m still too sore to go for my usual Thursday run, I took this evening to get openSUSE Leap 16.0 working on a Turing RK 1. Thursday evenings are my me time, and I’m glad I could make this work in one sitting!

The main problem was, that the u-boot bootloader for the RK1 is part of the provided firmware images, and even after frankensteining the U-Boot bootloader from the provided Ubuntu 22.04 images, the system would not boot the kernel for the Leap 16 installer. I run into the same issues as this bug filed for Tumbleweed.

So, I needed to build a new U-Boot using this amazing guide from another kind person on the Internet.

Building U-Boot

On a different Leap 16.0 system (yay, bootstrapping!), I did the following:

git clone https://github.com/u-boot/u-boot.git
git clone https://github.com/rockchip-linux/rkbin.git
git clone https://github.com/ARM-software/arm-trusted-firmware.git

Then we first need to build the atf-bl31 from the arm-trusted-firmware

cd arm-trusted-firmware
git checkout lts-v2.12.6   # or newer
CROSS_COMPILE=aarch64-suse-linux- make PLAT=rk3588 bl31 -B -j 16

# note down the location of the bl31.elf file, typically it's 'build/rk3588/release/bl31/bl31.elf'

Then we can build u-boot, but we need to use the rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin (or newer) binary from rkbin.

cd u-boot
git checkout v2025.07     # or newer

ROCKCHIP_TPL=../rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin \
  BL31=../rkbin/bin/rk35/rk3588_bl31_v1.45.elf \
  ARCH=arm64 \
  CROSS_COMPILE=aarch64-suse-linux- \
  make -j16

This should build u-boot. There is a warning, which we can ignore:

...
  BINMAN  .binman_stamp
Image 'simple-bin' is missing optional external blobs but is still functional: tee-os

/binman/simple-bin/fit/images/@tee-SEQ/tee-os (tee-os):
   See the documentation for your board. You may need to build Open Portable
   Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin

  OFCHK   .config

This should give you the bootloader files, we need idbloader.img and u-boot.itb

Create the bootloader image

To only create the bootloader image (with no partitions):

dd if=/dev/zero of=bootloader.img bs=512 count=32767
dd if=idbloader.img of=bootloader.img bs=512 seek=64 conv=notrunc
dd if=u-boot.itb of=bootloader.img bs=512 seek=16384

This will produce a bootloader.img file, which you can flash onto the RK1. This should boot (hopefully), however if you want to install a system on the eMMC, you will find that there is no partition table, and creating one will overwrite the bootloader.

So let’s create an image with a partition table.

Create bootloader image with partition table

The overall storage map is documented on https://opensource.rock-chips.com/wiki_Partitions. We’ll be using this table to generate our own image file with a GPT and a temporary boot and root partition.

dd if=/dev/zero of=bootloader.img bs=512 count=466944
parted bootloader.img mklabel gpt
parted bootloader.img mkpart boot ext4 32768s 262143s
parted bootloader.img mkpart root btrfs 262144s 100%
dd if=idbloader.img of=bootloader.img bs=512 seek=64 conv=notrunc
dd if=u-boot.itb of=bootloader.img bs=512 seek=16384 conv=notrunc
parted bootloader.img print

You can flash this bootloader.img to the Turing RK1. When you enter the setup now, you will find two existing partitions: boot and system. They are empty and you can delete them. They act as a template, so that you will not create a partition where the bootloader resides.

!! Do not create any partitions before sector 32768 or you will overwrite the bootloader !!

Installing openSUSE Leap 16.0

I booted into the Turing RK1 and did the agama installation from my main computer via the Web interface. How cool is this!

Important: When selecting the partition layout, ensure that you do not overwrite u-boot! I did so by deleting the “system” partition but leaving the pre-generated “boot” partition in place. Then I let agama figure out a partition scheme AFTER the first partition. Like this I could ensure, that the bootloader would not be overwritten. Keep in mind that “boot” and “system” partitions here are just empty partitions, they are suggestions but you can create your own layout as well.

But again, ensure the first partition starts at sector 32768 (or higher) otherwise you will overwrite your bootloader.

Assets

Here are my images. Feel free to use them: