Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?

The banana pi m1 works with the cheap ~$15 chinese 5 port sata multipliers.

Warning: The multipliers will get really hot and unreliable under load or if more than three drives are attached. Definitely put at least a heatsink on it.

With the official bananian distro it appears to work out of the box but it unfortunately only works with one drive at a time.

To get it working with multiple drives you need to enable the sunxi pmp support. The reason this is not enabled per default is that when it is enabled you will be unable to use the sata port without a port multiplier.

The kernel in the official bananian distro does not have sunxi pmp support compiled into it and the kernel is too old anyway.

Download the mainline Debian release from https://www.armbian.com/banana-pi/ (4.9.7 as of this writing) and write the image to your sd card.

Boot up your banana pi form the sd card. It will take ~3 minutes the first time. It will be set up to request an IP over DHCP over ethernet so set up a DHCP server and listen for it to request an IP.

ssh in as root with password 1234. It will ask you to change the password and create a user account on first login.

Now check that you have sunxi pmp support in your kernel:

zgrep PMP /proc/config.gz

You should see:

CONFIG_SATA_PMP=y

Now to enable sunxi pmp support edit /boot/boot.cmd. Find the line that begins with setenv bootargs and add:

ahci_sunxi.enable_pmp=1

To the end of that line (within the quotes).

Within the /boot directory run:

mkimage -C none -A arm -T script -d boot.cmd boot.scr

This will generaty the binaray file boot.scr from boot.cmd and uboot reads kernel cmdline arguments from boot.scr on boot.

Reboot.

Verify that all your sata drives show up:

blkid

Rejoice (or bang your head against the table, depending on outcome).


hradec commented Nov 7, 2017

I can confirm these instructions also work for arch linux on the bananapi!

thanks lots!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment