====== Cb3 Lubuntu-12.10-desktop Nand Installation V1.00 ======
//__About this Article__//
* **Author**: benn --- benn@cubietech.com --- 2013/10/31 12:27
* **Copyrights**: [[http://creativecommons.org/licenses/by-sa/3.0/|CC Attribution-Share Alike 3.0 Unported]]
* **Contributors**: [[http://cubieboard.org/|Cubieboard Community]] : ...
===== 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 [[http://docs.cubieboard.org/products/start|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 [[http://www.lubuntu.net/|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.
The latest version is v1.02 ([[http://dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-nand-v1.02/|download]])
===== 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 [[http://dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-nand-v1.00/VGA/|firmware]] \\ login/password: linaro/linaro
==== PhoenixSuit ====
To flash the image to cubietruck board, you need to install phoenixsuit on your labtop. Please refer to the [[http://docs.cubieboard.org/tutorials/common/livesuit_installation_guide|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
{{:tutorials:ct1:installation:lubuntu-livesuit.png?700|LiveSuit GUI}}
==== Select Image ====
{{:tutorials:ct1:installation:lubuntu-livesuit-2.png?700|LiveSuit GUI}}
==== Enter FEL Mode ====
{{:tutorials:ct1:installation:livesuit-enter-fel-mode.png?700|LiveSuit GUI}}
- Press FEL key and while holding it
- Plug in mini usb cable, and wait the following prompt
- Release FEL key
{{:tutorials:ct1:installation:lubuntu-livesuit-3.png?700|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
{{:tutorials:ct1:installation:lubuntu-livesuit-4.png?700|LiveSuit GUI}}
{{:tutorials:ct1:installation:lubuntu-livesuit-5.png?700|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 [[http://dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-nand-v1.00/ct-lubuntu-desktop-20131026/kernel-source.tar.gz|here]]. And the defconfig is [[http://dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-nand-v1.00/ct-lubuntu-desktop-20131026/configs/sys_config.fex|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.
{{tag>Cubieboard Cubietruck}}