Vecoo SDK mirror download and Use Instructions

Vecoo SDK Mirror Download & Use Instructions

Vecoo Linux is a deep embedded Linux system developed by Vyagoo, intended to provide a complete system environment similar to Android AOSP, which is convenient for customers to develop and customize. The Vecoo SDK in this article is the binary development environment for Vecoo Linux, can provide Vecoo Linux application and the development of the necessary tools for compilation.

  1. Writing purpose Guide

    Vecoo Linux application developers to get started quickly.

  2. Applicable scope Hardware:

    BPI-M2U and BPI-M2B development boards.

Vecoo development environment: Vecoo:We recommend development at ubuntu 12.04 / 14.04 / 16.04 64bit。The following example shows the steps required to build a development environment with an example of ubuntu 12.04 64bit.

Hardware Description

  • A Vecoo SDK requires about 2G of hardware spacel

  • Recommended system DDR capacity of not less than 4G

Ubuntu 12.04 need to install the software instructions:

Ubuntu 12.04 need to use the following command to install the Vecoo development environment required software (other versions of ubuntu much the same)

$ sudo apt-get update

$ sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev subversion mercurial ia32-libs

Vecoo SDK and mirror download:

Vecoo SDK and the mirror download link is as follows: http://pan.baidu.com/s/1i4MAjtj

Vecoo use: Compile method Vecoo sdk need to perform the following two commands before compiling

$ source build/envsetup.sh

$ lunch <select the corresponding board>

Then use the following command to configure sdk (can be omitted)

$ make menuconfig

$ make kernel_menuconfig

Finally, use the following command to compile and package sdk (Vecoo SDK does not support packaged firmware)

$ make

$ pack <-d>

Firmware burning method

  1. Windows brush tool phoenixsuit

This tool located in tools / tools, named PhoenixSuit_CN.msi. PhoenixSuit is running on windows and can be installed directly by double-click.The tool is through the usb to brush machine.

  1. Ubuntu brush tool LiveSuit

This tool located in the tools / atools, named LiveSuitV306_For_Linux * .zip, decompression after the package, by executing install.sh, the tool installed by default in the ~ / bin directory. After installation, you need to install the driver via sudo dpkg -i ~ / Bin / aw * .deb. For details, refer to the documentation in the archive. The tool is a version of PhoenixSuit for Linux. After the completion of these two tools, in the Bin directory to find LiveSuit.sh, direct implementation of the file to start brush machine tool.

【Note】If target machine have a press button "fel", directly press the fel key to insert usb line can brush machine. Use the Vecoo SDK way to develop, only need to brush once, then compile the binary executable file through the Vecoo SDK, and then push the adb to the target machine, use opkg install to install the app on the target machine.

Build the system

  1. Directory structure introduction

Vecoo SDK mainly system build, configuration tools, toolchain, host tools, target machine function package, document, script,then follow the directory to introduce the relevant components

The following describes each directory function and role.

“build” directory:

The “build” directory contains the build system of Vecoo Linux, its directory structure contains a series of mk files, is based on Makefile specifications written. The main function is

  1. to detect whether the current compilation environment meets the build requirements of Vecoo Linux

  2. generate host package compilation specifications

  3. generate the compilation rules of the tool chain

  4. generate the target package compilation specifications

  5. generate linux kernel compiler specifications

  6. generate the system firmware generation specifications

“config” directory:

The directory structure of config is as follows:

The “config” directory contains the interface for the configuration menu in Vecoo Linux and some fixed configuration items, which are based on the kernel's mconf specification.

“docs” directory:

The directory structure of docs is as follows:

“docs” directory group mainly stored for the development of the document, written in markdown format.

“package” directory:

The directory structure of package is as follows:

The “package” directory is used to store the source code and compilation specifications of the package on the target machine. The catalog is sorted by the function of the target package.

“scripts” directory:

The scripts directory is used to store some scripts used by the pc or the small machine.

“target” directory:

The “target” directory is used to store the target-related configuration. The directory structure is as follows:

“out” directory:

the “out ” directory is generated by the compiled directory, the directory structure is as follows:

Where the “host” directory is used to store the host-side tools and some of the development-related files. Other directories are the corresponding directory of the program,the directory and the program have the same name. Take arbutus-e360 as an example to illustrate the structure of the program directory:

The above directory, boot.img for the final programming to the system boot partition data, which partition defaults to vfat format. The rootfs.img for the final programming to the system rootfs partition data, the partition defaults to squashfs or ext4fs format. The * -uImage is the final mirror of the kernel and will be packaged into boot.img. The compile_dir save the compilation process of the host package, target package and toolchain source code and temporary files directory. The staging_dir is a directory where the contents of each directory are saved during sdk compilation. The packages directory saves the final generated ipk package.

2,The predefined variables in the SDK

Some of the commonly used directories or variables are defined in the SDK by default. These defined variables can be used in the Makefile of the SDK.

Environment variables exported in the SDK:

  • TARGET_PRODUCT, which holds the name of the target board. The name is defined in target/Vecoo/ <schema>/vendorsetup.sh, where the directory name of the <program> and TARGET_PRODUCT must be the same

  • TARGET_BUILD_VARIANT, which holds the type of SDK build, with Vecoo and dragonboard optional. Vecoo is the option for Vecoo linux, dragonboard is the option for board testing .

  • TARGET_BUILD_TYPE, which is developed by the development of the SDK, the development of the firmware is devel and the release of the firmware value is the release .

  • TARGET_PLATFORM, which specifies the platform name, where arbutus refers to A33 .

  • TARGET_BUILD_ARCH, which is the name of the platform, arm and arm64 two values.

  • TARGET_BUILD_CPU, which is used to store the value of the CPU, according to the different platforms have cortex-a7, cortex-a8, cortex-a57 etc ..

  • TARGET_PLATFORM_VERSION, which holds the current version of the SDK

Some of the commonly used variables defined in the SDK:

  • ARCH, which holds the ARCH of the current built target machine, and it is the same as the TARGET_BUILD_ARCH environment variable..

  • BOARD, which stoage the variable of the target board, and it is the same with the TARGET_PRODUCT environment variable

  • DL_DIR, which is a download directory, Vecoo /dl directory

  • TARGET_OUT_DIR, a output directory of the program compiling, Vecoo / out / <scheme>

  • BUILD_DIR,SDK a directory where compile system, Vecoo / build

  • SCRIPT_DIR, a directory where the SDK stores the script, Vecoo / scripts

  • COMPILE_DIR_BASE, a directory where compiled the SDK, in the TARGET_OUT_DIR under the compile_dir directory

  • COMPILE_DIR, a compiled directory of the target package in the SDK, which is under

  • COMPILE_DIR_BASE

  • COMPILE_DIR_TOOLCHAIN, a directory of the compiler toolchain in the SDK, the toolchain directory under COMPILE_DIR_BASE

  • STAGING_DIR, a directory where the target package contains the compiled results is stored in the TARGET_OUT_DIR directory under the staging_dir / tareget directory.

  • TOLLCHAIN_DIR, a directory where the SDK stores the toolchain in the TARGET_OUT_DIR directory under the staging_dir / toolchain directory..

  • TARGET_DIR, a directory that store the target with the file syste, and it is stored in the rootfs directory under

  • COMPILE_DIR

    STAGINT_DIR_ROOT, a directory storage the full file system, and it is stored in the roofs directory under the STAGING_DIR

Several commands commonly used in Makfile:

  • TARGE_CC, target machine c language compiler

  • TARGET_CXX, target machine c ++ language compiler

  • SED, equivalent to sed -i-e

  • CP, equivalent to cp -fp

  • R

    LN, equivalent to ln-sf

  • XARGS, equivalent to xargs -r

  • BASH, equivalent to bash

    TAR, equivalent to tar

  • FIND, equivalent to find

  • PATCH, equivalent to patch

  • PYTHON, equivalent to python

  • INSTALL_BIN, equivalent to install -m0755

  • INSTALL_DIR, equivalent to install -d m0755

  • INSTALL_DATA, equivalent to install -m0644

  • INSTALL_CONF, equivalent to install -m0600

3,How to compile SDK:

$ source build/envsetup.sh

$ lunch azalea-m2ultra_Vecoo

$ make -j

$ pack [-d]

Note lunch here to selected corresponding _Vecoo program can be. The process of make will generate the corresponding firmware package, also, the firmware package will be generated in the out / <program>

4,The built-in commands in the SDK :

The SDK integrates many easy-to-use commands,but these commands must be executed after the following two steps:

$ source build/envsetup.sh

$ lunch

The first command is the make command, which is that the user compile the entire sdk. Instructions can refer to Section 3.3, and the other commands is are as follows:

  • make menuconfig, start the package configuration interface

  • make kernel_menuconfig, start the kernel configuration interface

  • printfconfig, print the current SDK configuration

  • croot, cd to tina directory

  • cconfigs, cd to the program's bsp configuration directory

  • cdevices, cd to the program configuration directory

  • cgeneric, cd to generic directory

  • cout, cd to the output directory of the program

  • cgrep, file to find the string in the c/c ++/h

  • minstall, the command format is minstall path/to/package/, compile and install the package, only be used in the Vecoo directory

  • mclean, the command format is mclean path/to/package/, clean package, can only be used in Vecoo directory

  • mm, compile the package, only be used in the root directory of the package

5,How to configure sdk:

Using the make menuconfig command in Vecoo Linux SDK root directory that you can enter the Vecoo Linux configuration interface, the configuration interface and Linux Kernel configuration interface similar to the configuration options are y/m/n three configuration options, and the meaning of each configuration is as follows:

<*> (Press y)

Indicates that the package will be included in the firmware

<M> (press M)

Indicates that the software will be compiled, but will not be included in the firmware

<> (Press n)

Indicates that the software will not be compiled

6,Create and migrate packages

In the Vecoo Linux SDK, The package directory usually contains the following three directories:

Package / <name> / Makefile

Package / <name> / patches

Package / <name> / files

Among them, patches/files are optional, The paches directory is used to save the patch file, when compiling the system, it will automatically compile the relevant patch to the corresponding source code. The files directory is used to save the source code package, when compiling the corresponding source code will cover the source file in the corresponding Makefile, here is an example to illustrate:

include $(TOPDIR)/rules.mk

PKG_NAME:=bridge

PKG_VERSION:=1.0.6

PKG_RELEASE:=1

PKG_SOURCE:=bridge-utils-$(PKG_VERSION).tar.gz

PKG_SOURCE_URL:=@SF/bridge

PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd

PKG_CAT:=zcat

PKG_BUILD_DIR:=$(COMPILE_DIR)/bridge-utils-$(PKG_VERSION)

include $(BUILD_DIR)/package.mk

define Package/bridge

SECTION:=net

CATEGORY:=Base system

TITLE:=Ethernet bridging configuration utility

URL:=http://bridge.sourceforge.net/

endef

define Package/bridge/description

Manage ethernet bridging:

a way to connect networks together to form a larger network.

endef

define Build/Configure

$(call Build/Configure/Default, \

--with-linux-headers="$(LINUX_DIR)" \

)

endef

define Package/bridge/install

$(INSTALL_DIR) $(1)/usr/sbin

$(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin/

endef

$(eval $(call BuildPackage,bridge))

In fact, the Makefile from the content can generally know that it is completed by the software source preparation, compilation and installation process, the software is compiled by the software itself Makefile decision, theoretically and the Makefile (the Makefile only make the make command and Related parameters) no substantive relationship. The Makefile is explained as follows:

PKG_NAME:

The name of the package

PKG_VERSION:

The version of the package (if it is open source software, it is recommended to download the same version of the package)

PKG_RELEASE:

The version of the Makefile

PKG_SOURCE:

The file name of the package (in dl directory)

PKG_SOURCE_URL:

The download address of the package

PKG_MD5SUM:

The package's md5 value

PKG_CAT:

The decompression method of the package

PKG_BUILD_DIR

The compiled directory of the package

The variables that begin with PKG tell the compiler system where to download the package. Which @ SF is a built-in special keywords, said to go to sourceforge website to download the software, similar to the keyword also @ GNU said from the GNU download software source package .

The md5sum is used to verify the downloaded package correct or not, if correct, in the compilation of the software, the source of the package.will be found in PKG_BUILD_DIR

At the bottom of the Makefile there is a macro that contains Build Package, and the rest of the Makefile is defined for the parameters of the macro, with the following parameters:

Package / <name>:

<name> is used to specify the name of the Package, the name will be displayed in the configuration system, under the <name> the following definition:

SECTION: The package's class is not currently used

CATEGORG: The package in the configuration system classification, such as NetWork, Sound and so on

TITLE: The simple description of the package

URL: The original download connection for the package

MAINTAINER: The contact information of the maintenance personnel of the package

DEPENDS: the dependency of the package, using the dependency package name <name> to specify the dependency, if it is an extension package, add a "+" before, if the kernel version depends on the use of @ LINUX_2_ <minor version>, optional

BUILDONLY: If the value is 1, the package will not appear in the configuration menu but will be used as a fixed compiler, optional

Package / <name> / conffiles:

Specify the package depends on the configuration file, a configuration file line, optional

Build / Prepare:

Prepare the source code and patch the source code, optional

Build / Configure:

Configuration package (in open source software is generally used to generate Makefile), which parameters can be passed through CONFIGURE_VARS, optional

Build / Compile:

The implementation of software compilation of the action (in the open source software is generally equivalent to the implementation of make), which has two parameters can be used: MAKE_FLAGS and MAKE_VARS

Build / <name> / install:

The implementation of the package installation action, which built several keywords are as follows:

INSTALL_DIR is equivalent to install -d m0755

INSTALL_BIN is equivalent to install -m0755

INSTALL_DATA is equivalent to install -m0644

INSTALL_CONF is equivalent to install -m0600

7,The default configuration and initialization of the software

Under the package, the software's default configuration can be specified using <name> .conf, and the software's initialization script can be specified using <name> .init. In Vecoo Linux support two formats init script is a busybox or Sysv init script is a procd type of initscript. In general, we call the application initiated by the init script a service .

How to program the init script of SysV:

The following is a minimal content of the init script, the target machine on the file will be placed in /etc/init.d/ below.

#!/bin/sh /etc/rc.common

# Example script

# Copyright (C) 2007 OpenWrt.org

START=10

STOP=15

start() {

echo start

# commands to launch application

}

stop() {

echo stop

# commands to kill application

}

Init script is a shell script, it first has a file to the beginning of #! Followed by /etc/rc.common being executed. In rc.common provides an init script function template, the template includes the following components:

Developers can use the following command to operate the relevant.

$ root@VecooLinux:/# /etc/init.d/exmple restart|start|stop|reload|enable|disable

A service must complete the start and stop two functions, developers can also use custom to output custom command. START = N and STOP = N in the init script indicate the sequence of start and shutdown of the service. The smaller the N value in START, the more the first. The smaller the N value in STOP, the more the first.

Note: init script is currently not recommended to use, the aabove description is only for developers to understand Sysv format init script

Procd type of init script written:

#!/bin/sh /etc/rc.common

START=99

STOP=99

USE_PROCD=1

PROG=/usr/bin/launcher

OOM_ADJ=-17

start_service() {

procd_open_instance

procd_set_param oom_adj $OOM_ADJ

procd_set_param command $PROG -D

procd_close_instance

}

shutdown() {

echo shutdown

}

The file is also a template file, basically just pay attention to START, STOP, PROG these three variables can be.

8, Software debug

If the error occurs during compilation, developers can use the following command to view more information: When the package is not displayed in the configuration menu, developers can view the error using the following command:

$ TOPDIR = $ PWD make -C package / <name> DUMP = 1 V = s

When compiling error, the relevant command:

Make package / <name> / clean V = s

Make package / <name> / install V = s

Vecoo SDKuses demo:

After decompressing into the Vecoo.sdk directory, execute the following command

Initialize the sdk environment

$ source build / envsetup.sh

Choose the corresponding program

$ lunch -> select azalea_aiworld-vecoo

You can then execute make to compile or execute make menuconfig to configure the packages that need to be compiled.

$ make | make menuconfig

You can then use the pack (uart0 firmware, print from the default uart0 output) command or the pack -d command (card0 firmware, print default from card0 output)

$ pack [-d]

cameratest or other package integration:

Note: sdk acquiescence in the integration of a mtop user-level applications and i2c-gpio-custom kernel module, their own applications can refer to these two application packages for transplantation

make

Compile the entire sdk, compile the corresponding soft A your compiled directory in:

out / azalea-aiworld / compile_dir / target / t

Use adb push to push cameratest to the device alone or use pack to pack the firmware. And write the firmware for verification.

Last updated