Dear Mark,

Thank you for your kind, helpful reply.

But I have already attempted MaskROM mode recovery, and various
rkdeveloptool uses ... both my cards truly seem bricked beyond
repair, unless one can rewrite the contents of memory using pins,
but that's far beyond my ability.

This happened with both cards while trying to wipe the emmc, I
must have wiped more than just that. I ordered a third card (sigh)
and will be more cautious this time, probably using rkdeveloptool
to erase the emmc first before booting OpenBSD from the SD card.

On 2025-12-21 22:52, Mark Kettenis wrote:
Date: Sun, 21 Dec 2025 20:34:28 +0100
From: Sylvain Saboua <[email protected]>

Hi Sylvain,

Even though I have already two “bricked” models of this
SoC, I am willing to make a third attempt.

It is actually very difficult to "brick" an RK3399-based board as they
have a SUB-based recovery mode (called Maskrom mode) built into ROM on
the SoC.  So unless you physically damaged those boards, it should be
possible to recover them.

These boards boot by default from eMMC.  If nothing bootable is found
on the eMMC it will try to boot from SD card.  If that also fails, it
will enter Maskrom mode.  You the board enters Maskrom mode it will
show up as a USB device if you connect it to some other machine.  So

0. Disconnect the board from power.

1. Connect the type-C USB port on the board to a USB port on some
   other machine (type-A or type-C) with a suitable cable.

2. Connect the board to power.

If your 2nd machine is an OpenBSD machine it will print something like:

ugen3 at uhub0 port 1 "vendor 0x2207 product 0x330c" rev 2.00/1.00 addr 2

If that's the case you can use rkdeveloptool to write whatever
firmware you ewant to the eMMC.  But you probably need a Linux machine
to run rkdeveloptool; the tool doesn't build out-of-the box on OpenBSD
at least.

If the above sequence doesn't work, try holding the RECOVERY button on
the board while connecting the board to power.

By the time I hade purchased my second card, if I remember
correctly, the u-boot version on the openbsd miniroot was
not compatible (bootable) with the older version of the
firmware on the card.

This has always been the case.  Rockchips ancient u-boot fork does not
have EFI support and therefore it can't boot OpenBSD.

Hence my question : supposed this problem will present again,
is there a workaround to install (or upgrade to) openbsd's
latest version on a freshly purchased Firefly RK3399 ?
Maybe there is a firmware I can update on the card that will be
compatible with the current openbsd version's u-boot ?
Or maybe I should use a different u-boot on the minorootXX.img ?

The u-boot-aarch64 package has working firmware for the
firefly-rk3399.  You can write it to an SD card using:

  # dd if=/usr/local/share/u-boot/firefly-rk3399/u-boot-rockchip.bin \
       of=/dev/sdXc seek=64

However, in order to be able to boot from SD card, you'll need to
erase the eMMC.  You could boot the Linux that comes with the board
and use that to erase the eMMC.  It may also be possible to do this
using rkdeveloptool.

Note that the OpenBSD firmware uses a baudrate of 115200 for the
serial connection, whereas the Rockchip universe uses 1500000.  But
not all USB serial adapters support the 1500000 baudrate.

--
Sylvain Saboua
looking for a PDP-11

Reply via email to