Linux / Hardware : replacing cubieboard by cubieboard2

I recently upgraded one of my cubieboard by a cubieboard 2 (webserver). The goal was to keep everything else but the motherboard… This post describes main necessary steps to do such a change as quickly and flawlessly as possible (so no custom kernel here…).

The board I replaced run debian Sid (jessie) on an microSD with kernel 3.0. This microSD is detected as  /dev/sdb on the laptop I use to upgrade.

Bootloader and Script.bin

The cubieboard 2 use a A20 SoC instead A10. So the uBoot , script.bin and kernel are differents. I retreived these files from

dd if=u-boot.bin of=/dev/sdb bs=1024 seek=32
mount /dev/sdb1 /mnt/sdcard
cp script.bin /mnt/sdcard/
cp uImage /mnt/sdcard/

Note that this kernel embed sw_ahci_platform. In case a SATA hardrive is used, no additional module is needed.

Environment variables

uEnv.txt has to be updated (or created) to define the machine ID that the kernel wait for and define the root filesystem. This file is on the first bootable partition (the one where we copied script.bin and uImage).


Setting  MAC address

Unlike on cubieboard 1, I did not manage to set the mac address neither from script.bin nor by adding “extraargs=mac_addr=…” in uEnv.txt.

So I simply created an executable sh file in /etc/network/if-pre-up.d :

#! /bin/sh
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

MySQL is crashing…

Mysql fail to bind ip address (kernel error ?). As I use it only locally, I forced it to use unix socket instead of local IP ( The parameter is deprecated but still works for now. In /etc/mysql/my.cnf


Leave a Reply

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