Hacking the Banana Pi M3 – Part 1

Everything started as a game…

     I am an IT engineer working for a company that sells custom devices based on ARM architecture. A couple of years ago, as a game, I started to play with the idea of replacing our test row of x86 based Qemu ARM emulators with a row of real ARM based, low consumption systems – and then ideally using KVM or Xen VMs on it. We made several attempts with different SOCs, Rpi 1 & 2, BPi M1, etc…, but never got too far with that toy-project, because – putting aside speed – the stuff that we deploy on our systems requires too much memory for all these SOCs. We use Java8 on ARM, and although our software is fine to run on a >256MB RAM system, the automation and the various test tool that we use simply cannot be shrunk to run on a 512MB or 1GB system – no matter what we did. Separating the dev+test environment from the actual app was theoretically possible but would cost too much work and make too many people unhappy… So we abandoned the idea… Despite that, I continued to read forums and stay up informed about new SOCs releases. At the time, I remember that I found the SOC comparison on Wikipedia very useful and informative; if you don’t already know it, it’s worth to have a look at it:



The BPi M3 and the plan

     Recently, I came across of the specs of the Banana PI M3. On paper, its specs are beefy (octa core, 2gb ram, etc…);  especially the amount of memory was what caught my attention. I decided to resurrect my old project and a couple of weeks ago I got one delivered.

My short term goal was 1) try to see if it was possible to port either Fedora24 or Centos7 to it, and then 2) try to setup a Xen or KVM host on it.


The trouble

     Lurking on various forums I found a lot of useful information about the limits and the problems of the board, so I was prepared to put an extra effort to make it work as it should. What you read about under voltage and overheating is all true:


The long story short is that the BPi M3 implements a throttling mechanisms (called CPU Budgeting in its custom kernel) that is supposed to limit both power consumption and excessive temperature on the board; it works to some extent, but depending on the length of your micro usb power cable, the number of usb devices attached, and the CPU usage, etc… you do still end up with unexpected freezes and shutdowns of the system due to the board absorbing more power than what micro usb can carry. It all sounds catastrophically bad – I know, but in reality, it isn’t so tragic. In the following sections I will guide you to fix it.


The board

     As you can see here:


the M3 comes in two flavours, one with a micro usb power DC (apparently optional?) and another one with a barrel DC. If you have the latter, you are lucky! You can skip reading this part and just buy a 5V 3 or 3.5a power supply adapter with the right pin size (4.0mm x 1.7mm dc connector).

Mine came with a micro usb, like in these pictures:two




Anyway, you can clearly see that the board has all the right holes to host a proper barrel DC. If you are curious the drawings of the DC connector are published here:



The fix

     The barrel DC connector holes are far enough so that you don’t need to waste your time trying to desolder the micro usb DC. Just take pliers and crush it first, then peel it away firmly, but gently enough not to break the board.


Also, make sure that after removing the connector, the surface once covered by it is flat enough to host the replacement and there are no fragments of the old micro usb DC left there. The next step is to identify the right DC connector and buy it. Finding the exact one didn’t take long, these components are cheap and standard, and you find them everywhere.


I bought 15 pcs of them for less than £3 on Ebay here:


As you can see, they are exactly the right ones.


Next: soldering. This is not a tutorial on how to solder – but you can find plenty of them on the Internet. The tools needed to do basic soldering are cheap, and if you just want to practise a bit, you can buy them used on Ebay for few pounds – and learn a skill that is likely to be useful for you if you want to play with electronic components and PCBs in the future. A decent tutorial is available here:


Start with the big circular support in the middle. That would allow you to tightly fix the DC to the PCB – so that later you can do the others without having to keep pushing the DC close to the board.



Job done!



The power supplier

     For my needs, I estimated that a good 5V 3a power supplier would have been enough. As I said earlier, make sure that you buy a power supply adapter with the right pin size (4.0mm x 1.7mm dc connector). I bought mine on Ebay here:


With the proper Google search kung-fu you can probably find it somewhere for like £5 or less. In any case, I wanted to buy from a UK seller – which is the place where I live, and I didn’t want to wait for weeks; this one works, and here you have some more pictures of it:




Time to power up the whole thing UP….

     Ready, steady, GO! I have yet to buy a case – before buying one I wanted to check that the board is stable enough for my needs.


I downloaded the Centos “preview” image here:


And started to do some experiments. There both good news and bad news. I will talk more about that in the second part of this post. For now, the good news are that the board seems to work well, it’s stable and it does not freeze or shutdowns – not even under heavy load.


It’s all for now. Stay tuned for the second part of this post. Thank you for reading!