Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 2.06 KB

flash-spi.md

File metadata and controls

57 lines (38 loc) · 2.06 KB

Flashing and Erasing the SPI

Traditionally, booting Linux on the ROCK64 required an eMMC or microSD card, however it is now possible to boot without those, assuming the SPI memory has been flashed. The ROCK64 contains an onboard 128Mbit SPI flash memory, which can be flashed with U-Boot in order to provide additional boot options:

  • USB2 / USB3 drive
  • PXE
  • microSD
  • eMMC

1. Write the U-Boot image

  1. Download the latest u-boot-flash-spi.img.xz image

  2. Write it to a microSD card using dd or Etcher

    # From Linux or macOS
    xz -k -d -c -v -T 3 u-boot-flash-spi.img.xz | dd of=/dev/<sdcard> bs=1M

Make sure you write to the correction location, it will destroy all data.

2. Boot the ROCK64

  1. Insert the microSD card

  2. Wait for it to boot. It will automatically erase the SPI memory, and flash U-Boot

  3. You should see: the power LED (white LED) flicker once per second, and:

    SF: ... bytes @ 0x8000 Written: OK
    
  4. Remove the microSD card

3. Prepare Linux

Tested successfully with Debian Stretch Minimal 0.6.15-175

  1. Prepare your device (USB drive, microSD, PXE, whatever) with your chosen Linux distribution

  2. Boot method:

    • Boot from microSD/eMMC/USB drive: write the image using dd or Etcher
    • Boot from PXE: we assume you already know what you're doing
  3. Reset the ROCK64

  4. You should see U-Boot starting from SPI memory, and then booting Linux

Make sure you remove the microSD card containing the u-boot-flash-spi image, otherwise on reset it will erase/write the SPI memory once again.

Boot order:

  1. SPI flash
  2. eMMC (disable with jumper)
  3. microSD
  4. USB drive
  5. PXE

If you're currently running the OS from microSD, and want to switch to a USB/SSD drive, follow the instructions on this page.