My note on Installing OpenWRT on Banana Pi R1 (BPi-R1)

Today, I just got my Banana Pi R1.  Here is a simple guide to set it up as an OpenWRT router.

Step 1: Flash the TF(microSD) card.

  • Goto the download page of BPi-R1 (http://www.bananapi.com/index.php/download?layout=edit&id=65)
  • Find and download the latest OpenWRT Image, which is version 4.0 (01/09/2015) as I write this.
  • Write the OpenWRT image to the TF card. I use OS X, here is the code I used in Terminal:
  • Find the disk number of your TF card. Mine is disk2[Bold number may varies on your computer, wrong number will cause serious problem, you will lose your data on the wrong disk]:
    diskutil list

    Unmount it:

    diskutil unmountDisk /dev/disk<strong>2</strong>

    Write the image:

    sudo dd bs=1m if=~/Downloads/BPI-R1_OpenWrt_V4.0.img of=/dev/rdisk<strong>2</strong>
  • If you are using other OS, follow the guide here (From Raspberry Pi, their are all the same except the image)
  • Eject the TF card  from your computer and insert it into Banana Pi.

Step 2: Power On your Banana Pi R1.

  • Plug in the 5V power cord to the correct port, it will power on by itself.
  • HDMI is not working on OpenWRT(only works few seconds while booting)
  • Connect the BPI-R1’s WAN to your home router/switch’s LAN (Assume DHCP is enabled )
  • Find the BPI-R1’s IP address. You may find it in the web management interface of your home router. Scan port 80 and 22 for the whole subnet other wise.
  • use root/admin to login BPI-R1
  • Mostly Done.

After that, I found only 80M(VFAT) + 150M(EXT4) was used on BPI-R1, which waste pretty much space on my 32GB TF card.

Extra Step: Expand the ext4 partition. (Inspired by SaruMaaz)

  • Download Gparted Live
  • Write Image to a Flash Drive (Assume the flash drive is disk2)
    sudo dd bs=4m if=~/Downloads/gparted-live-0.24.0-2-i586.iso of=/dev/rdisk<strong>2</strong>;sync
  • Restart OS X and hold Option key while booting,
  • Chooes ‘EFI Disk’
  • Enter your language code
  • Enter 0 and get to the GUI
  • Plug in the TF card, Find the TF card (mine is sdd)
  • Find the 150M partition, right click, change the size…
  • Apply
  • Done