RK3588 maskrom boot

I recently acquired Pocket Reform and an RK3588 SoM.
Before I start playing with it, I would like to know how to recover the bootloader in case I break it.
I have an Orange Pi 5 with the same SoC, which can boot in Maskrom mode and flash SPI Flash from a PC.
I want to do it with Pocket Reform, but I can’t figure out how.

I can enter Maskrom mode (it seems) as described here https://wiki.t-firefly.com/en/iCore-3588Q/upgrade_maskrom_mode.html.
The problem is that none of the USB ports seem to work in Maskrom mode.
One of two SoM usb ports (USB1) is connected to the internal usb hub and seemed not work.
The other one(USB2) probably can be routed to SYSUSB port with this hack https://community.mnt.re/t/flashing-emmc-bootloader-unbricking-imx8mp, but reform was not recognised by the PC when I tried.

I’ve found a reference to maskrom in SoM repository (source.mnt.re/reform/mnt-reform-rk3588-som/-/blob/main/RK3588-GRIND.md) so I wonder if it is possible, can anyone tell me?
If I couldn’t, I would have to buy an expensive mainboard, which is very sad :frowning:

2 Likes

Yes, this works… sort of. I was playing with edk2 and got a little too much hubris and tried to install it to emmc and now cannot boot from emmc,nvme or sd card with fresh image.

I was able to get into maskrom mode and connect to computer with SYSUSB port and it shows up under lsusb. Just make sure to jump pin 1 to 5 and 2 to 6 on the USB select jumper. I used some breadboard jumpers.

Screenshot From 2025-04-19 13-59-26

I am trying to reflash the base pocket-reform-rk3588 image using the linux upgrade-tool from the firefly site but am not having any luck.

Not sure what else to try at the moment, but it should be recoverable.

Edit: Found a github with some instructions for an older version of the rk upgrade_tools and I think using the raw write is the command to use. sudo ./upgrade_tool wl 0 pocket-reform-system-rk3588.img I am still having an issue, but maybe because of the usb C to A adapter on my framework.

2 Likes

Wow what useful information!
This gave me a hope, thanks.

Just make sure to jump pin 1 to 5 and 2 to 6 on the USB select jumper.

Good to know this method works.

I tried again, with no success. Maybe the way to enter maskrom mode is the problem?
You were dropped to maskrom mode by corrupted emmc, while I tried to enter on my own by tweezing test points.
My method seems to be working because the OS does not boot up, but it may actually not be in maskrom mode.

1 Like

I’ve been using the tweezer method as well. If I don’t it does not show up. I did run into the issue of using tweezers that weren’t actually conductive and resorted to using a piece of wire.

I see.
In my case, if the tweezer is not working, the OS boots up. So that does not seem to be the problem.

I’m using a host computer and a usb cable that works with orange pi.
And I can see the system controller from the pocket reform and from the external host by switching the j21 jumper.
Just wondering why only the maskrom device is not detected.

Hmm, I didn’t have any luck working with the maskrom mode but it did show up consistently across multiple computers and I even tried the windows program where it showed up but I couldn’t issue any commands. I think it was because of the bad image i flashed to the emmc.

Found a workaround by accident where I put it in maskrom mode with an sd card inserted and it booted to the recovery image. I am dding back the backup I took of the emmc now. Should be back in business. I’ll probably avoid playing with the emmc again for a while. I’ve said that before though…

1 Like

I think it was because of the bad image i flashed to the emmc.

BootRom is embedded in the SoC and should not affected by contents of the storage…

Found a workaround by accident where I put it in maskrom mode with an sd card inserted and it booted to the recovery image.

That behavior looks odd to me. Maybe you broke the u-boot but the spl was not affected, and the spl was seeking for a boot loader.

I am dding back the backup I took of the emmc now. Should be back in business.

Hope it works!

From the behaviour so far, I’m beginning to doubt that the mode we enter in our way is really maskrom mode.
If you get your reform to boot properly from the emmc, could you try to enter maskrom mode in a way that shorts the test points and see if it is still recognised by a PC?

Will do, but it won’t be for a little while. Out of town on vacation this week. Thankfully got the pocket up to bring with me and load up with movies for the plane ride.

1 Like

Maybe obvious, but if your eMMC is not completely unbootable, for example if there’s u-boot console, just erasing the first 64MB or so of eMMC content is enough for RK3588 to prefer booting from (Micro)SD card.

Good to know that!
Just to confirm, you mean that if the SPL is not found on the eMMC, RK3588 will look at the SD card for it?
Are you sure that PocketReform+rcore will also behave that way?
I’d like to confirm it myself, but it’s too risky…

Yes, it is like that. We even have a special MicroSD card with u-boot and a script to erase SPL on the eMMC before doing our own factory install.

1 Like

Thanks, that info allows me to proceed.
Besides it, if I flash a broken SPL or U-Boot to the emmc, how can I recover it?

I have successfully migrated bootloaders from eMMC to SD card.
Then erased whole the eMMC, and installed Gentoo on NVMe ssd.
This setup works perfectly and now I can play with u-boot without worrying about bricking.

For information, below are commands used to create that sd card:

# sd=/dev/mmcblkX
sgdisk -Z $sd
sgdisk -a 1 -n 2:64:16383 -c 2:idbloader $sd
sgdisk -a 1 -n 3:16384:32767 -c 3:u-boot $sd
sgdisk -a 1 -n 1:0: -c 1:boot $sd
mkfs.ext4 -m 0 ${sd}p1