Skip to content

Instantly share code, notes, and snippets.

@tstellanova
Last active January 9, 2022 13:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tstellanova/b485fa84acf70889fb4e89c4af505440 to your computer and use it in GitHub Desktop.
Save tstellanova/b485fa84acf70889fb4e89c4af505440 to your computer and use it in GitHub Desktop.
Setup ROCK64

Prepare bootable SD card

  • Use Etcher to create a bootable SD from a Debian image. (I used a Stretch Lite image )
  • By the way, be sure to use a good quality, fast read/write speed micro SD card with ample space, such as this SanDisk 32GB card. You will notice better performance.
  • Insert SD card

Setup serial console

  • Attach serial console cable on pins 6,8,10 (same as RPi3). You can use a USB to TTL converter cable to connect. Note that some "FTDI" cables have problems with the 3.3V levels that the ROCK64 serial port uses -- the cable I suggested uses the SiLabs CP2012 chipset, which can handle 3.3V.
  • Use eg picocom or screen to connect to serial console. Settings are: 1500000 8N1
    • picocom --b 1500000 --d 8 --parity n --stopbits 1 /dev/cu.SLAB_USBtoUART
    • Note that some FTDI cables may have problems with the 3.3V logic the ROCK64 provides

Boot with both eMMC and SD card visible to OS

  • Attach F-F jumper to two pins next to "Recovery Btn" on board
  • Power-up to boot. You should immediately see text output in the serial console.
  • When uboot boot timer is visible, hit any key to stop boot
  • Remove jumper
  • Type boot to continue boot process
  • Login is rock64/rock64
  • sudo fdisk -l : should see two kinds of devices in the list:
    /dev/mmcblk1xx   This is your SD card
    /dev/mmcblk0xx   This is your eMMC module
    
  • If you don't see the right devices, reattach jumpers, sudo shutdown -h now, power down and retry.

Flash eMMC with initial image

  • If all looks good, create a file setup.sh with:
curl -L https://github.com/ayufan-rock64/linux-build/releases/download/0.5.15/stretch-minimal-rock64-0.5.15-136-arm64.img.xz | unxz -c > /dev/mmcblk0
  • sudo chmod 0754 setup.sh
  • sudo setup.sh this should cause the image to be downloaded and installed to the eMMC
  • Shutdown, remove SD card, and reboot

Setup Wifi

  • Insert Realtek 8188eu -compatible wifi usb dongle
  • Edit /etc/wpa_supplicant/wpa_supplicant.conf :
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid=<SSID>
        psk=<psk>
        scan_ssid=1
}
  • Look for the generated wifi interface name by doing sudo ifconfig -a -- it's not eth0, lo, or p2p0 , it is something like wlx0013ef801bc3 -- copy this name
  • sudo vi /etc/network/interfaces and append the following:
auto wlx0013ef801bc3
allow-hotplug wlx0013ef801bc3
iface wlx0013ef801bc3 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
pre-up iw dev wlx0013ef801bc3 set power_save off
post-down iw dev wlx0013ef801bc3 set power_save on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment