Cross-compilation for Banana Pi M2U

Using BPi for kernel (re)compilation is quite painful because it is very slow for this task. So I configured a virtual machine (VMWare in my case). Now, the kernel can be compiled in 50-80 seconds on my i7-4770. The configuration is easy if you read the following tutorial. I’ve tried several options before and selected this one.

1. Prepare a virtual machine with Ubuntu Linux 16.04 (64 Bit version only). I’ve created the default user with the “pi” name. Then the directory structure will be identical with your Banana.

2. Open the terminal (Ctrl + Alt + T) and install all necessary packages.

1
2
3
4
$ sudo apt-get update
$ sudo apt-get install bc make git gcc gcc-arm-linux-gnueabihf u-boot-tools ncurses-dev
$ sudo dpkg --add-architecture i386
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

3. Clone the official Git repository.

1
2
3
4
$ cd ~/
$ git clone https://github.com/BPI-SINOVOIP/BPI-M2U-bsp.git
$ cd BPI-M2U-bsp
$ nano build.sh

Change BOARD=BPI_M2U_720P to your preferred resolution BOARD=BPI_M2U_1080P

Now, you are ready for compilation.

1
$ sudo ./build.sh

4. Select the necessary option (1 – build all) and wait for a while.

5. The result should be placed to /home/pi/BPI-M2U-bsp/SD


There are no comments.

Leave a Reply