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
-
Download the latest u-boot-flash-spi.img.xz image
-
Write it to a microSD card using
dd
orEtcher
# 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.
-
Insert the microSD card
-
Wait for it to boot. It will automatically erase the SPI memory, and flash U-Boot
-
You should see: the power LED (white LED) flicker once per second, and:
SF: ... bytes @ 0x8000 Written: OK
-
Remove the microSD card
Tested successfully with Debian Stretch Minimal 0.6.15-175
-
Prepare your device (USB drive, microSD, PXE, whatever) with your chosen Linux distribution
-
Boot method:
- Boot from microSD/eMMC/USB drive: write the image using
dd
orEtcher
- Boot from PXE: we assume you already know what you're doing
- Boot from microSD/eMMC/USB drive: write the image using
-
Reset the ROCK64
-
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:
- SPI flash
- eMMC (disable with jumper)
- microSD
- USB drive
- 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.
If, for any reason, your SPI flashing gets interrupted during its process, you may experience a "frozen" device.
To solve this, on the Rock64 follow these instructions:
-
Go to this guide to create a new ayufan bootable Linux SD card Or, in short, download the latest ayufan Linux distribution from here, and use etcher to flash you SD card
-
Insert the SD card to the Rock64.
-
Connect other peripherals such as network to later control your device, such as via ssh.
- ayufan’s Linux distro will connect to the network and you will be able to ssh to the device.
-
Ground the SPI Clock (SPI_CLK_M2) on the Pi-2 Bus GPIO pins on the rock64
-
Turn on the device and release the grounding of the SPI Clock 2-3 seconds after the device was turned on.
- NOTE: This is a critical step If not done correctly you will not be able to flash the device
- If unsuccessful turn of the device and try again.
-
login and go to the folder with the flashing scripts
cd /usr/local/sbin
sudo ./rock64_erase_spi_flash.sh
orsudo ./rock64_write_spi_flash.sh
- Type "YES" to flash the device
-
If the flashing failes with an error
loader partition on MTD is not found
repeat step 5.
Your device should now be able to boot without holding the SPI Clock.