Banana Pi / Arch Linux / Customized Distribution

I was kindly asked if I could build a LXDE distribution based on Arch Linux in the forums. So I built a customized Arch Linux image which is based on the latest ArchLinux for BananaPi image version 1412 (kernel 3.4.103).
The feedback was overwhelming: I received a lot of suggestions, constructive criticism and acknowledgement.

If you are interested in my work, buying my Banana Pi Cookbook using this Amazon Affiliate Link is a great way to support me. Thank you!

Customizations

Beside some minor tools, following software is included in the image:

  • sunxi-tools (fex2bin, bin2fex, etc.)
  • fbturbo
  • lxde
  • yaourt
  • vlc
  • mplayer and smplayer as graphical frontend
  • xbmc (writes direct to frame buffer, no hardware accelerated video)
  • kodi (uses smplayer as external player, hardware accelerated video)
  • firefox
  • chromium
  • w_scan

Moreover I compiled a custom kernel [1][2] based on version 3.4.103 with following modifications:

  • built in support for XFS and experimental btrfs
  • support for DVB-T USB devices with chipset RTL2832U (module rtl2830)
  • set CONFIG_FHANDLE=y in kernel configuration to ensure flawless auto-mounting of external devices on boot

Download

For traffic reasons, I uploaded the images to external hosters.

Release version Release date File size (MB) MD5 Mirrors
5 2015-03-09 1249.47 16169f9078a68ce3a3ee0a1a1ac669e2 Google Drive
4 2015-03-02 1203.13 9b1f5a2ca6d8469bbf895d7e30fedd73 Google Drive
3 2015-02-08 1287.63 36136489167599a740c0943bf56fe23d Google Drive
2 2015-02-06 862.62 45a302bf809b0ef276938f4ec9b934d8 Google Drive
1 2015-01-04 673.08 5e0df3ef4d80dbd53a1d1fb7876f5eeb Google Drive

Installation

After downloading the image, you want to unpack the image on your machine:

tar -xJvf ArchLinux_For_BananaPi_v1412_eldajani.img.tar.xz

Then you flash the image to your SD card. The SD card will be overwritten completely, so please backup the content previously! I assume, your SD card device is /dev/mmcblk0.

sudo umount /dev/mmcblk0*
dd bs=1M if=ArchLinux_For_BananaPi_v1412_eldajani.img of=/dev/mmcblk0

This will take some time. After the writing progress, your SD card is ready to be plugged into the Banana Pi.

Usernames and passwords

I didn’t change the default usernames and passwords from the LeMaker Arch image:

Description Username Password
default user bananapi bananapi
super user root bananapi

Banana Pro


To enable the wifi device on the release version 5, do the following:

sudo cp /media/0CEA-A8B5/devices/script.bin.bananapro /media/0CEA-A8B5/script.bin
sudo systemctl reboot

To configure a wireless connection, please refer to netctl - ArchWiki.

Hardware accelerated video

You should be able to play 1080p videos flawlessly using (s)mplayer and vlc, as both are hardware accelerated using VDPAU.
Since image release 3 kodi 14.1 "helix" is included. As there are still a few problems with the drivers and software, it's not possible to have a flawless experience using the native player from kodi/xbmc for 1080p content.
However I included a configuration, that uses smplayer as the video player for kodi, so that videos up to 1080p are playable from kodi. It's not the best solution, as smplayer is not seamlessly integrateable into kodi, but it's better than native A10 compiled xbmc (which is still included).
So xbmc should also work, but without hardware acceleration. An external player is not usable, as the A10 xbmc version writes directly to the frame buffer. Therefore you might also get problems when exiting xbmc. Then you have to restart the display manager "slim" (sudo systemctl restart slim).

The LEDs

Since release 2 I added the disabling of the green user LED and ethernet LEDs.

You can revert the "heartbeat" of the green LED by editing the fex file [3] using the following configuration in the [leds_para] section:

leds_default_1 = 1
leds_trigger_1 = "heartbeat"

To revert the default behaviour of the ethernet LEDs, just stop and disable my "bpi-ledset" systemd unit:

sudo systemctl stop bpi-ledset
sudo systemctl disable bpi-ledset

Please also note

The desktop environment is LXDE. For file size reasons, I removed xfce4 from the image. However, of course you're free to install and use any desktop environment.

The image is configured to use HDMI as video and audio output. If you want to change the audio output to analog, change the card values from 1 to 0 in /etc/asound.conf.

Please also note that I used the original image size of 4 GB. I recommend using a larger SD card and enlarge the root partition using gparted or the like.

Disclaimer

Although I have compiled this software with utmost care, you will use this software at your own risk. I am not liable for any damage.

Changelog

  • Release 6: 1 June 2015 (latest) TEMPORARY DISABLED!:
    • overall software update
    • add a script "banana-device" to easily activate the Banana Pi/Pro configuration
    • add the chromium browser
    • add wpa_gui for easy wifi configuration on the Banana Pro
    • disable Slim as it has been abandoned, using automatic login to virtual console and shell profile instead
  • Release 5: 9 March 2015:
    • add support for Banana Pro
    • updated and re-compiled kernel including Banana Pro components (using lemaker-3.4-dev branch as upstream)
    • overall software update
    • re-enabled USB OTG as host only (USB powering will be disabled, use the dedicated USB power in instead)
  • Release 4: 2 March 2015:
    • overall software update (including recompiling of fbturbo due to a Xorg server update)
    • slightly overclock from 912 MHz to 1008 MHz
    • disable screen blanking
    • disable USB OTG to lower average sysload
    • add a script cpuinfo, which shows you the current frequency, govenor and temperature (you can see track information using watch cpuinfo)
    • add firefox
    • add GStreamer (including gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and gst-libav)

    Special thanks to "G" for his valuable feedback and improvement suggestions!

  • Release 3: 8 February 2015:
    • overall software update
    • compiled kodi (v14.1 "helix") from source [4] and set smplayer as external player
    • uninstalled xfce4 for file size reasons
  • Release 2: 6 February 2015:
    • overall software update
    • add smplayer (smplayer-qt4) as graphical frontend for mplayer
    • add vlc media player
    • disable green LED via script.fex/script.bin
    • disable ethernet LEDs via bpi_ledset from sqr82 and egamorena
    • disabling DPMS to avoid turning off the display after some idle time, which is reversible via reboot or reset of resolution only
    • enable udisks daemon to auto-mount USB drives conveniently
    • kernel modifications for LeMaker kernel 3.4.103:
      • added built in support for XFS and experimental btrfs
      • added support for DVB-T devices with chipset RTL2832U (module rtl2830)
      • set CONFIG_FHANDLE to "yes" to avoid problems, if auto-mounting SATA device on boot
  • Release 1: 4 January 2015: initial release

References

339 comments:

  1. Hi Ryad,
    I just wish to thank you for your guide about hardware acceleration.
    After many tries i am now able to play 1080 video with mplayer.
    Now i made a base archlinux image as start to fine tune a lot of stuff that now are not well working but is a start.
    As you wrote , this board is EOL but i own 4 boards and i don’t like to trash so, with my (feeeew) spare time i’m trying to give them a new life.
    If you are interested in my image, let me know and i’ll put a link in my google drive.
    Regards form Italy, Massimo.

  2. Helo,

    I have made a music player device out of banana pi m1+ for my sister last year. Now she asked me, whether it could play videos too. I haven’t had a change to try your image, but it seems promising. I would like to ask you if it is possible to install/use the following software (which is already used on bananian linux currently):
    – Transmission deamon
    – Samba (It has a hard drive attached also)
    – MPD

    Thanks in advance!

    Tamás

    1. Hi Tam├ís, thanks for your interest. Indeed it is possible to solve all these tasks on that image, but I guess, you will need to acquire older versions of these packages to be compatible with my old image. If you upgrade the image using “pacman -Syu”, you will break at least video acceleration (as you would get a new, incompatible kernel).
      I suggest, you build these packages from source using ABS respectively AUR.

    1. Unfortunately no. I needed to build Kodi from source. If you want to use a new Kodi version, you need to rebuild the source. As you probably have a ton of dependencies to new software, you will need to upgrade your system which results in a mess. I’m sorry to say that, but I guess you’re out of luck, as long as Lemaker won’t open source their drivers (which is not going to happen).

  3. Muchas Gracias por su arduo esfuerzo para que la Bananapi, reproduzca 1080p; solo cambie unos valores al script.bin y funciona excelente.

    Antes utilizaba la imagen de armbian pero era un poco deficiente en la reproduccion de videos en 1080p, pero ahora con Archlinux, ni siquiera se realentiza y/o se traba, corre realmente fluido.

    Estare atento a su blog. Gracias nuevamente RafaelCCA.

  4. Also, I forgot to ask you..
    Is there a way to install samba or any file sharing over network pckg without breaking the system ??

  5. Hello Ryad and thank you for the great job.
    I have successfully installed your image and twist it to have my remote working but unfortunately had no success in autostarting irxevent or kodi or any other progs..

    Tried to set the @kodi, @kodi-standalone,@irxevent -d ~/.lircrc on autostart in:
    ” /etc/xdg/lxsession/LXDE/autostart ” with no success and also on “~/.config/lxsession/LXDE/autostart” with no success

    Could someone guide me in the right direction ?
    Kind regards
    Clement

    1. Yes, I managed to solve it.
      Was a simple amateur mistake as I was trying to modifie the files under root user.
      Thanks for the blog and help of the cookbook.

  6. I like your Custom Distribution.
    But there are no PVR add ons in codi, no live TV – so its useless for me.

    Is there a way to get this add ons?

  7. Hi Ryad, please read, and help me if you can:

    I’m fiddling with my bananapi pro (m1+) and decided to use your custom built distro (v5). It works flawlessly, I hook up a SATA HD on it, with two ext4 partition, mount it, and plays HD videos, it’s perfect.
    But I want to use it also as a music server for my other pi (a raspberry). I need to install nfs-utils, and rpcbind, and start them as services. I managed to install both, rpcbind needs libtirpc to start, installed it, and after that the nfs is also started. I rebooted the banana, the boot runs normally, but i don’t get the desktop, and when i want to ssh, the putty says: Acces denied, whatever i tried to use as user/pass.

    What i’m doing wrong? Is it the libtirpc? is it the rpcbind? is it the nfs that ruins everything?

    Thank you for your response!

    1. Hello Bela,

      I guess, you tried to install the latest nfs utilities, i.e. you updated the pacman database and probably also the rest of your system. Unfortunately upgrading your System breaks some dependencies especially with the video system. I couldn’t figure out how to fix it right now. However, until this gets fixed, you are only able to install new software if it’s compatible with the stand of the distribution (which is outdated). Sorry!

      Ryad

  8. Hello Ryad,
    i ve a huge problem:

    I want to remote control my banana pi but this doesnt work with windows remote control –> xrdp_mm_process_login_response: login failed

    i can ping lemaker and i can remote the shell via putty.

    what can i do?

Leave a Reply

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