User Tools

Site Tools


tutorials:ct1:installation:cb3_lubuntu-12.10-desktop_nand_installation_v1.00

This is an old revision of the document!


Cb3 Lubuntu-12.10-desktop Nand Installation V1.00

About this Article

Abstract

Cubietruck is the 3rd board of cubietech, which is also named cubieboard3. The board features an Allwinner A20 ARM Cortex-A7 dual core processor with Mali 400 MP2 graphics, 2GB of RAM, HDMI, Gigabit Ethernet, WiFi, Bluetooth, and a microSD card slot. There’s nothing too surprising in those specs, but here’s what sets this developer board apart from a tablet with its screen ripped off. The Cubietruck has a SATA 2.0 interface, 2 USB host ports, SPDIF, a headphone jack, IR port, and 4 LED lights. It also has 54 extended pins including UART, PS2, and a bunch of other options. Read more about cubietruck, please refer to here.

Lubuntu is a fast and lightweight operating system developed by a community of Free and Open Source enthusiasts. The core of the system is based on Linux and Ubuntu . Lubuntu uses the minimal desktop LXDE, and a selection of light applications. It's official site is lubuntu

The Cubie team have ported cubietruck to lubuntu-12.10-desktop, here is a guide for installing lubuntu-12.10-desktop to cubietruck nandflash.

Preparations

Download Images

wget http://dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-nand-v1.00/ct-lubuntu-desktop-20131026/lubuntu-desktop-nand.img.gz
gzip -d lubuntu-desktop-nand.img.gz

This firmware default HDMI output, for default VGA output please use this firmware

PhoenixSuit

To flash the image to cubietruck board, you need to install phoenixsuit on your labtop. Please refer to the Installation Guide

Here is my working enviroment

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="12.04.2 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.2 LTS)"
VERSION_ID="12.04"

uname -a
Linux ubt 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Installation

Start LiveSuit

$ ~/Bin/LiveSuit/LiveSuit.sh

LiveSuit GUI

Select Image

LiveSuit GUI

Enter FEL Mode

LiveSuit GUI

  1. Press FEL key and while holding it
  2. Plug in mini usb cable, and wait the following prompt
  3. Release FEL key

LiveSuit GUI

Some USB Ports do not provide enough current for the board. If this happen, please plug in power adaptor before click 'Yes'

Flash to Board

When seeing the prompt, you have enter FEL mode. Select Yes to continue

LiveSuit GUI

LiveSuit GUI

Congratulations! You have finished the installation process. Enjoy your Cubie and Lubuntu Desktop!

When you first start up the system, It will take about 2 minutes to initialize the system. Also we suggest you have the ethernet cable connected when booting, to avoid waiting for DHCP timeout.

Customizing

Changing Boot Parameters

#mount /dev/nanda /mnt
#vi /mnt/uEnv.txt  (change it as you want)
#umount /mnt
#sync
#reboot

Changing Kernel

  • Getting The Kernel Source

The kernel source matching this image is here. And the defconfig is here.

Please also refer to

http://github.com/linux-sunxi
http://github.com/cubieboard
  • Compiling
$tar -zxvf kernel-source.tar.gz
$cp kernel_defconfig linux-sunxi/.config
$cd linux-sunxi
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules

Building Custom Modules

TBD

Using GPIOs

TBD

Using GPIO Interrupt

TBD

Using PWM

TBD

Using More UARTs

TBD

C/C++ Programming

lubuntu-12.10-desktop is quite a modern operating system, that we can do almost all language programming, including C/C++, JAVA, Python, Perl, and so on. To support C/C++ programming, just run the following command:

#apt-get install build-essential

To become more productivy, you can also use VIM or EMACS

#apt-get install vim emacs cscope cscope-el

Tips

About Partitions

  • Partitons Layout

We have 5 partitions on the system, nand represent the whole nandflash. Nand[a-e] are treated as partitons

root@cubietruck:~# ls /dev/nand* -l
brw-rw---- 1 root disk 93, 0 Oct 15 08:46 /dev/nand
brw-rw---- 1 root disk 93, 1 Oct 15 08:46 /dev/nanda
brw-rw---- 1 root disk 93, 2 Oct 15 08:46 /dev/nandb
brw-rw---- 1 root disk 93, 3 Oct 15 08:46 /dev/nandc
  • /dev/nanda

Contains the bootlogo, script.bin, uEnv.txt, uImage and so on

  • /dev/nandb

rootfs

Wifi

  • Loading Module
#modprobe bcmdhd

Hint: add "bcmdhd" at the end of file /etc/modules to activate WiFi during boot.

  • Using Wifi

e.g.

#iwlist scan
#iwconfig wlan0 essid "ssid" key xxxx
#iwconfig wlan0
#ifconfig wlan0 up
#dhclient wlan0

Hint: iwconfig key does not support password phrase. One has to generate xxxx.

Hint: it is easier to use wpa_supplicant for wifi configuration with WPA2 and password phrase.

tutorials/ct1/installation/cb3_lubuntu-12.10-desktop_nand_installation_v1.00.1384917901.txt.gz · Last modified: 2013/12/23 14:50 (external edit)