Banana-Pi and jailhouse

Installing Debian Linux on Banana-PI

Resource 

  • Bananian 
  • A Debian Linux distribution  build for banana PI
  • U-Boot
  • Boot-loader for Embedded development boards

Installation

Follow the installation instructions on Bananian official site to build your SD card. Bananian has serial console enabled as default with 115200 baud rate. One can connect to the baord with a serial cable.

The default user/password for Bananian is root/pi. 

Suggesting running bananian-config the first time logging in.

Adjusting U-boot for kernel booting arguments

Jailhouse need to boot with certain Kernel arguments to reserve memory for other cells. We must adjust U-boot config file to boot with these arguments.

The u-boot partition is not mounted by default. Thus, we need to mount it first.

mount /dev/mmcblk0p1 /boot #As mine SD card is being recognized as mmcblk0

Now, we can access u-boot config from /mnt/. Adjust boot.cmd
vi /boot/boot.cmd

Append 
mem=958M vmalloc=512M
on the end of line starts with
setenv bootargs

After saving the file
cd /boot
mkimage -C none -A arm -T script -d boot.cmd boot.scr

Compiling Kernel

Jailhouse need to be compiled with kernel objects. Thus we first need a copy of kernel source code and compile it.

Jailhouse did mention Kernel Version >= 3.9, for sake of this. I choose to compile Kernel version 4.3.3 with patch provided by Bananian team.

To speed up the process we will do cross compiling on a x86 machine

Getting Kernel source code

Getting patches
git clone https://github.com/Bananian/bananian.git

Getting cross compiling tool-chain
  • "linaro-toolchain-binaries (little-endian) -> linux" is the one to download