Skip to content

Tina Linux v5.0

The V853 chip officially supports the Tina Linux v5.0 system.

Tina Linux is an embedded software system developed by Allwinner based on the Linux kernel for intelligent hardware products.

Tina Linux v5.0 contains boot source code, kernel source code, drivers, tools, system middleware and application packages for Linux system development. It can be easily customized, compiled, packaged to generate Linux firmware images.

Tina Linux v5.0 can support building different build systems of openWrt and buildroot; it also supports compiling BSP (Board Support Package) separately; it can package and generate firmware package, burn it into the corresponding device and run it.

(1) Support for multiple build systems The complete SDK can support openWrt and buildroot, and some customized SDKs may only retain openWrt or buildroot, or even without any build system, and only support compiling simple BSP.

(2) BSP is highly multiplexed In Tina Linux v5.0, BSP (boot, kernel code, compilation and packaging tools, etc.) is an independent existence, which can support separate compilation and packaging, and quickly generate a firmware image.

(3) openWrt transformation Tina Linux v5.0 has made many changes to openWrt, such as decoupling from kernel compilation, directory adjustment of compiled products, independent warehouses of software packages and solution directories, etc., which can be more friendly to build rootfs separately and tailor the SDK.

openWrt is an open source embedded Linux system automatic construction framework, which is composed of Makefile scripts and Kconfig configuration files. Allows users to flexibly configure packages through menuconfig.

File Tree

The directory structure of Tina Linux v5.0 is mainly composed of build tools, build systems, configuration tools, tool chains, chip configuration directories, kernel and boot directories.

Tina Linux v5.0 has built-in quick jump command, which can quickly enter relevant folders for editing and modification.

The following is a brief introduction according to the directory order and quick jump command.

TinaLinux/
  ├── brandy                               # Store boot0, uboot codes.
  ├── build                                # Stores system build scripts for Tina Linux
  ├── buildroot                            # Store buildroot related configuration files and native buildroot code
  ├── build.sh -> build/top_build.sh       # Link to build/top_build.sh
  ├── device                               # Store the configuration file of the chip solution
  ├── kernel                               # Store different versions of kernel code
  ├── openwrt                              # Store openWrt native code, software package, and chip solution directory
  ├── out                                  # Store compilation-related temporary files and final firmware
  ├── platform                             # Store APP and lib source code
  ├── prebuilt                             # Store precompiled tools
  └── tools                                # Store host-side tools, download packaging tools

brandy

The brandy directory mainly stores boot0, uboot codes.

brandy
  └── brandy-2.0
      ├── build.sh -> tools/build.sh       # 超链接
      ├── spl-pub                          # boot0仓库
      ├── tools                            # 一些工具
      └── u-boot-2018                      # u-boot 源码

Quick jump command:cboot cboot0

build

The build directory stores the system build scripts of Tina Linux. The main functions are:

  1. Provide environment variables, functions, and rules required for compilation.
  2. Provide the compilation methods and rules of each target module.
  3. Connect to different build systems such as openWrt, buildroot, etc.
  4. Package the script to generate the system firmware

Quick jump command:cbuild

buildroot

buildroot related configuration files and native builroot code.

device

device is used to store the configuration files of the chip solution, including kernel configuration, env configuration, partition table configuration, sys_config.fex, board.dts, etc.

device
  ├── config
  │   ├── chips
  │   ├── common
  │   └── rootfs_tar
  └── product -> ./config/chips/v853

Quick jump command:cchips, cconfigs

kernel

kernel mainly stores different versions of the kernel code.

kernel
  ├── linux-4.9
  └── linux-5.4

openwrt

openwrt stores openWrt native code, software packages, and chip solution directories.

openwrt
  ├── build         # openWrt build system related hook script
  ├── dl            # compressed software package
  ├── openwrt       # openWrt native code directory
  ├── package       # Additional packages, including AW packages, third-party packages, packages introduced by feeds
  └── target        # Each chip solution directory is used to save differentiated configuration information

out

out is used to save compilation-related temporary files and final image files. This directory is automatically generated after compilation, such as the compilation scheme v853-vision.

out
  ├── v853
  │   ├── vision
  │   │   ├── buildroot
  │   │   ├── openwrt
  │   │   └── pack_out
  │   └── kernel
  └── toolchain
      └── gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi

According to the configuration selection, the final compilation product will be in the openwrt or buildroot directory, and the preparation files for packaging and generating firmware are stored in pack_out, the kernel is the kernel compilation product (only for linux-5.4 and above), and the toolchain directory is stored in The decompressed toolchain for compiling the kernel.

Quick jump command:cout

out/openwrt

out/openwrt
  ├── boot.img
  ├── rootfs.img
  ├── build_dir
  ├── staging_dir
  ├── tmp
  ├── extra
  ├── v853_linux_vision_uart0.img
  ├── uImage
  ├── vmlinux
  └── zImage
  • boot.img is the data that is finally programmed to the system boot partition, which may be in boot.img format or uImage format.
  • rootfs.img is the data that is finally burned into the system rootfs partition, which is in squashfs format by default.
  • build_dir is the temporary file directory for sdk compilation host, target and toolchain, which stores the source code of each software package.
  • staging_dir is the directory where the results of each directory are saved during the sdk compilation process.
  • The final generated ipk package will be saved in the extra directory.
  • The information related to the software package of this solution will be saved in the tmp directory
  • v853_linux_vision.img is the final firmware package (system image), the serial port information is output through the serial port
  • If pack -d is used, the generated firmware package is xxx_card0.img, and the serial port information is transferred to the tf card socket for output

Quick jump command:ctarget, crootfs

platform

platform stores the source code of some software packages. The compilation methods of these software packages are common and can be used in different build systems such as openWrt or buildroot. This directory exists to provide the possibility to share packages across different build systems.

The current platform directory structure is as follows, mainly based on whether it is a Quanzhi self-developed change, and the category distinction:

platform
  ├── allwinner
  │   ├── power
  │   ├── system
  │   ├── usb
  │   ├── utils
  │   └── wireless
  └── thirdparty
      └── gui

prebuilt

prebuilt holds some precompiled tools:

├── hostbuilt
│   ├── make4.1
│   └── python3.8
├── kernelbuilt
│   ├── aarch64
│   ├── arm
│   └── riscv
└── rootfsbuilt
    ├── aarch64
    ├── arm
    └── riscv
  • The make and python3.8 tools are stored in the hostbuilt directory, in order to solve the problem of compilation failure caused by the low version of some host-side tools
  • The kernelbuilt directory stores the toolchain compressed package for compiling the kernel, which will be decompressed to the out/toolchain directory
  • The rootfsbuilt directory stores the toolchain for compiling rootfs

tools

The tools directory is used to store some host-side tools, such as packaging tools.

SDK Download

Link: SDK Download

Compile Environmenet Config

Link: Compile Environmenet Config

Compile and Flash

Link: Compile Tina Linux Flash Tina Linux