Boot Mode

来自Firefly wiki
跳转至: 导航搜索


RK3128 has flexible boot modes. Under normal circumstances, unless hardware is damaged, FirePrime development board will never become brick (brick means not able to boot or flash).

If accident happens during upgrading firmware, bootloader is broken, making it impossible to upgrade again. The device can enter into MaskRom mode as the last resort.

Load Methods

RK3128 has 20KB BootRom and 100KB internal SRAM, which supports booting from following devices:

  • 8bit async Nand Flash
  • 8bit toggle Nand Flash
  • SPI
  • eMMC

That is to say, besides Nand, SPI and eMMC flash, RK3288 also supports booting from SD card.

Moreover, RK3128 can download system code from USB OTG.

Boot Sequence

The boot sequence is:

  1. Soc powers up and initializes.
  2. BootRom code runs in SRAM, loads and verifies bootloader's bootstrap code from storage device.
  3. If the verification passes, run the bootloader bootstrap code.
  4. The bootloader initializes DDR RAM, loads the complete bootloader into DDR RAM and runs it.
  5. Bootloader loads Linux kernel from storage device, then executes it.
  6. Linux kernel takes control of everything now.

Boot Mode

RK3128 has three boot modes:

  • Normal mode
  • Loader mode
  • MaskRom mode

Normal Mode

Normal mode, that is the normal boot procedure, load every components subsequently, and boot into operation system normally.

Loader Mode

In Loader mode, bootloader will enter into upgrade state, waiting for commands from host, which is used in firmware upgrading.

To enter Loader mode, make the bootloader aware that the RECOVERY key is pressed and USB cable is connected:

The first one, device is cut off all the power sources, such as power adapter and Micro USB OTG connection:

  1. Keep micro USB OTG cable connected with host PC.
  2. Press and hold RECOVERY key.
  3. Connect micro USB OTG cable to the device.
  4. After around two seconds, release RECOVERY key.

The other way:

  1. Use micro USB OTG cable to connect host and device together.
  2. Press and hold RECOVERY key.
  3. Shortly press RESET key.
  4. After around two seconds, release RECOVERY key.

MaskRom Mode

MaskRom mode is used to fix system when bootloader is broken.

In most cases, there are no need to enter MaskRom mode. When the BootRom code fails to verify bootloader (cannot read IDR block, or bootloader is broken), it will boot into MaskRom mode, which waits for host to send bootloader code through USB, then runs it, so that bootload can take control again.

To enforce device into MaskRom mode, please check this.