rkdeveloptool icon indicating copy to clipboard operation
rkdeveloptool copied to clipboard

Add the capability to change the storage (eMMC, SD, SPINOR...).

Open amouiche opened this issue 9 months ago • 3 comments

Implemented by reverse engineering of windows RKDevTool USB transactions. The naming of operations (eg. READ_STORAGE, CHANGE_STORAGE) are pure speculation, but the result is effective. Also, the numbering of storage device (eg. 1=eMMC, 2=SD, 9=SPINOR) may be dependent of the SOC.

Developed and tested on rk3588 (Radxa Rock 5 ITX)

Example of usage:

  rkdeveloptool db rk3588_spl_loader_v1.15.113.bin
  # select the SPINOR
  rkdeveloptool cs 9
  # clear the whole SPINOR device
  rkdeveloptool ef

  # write an image starting at block 0
  rkdeveloptool wl 0 /tmp/spinor_image.bin

amouiche avatar Feb 09 '25 13:02 amouiche

Is there anyone from Rockchip who can review and merge the latest few PRs? cc @keveryang @Caesar-github

nyanmisaka avatar Feb 10 '25 09:02 nyanmisaka

I have tested with rock5 itx, which has both spi flash and emmc on board.

Without this patch I can only flash uefi firmware to emmc, and when installing os I have to manually create partitions so that the partition of uefi firmware is not erased.

Now with this I can flash uefi firmware to spi flash and installing os is much more easier than before.

amazingfate avatar Feb 15 '25 08:02 amazingfate

I also tested this on a FriendlyElec NanoPC-T6 LTS (RK3588), both eMMC and SPINOR flashing works and booted without issues. Great work.

Electrostasy avatar Feb 24 '25 19:02 Electrostasy

it does not work with the ROC-RK3568-PC SE from firefly. tested with all values 0-9 and --> both x86_64 host and aarch64 host (another ROC-RK3568-PC with edk2 and Devuan).

please reopen the issue!

nikhilkumarnk avatar Mar 08 '25 02:03 nikhilkumarnk