Skip to content
xiaow6 edited this page Oct 17, 2017 · 38 revisions

Welcome to the tina wiki!

0.Ubuntu Environment Configutaion

Tina only supports 64 Bit Ubuntu 12.04/14.04. And you need to install the following packages by using $sudo apt-get install command : git, gcc, binutils, bzip2, flex, python, perl, make,ia32-libs, grep, libssl-dev, unzip, gawk, subversion, libz-dev, libncurses5, g++ ,libncurses5-dev, ncurses-term, zlib1g-dev, bison, autoconf, vim and libc headers.

0.1.For Ubuntu 14.04

If you are using Ubuntu 14.04 or later version, you might have problems to install ia32-libs, and here is the solution:

$sudo -i  
$cd /etc/apt/sources.list.d
$echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" > ia32-libs-raring.list
$apt-get update
$apt-get install ia32-libs
$rm ia32-libs-raring.list

1.SDK Download and Update

1.1.Download SDK

//Do not run it in root 
$ git clone https://github.com/pd2-linux/tina.git -b tina-v1-dev
$ mkdir -p tina/lichee
$ cd tina/lichee
$ git clone https://github.com/pd2-linux/linux-3.4.git
$ cd tina/lichee/linux-3.4
for r16
$ git checkout r16-tina-v1.y
for r8
$ git checkout r8-v1.y
for r58
$ git checkout r58-v1.y

// download brandy for tina
$ cd tina/lichee/
$ git clone https://github.com/pd2-linux/brandy.git
$ cd tina/lichee/brandy
// the same way to switch to R8/R16/R58 branches
for r16
$ git checkout r16-tina-v1.y
// ...  

1.2 Update SDK

If github-repo code updated, you need to sync code.

$ cd tina
$ git pull
$ cd lichee/linux-3.4
$ git pull
$ cd ../../
$ make target/linux/clean V=s #clean linux kernel

2.Compile SDK

2.1.R8 and R16

$ cd tina
$ ./build.sh config
//for r16
  sun8iw5p1 -> tina -> ? -> linux-3.4  //? depends on your boards
//for r8
  sun5i->tina->?->linux-3.4
$ source scripts/setenv.sh 
$ ./build.sh debug

2.2.R58

$ cd tina
$ ./scripts/feeds install -a
$ cp config/r58_config-3.4 target/linux/sunxi/config-3.4
$ cp config/r58_defconfig .config
$ make V=s

2.3.Compile bootloader

$ cd tina/lichee/brandy
$ ./build.sh

3.Flash firmware

After compile Tina successfully, you can use the following command to pack tina to a firmware image:

$ pack [-d] //source scripts/setenv.sh must be done before

with option -d you can use an AllWinnertech TF card to check the log information, or you can use pack and an uart cable. Firmware images are under directory: tina/bin/sunxi/

r16 firmware put on tina/bin/sunxi/sun8iw5p1_tina_*_.img
r8 firmware put on tina/bin/sunxi/sun5i_tina_*_.img

3.1.Linux tools

you can use LiveSuit to Flash firmware
tool path:tools/aw_tools/LiveSuitV306_For_Linux32.zip,its for 32bit Linux OS
tool path:tools/aw_tools/LiveSuitV306_For_Linux64.zip,its for 64bit Linux OS

3.2.Windows tools

you can use PhoneSuit to Flash firmware
tool path:tools/aw_tools/PhoenixSuit_CN.msi

4.Tina SDK Custome

you can use `make menuconfig to custome software packages
you can use `make kernel_menuconfig` to custome linux kernel
more infomantion refer to OpenWrt wiki

5.some spec configure

5.1.bootloader env config:package/boot/uboot-sunxi/env.cfg
5.2.board config:package/boot/uboot-sunxi/bootloader/sun8iw5p1/configs/evb/sys_config.fex
5.3.systom partitions config:package/boot/uboot-sunxi/bootloader/sun8iw5p1/config/evb/sys_partition.fex