Difference between revisions of "User:Talpa/Using rkdeveloptool"

From PINE64
Jump to navigation Jump to search
(Initial page dedicated to using rkdeveloptool)
 
(Copied more of the build instructions)
Line 21: Line 21:
If no usable storage device is found the ROM in the SOC enters maskrom mode and awaits a connection over USB
If no usable storage device is found the ROM in the SOC enters maskrom mode and awaits a connection over USB


The PineNote additionally has a magnet sensor that is read by U-Boot during startup and if it detects a magnet U-Boot places the device in download mode
The PineNote additionally has a magnet sensor that is read by U-Boot during startup and if it detects a magnet U-Boot places the device in USB download mode




== Compiling rkdeveloptool ==


Pine64 develops a [https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool forked version] of the rkdeveloptool by RockChip, the following describes how to build the fork:


== Compiling rkdeveloptool ==
You will need to have libusb 1.0, its development headers and scdoc installed.
 
Pine64 has forked the rkdeveloptool by RockChip, the following describes how to build the fork


   git clone https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool.git
   git clone https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool.git
Line 36: Line 36:
   cmake ..
   cmake ..


This sets up all the build files. You can then compile with <code>make</code> inside the build directory.
After you're done, you'll likely also need to install the udev rules, or else your user won't have permission to access the USB devices:
  sudo cp 99-rk-rockusb.rules /etc/udev/rules.d/
  sudo udevadm control --reload


Copying the udev rules is also performed automatically when you <code>make install</code>.


[[Category:PineNote]]
[[Category:PineNote]]

Revision as of 13:24, 15 January 2023

Using rkdeveloptool

rkdeveloptool is a command line tool that can communicate with a some Rockchip SOCs like the RK3566 in the PineNote when they are in maskrom/download mode.

rkdeveloptool can among other things read and write to the eMMC inside the PineNote.

It is therefor useful for backups and installing an OS to the PineNote.

About the boot process of the PineNote

When the RK3566 is powered on it checks the attached storage devices in the boot order:

 SPI NOR flash
 SPI NAND flash
 eMMC
 SD-Card

In the case of the PineNote there is only the eMMC

If the SOC finds a storage device with a valid ID BLOCK it proceeds to boot from the device.

If no usable storage device is found the ROM in the SOC enters maskrom mode and awaits a connection over USB

The PineNote additionally has a magnet sensor that is read by U-Boot during startup and if it detects a magnet U-Boot places the device in USB download mode


Compiling rkdeveloptool

Pine64 develops a forked version of the rkdeveloptool by RockChip, the following describes how to build the fork:

You will need to have libusb 1.0, its development headers and scdoc installed.

 git clone https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool.git
 cd rkdeveloptool
 mkdir build
 cd build
 cmake ..

This sets up all the build files. You can then compile with make inside the build directory.

After you're done, you'll likely also need to install the udev rules, or else your user won't have permission to access the USB devices:

 sudo cp 99-rk-rockusb.rules /etc/udev/rules.d/
 sudo udevadm control --reload

Copying the udev rules is also performed automatically when you make install.