Banana Pi and Arch Linux

After receiving my new Banana Pi to replace the well loved Raspberry Pi, it certainly was clear, I’m going to use Arch Linux, as this is my favorite distribution since the last five years.

Installation

So I downloaded the current ArchLinux_For_BananaPi_v2.0.

At first I had some problems with my installation, which I guess are the result of a failed disk dump. After the second try, everything seemed to work flawlessly. The first impressions were promising, the fresh system was much more fluent than the RPi. The Banana Pi journey finally could begin.

HDD and SATA

I attached an external 3,5″ HDD (with external power supply) via SATA-L to eSATA-I cable to the BPi and made some benchmarks using dd. I measured an average speed of  82 MBytes/s reading and 38 MBytes/s writing. Not perfect, but indeed much faster than the RPi with its limiting USB interface.

Networking

Due to the Allwinner A20 SoC limitations the BPi is not able to use the full theoretical bandwidth of the Gigabit Ethernet NIC. Yet the BPi is able to use about 510 MBits per second.
Benchmarking was done using iperf (average of 3 run times). Client BPi and server were connected to a Gigabit capable switch via Gigabit Ethernet.

After setup the samba server, I could get a satisfying average of 42 MByte/s reading/writing from/to the SMB server (an increase of factor ~6 compared to my Raspberry Pi SMB performance).

Xorg and HDMI Resolution

The Xorg server is installed as easily as any other package, the required driver is xf86-video-fbdev.The BPi resolution initially is set to 1280×720 at 50Hz. It was a challenge to find out, how to change this resolution to 1080p. In my case it was required to modify the given script.bin from the first partition of the SD card using Sunix tools (see also this thread).

The following process describes, how you do it.

cd $HOME
mkdir $HOME/boot
sudo mount /dev/mmcblk0p1 $HOME/boot
cp $HOME/boot/script.bin $HOME/script.bin
git clone https://github.com/linux-sunxi/sunxi-tools
$HOME/sunxi-tools/bin2fex $HOME/script.bin $HOME/script.fex

Now edit the created script.fex with an editor of your choice. Find the [disp_init] section and change the following parameter:

screen0_output_mode = 10

Save the changes, run fex2bin, backup and replace the previous script.bin.

$HOME/sunxi-tools/fex2bin $HOME/script.fex $HOME/script.bin
sudo cp $HOME/boot/script.bin $HOME/boot/script.bin.backup
sudo cp $HOME/script.bin $HOME/boot/script.bin

After creating a backup, you can change the disp.screen0.output_mode part of the $HOME/boot/uEnv.txt config with root privileges:

disp.screen0.output_mode=10:1920x1080p60

Unmount the boot partition, reboot and you should have 1080p/60Hz.

Next steps

As nobody opened an article in the Arch Linux Wiki yet, I created a new page for the Banana Pi hoping, that some users might find an easier start into the topic.

Now that my BPi is became more or less productive for its main purpose (serving files to the Windows/Linux network), I’m going to do the next steps in the following days. I plan to setup some emulators, a LAMP stack including OwnCloud, XBMC (I’m curious, how the Mali GPU performs compared to Raspy’s VC) and maybe a small DVR solution.

2 comments:

  1. Hi

    this is awesome. I just got my Banana Pi and haven’t had a chance to play a lot with it. I booted the preinstalled Raspbian and was suprised how good everything works.
    But I want to get my hands on Arch Linux and maybe the Android port.

    I have managed it to get the ARCHLINUX 2_0 image onto the SDCard and eveyrhing booted up fine. My knowledge with Arch is brand new and with Linux I can do some stuff, but not under the hood. I am more the GUI user. But I am learning.

    Long story short, what GUI would you recommend? I tried to install LXDE and XFCE but I can only get LXDE to work. No Background, just black and the right-click context menu. A lot of tools missing. What would you recommend?

    And also thank you for writing everything up. I have my own blog in german language and I am planning on documenting all I find out on my blog as well. Would be nice if I can use some stuff from here 😉

    Thanks and keep up!
    — Carsten

    1. Hi Carsen,

      thanks for your great feedback. Arch Linux is a great choice to learn Linux. You’re going to gain a lot of experience in the next months.
      To answer your questions: I use xfce as I’m familiar with it for years, but can recommend both user interfaces as both try to be lightweight. The Arch Linux Wiki provides awesome documentation on how to setup a desktop environment correctly (see xfce for example). It’s relatively easy when you set a xorg server up. Just install the whole “xfce4” group and run the “startxfce4” command.

      Of course you’re welcome to use stuff from here. I’d like to ask you to mention the sources.

      By the way: Ich komme auch aus Deutschland. Berlin um genau zu sein 🙂 Grüße nach drüben!
      Ryad

Leave a Reply

Your email address will not be published. Required fields are marked *