User Tools

Site Tools


tutorials:ct1:installation:cb3_lubuntu-12.10-desktop_nand_installation_20130910-build

This is an old revision of the document!


Cb3 Lubuntu-12.10-desktop Nand Installation 20130910-build

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_desktop_12.10_20130910.img.gz
gzip -d ct_lubuntu_desktop_12.10_20130910.img.gz

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 holding it
  2. Plug in mini usb cable, and wait the following prombt
  3. Release FEL key

LiveSuit GUI

Flash to Board

When seeing the prombt, you have enter the 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 DHCP timeout.

Customizing

Changing Boot Parameters

TBD

Changing Kernel

TBD

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
brw-rw---- 1 root disk 93, 4 Oct 15 08:46 /dev/nandd
brw-rw---- 1 root disk 93, 5 Oct 15 08:46 /dev/nande
  • /dev/nanda

Contains the bootlogo, script.bin, and so on

root@cubietruck:~# ls /mnt/nanda/
boot.axf  drv_de.drv    font24.sft  linux      os_show   script.bin
boot.ini  drv_hdmi.drv  font32.sft  magic.bin  prvt.axf  sprite.axf
  • /dev/nandb

Contains the u-boot boot parameters. The origin is showed below,

bootdelay=1
#default bootcmd, will change at runtime according to key press
bootcmd=run setargs_nand boot_normal#default nand boot
#kernel command arguments
console=ttyS0,115200
nand_root=/dev/system
mmc_root=/dev/mmcblk0p7
init=/init
loglevel=5
#set kernel cmdline if boot.img or recovery.img has no cmdline we will use this
setargs_nand=setenv bootargs console=${console} init=${init} loglevel=${loglevel}
setargs_mmc=setenv bootargs console=${console} init=${init} loglevel=${loglevel}
#nand command syntax: sunxi_flash read address partition_name read_bytes
#0x40007800 = 0x40008000(kernel entry) - 0x800(boot.img header 2k)
boot_normal=boota 40007800
#boot_normal=sunxi_flash read 40007800 boot;boota 40007800
boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800
boot_fastboot=fastboot
#recovery key
recovery_key_value_max=0x13
recovery_key_value_min=0x10
#fastboot key
fastboot_key_value_max=0x8
fastboot_key_value_min=0x2

If you want to change your own kernel parameter, you can:

  1. Save above text to a file, e.g. env.cfg
  2. Use u_boot_env_gen tool to convert the file to a image
  3. dd the image to /dev/nandb
tutorials/ct1/installation/cb3_lubuntu-12.10-desktop_nand_installation_20130910-build.1381829413.txt.gz · Last modified: 2013/12/23 14:50 (external edit)