100ASK_V853-PRO 环境配置及编译烧写

100ASK_V853-PRO 环境配置及编译烧写

0.前言

本章主要介绍关于100ASK_V853-PRO开发板的Tina SDK包的下载和编译打包生成镜像,并将镜像烧录到100ASK-V853-PRO开发板上。在进行100ASK-V853-PRO开发板的环境配置前需要获取配置虚拟机系统,可以参考:配置开发环境 - DongshanPI Board Documentation Center.

全志Linux Tina-SDK开发完全手册:https://tina.100ask.net/

100ASK_V853-PRO开发板资料合集(包含2000+页 开发文档和Tina SDK包等):
链接:百度网盘 请输入提取码 提取码:sp6a

100ASK_V853-PRO开发板购买链接:100ASK_V853-PRO开发板

在开始前请注意,请使用Ubuntu18.04进行编译,对于其他版本,暂未支持!
在开始前请注意,请使用Ubuntu18.04进行编译,对于其他版本,暂未支持!
在开始前请注意,请使用Ubuntu18.04进行编译,对于其他版本,暂未支持!

1.下载Tina SDK包

由于Tina SDK包的大小较大,我们将其分卷压缩并放在在了百度网盘中 ,链接:百度网盘 请输入提取码 提取码:sp6a

SDK包位于07_Tina_SDK包目录下,将该目录下的全部文件下载并拷贝到虚拟机下,如下所示

在此目录下打开终端,输入cat tina-v853-open.tar.gz* | tar xz,合并压缩包并解压压缩包。

book@100ask:~/workspaces$ cat tina-v853-open.tar.gz* | tar xz

该过程时间可能会比较长,需要耐心等待。

解压完成后会在当前目录下生成一个tina-v853-open的文件夹,该文件夹即为Tina SDK包的全部目录。

book@100ask:~/workspaces$ ls
tina-v853-open tina-v853-open.tar.gz.01 tina-v853-open.tar.gz.03 tina-v853-open.tar.gz.05 tina-v853-open.tar.gz.07 tina-v853-open.tar.gz.09 tina-v853-open.tar.gz.11
tina-v853-open.tar.gz.00 tina-v853-open.tar.gz.02 tina-v853-open.tar.gz.04 tina-v853-open.tar.gz.06 tina-v853-open.tar.gz.08 tina-v853-open.tar.gz.10

2.为Tina SDK包打上百问网V853的补丁包

在当前目录下通过GIT命令下载100ASK-V853-PRO补丁包,对于此补丁包我们也在gitee和百度网盘中提供,百度网盘中位于02_开发工具/【Ubuntu】100ASK_V853-PRO_TinaSDK补丁包/目录下。

book@100ask:~/workspaces$ git clone https://github.com/DongshanPI/100ASK_V853-PRO_TinaSDK.git
Cloning into '100ASK_V853-PRO_TinaSDK'...
remote: Enumerating objects: 14606, done.
remote: Counting objects: 100% (232/232), done.
remote: Compressing objects: 100% (167/167), done.
remote: Total 14606 (delta 39), reused 225 (delta 34), pack-reused 14374
Receiving objects: 100% (14606/14606), 883.22 MiB | 4.26 MiB/s, done.
Resolving deltas: 100% (1491/1491), done.
Checking out files: 100% (11560/11560), done.

下载完成后将此文件夹拷贝到tina-v853-open文件夹中

book@100ask:~/workspaces$ cp -rfvd 100ASK_V853-PRO_TinaSDK/* tina-v853-open/

3.编译V853系统

编译前需要安装基础依赖包,打开终端输入

sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 u-boot-tools -y

安装完成基础环境后,进入tina-v853-open目录下,可以通过ls命令查看当前文件夹下的所有文件

book@100ask:~/workspaces$ cd tina-v853-open/
book@100ask:~/workspaces/tina-v853-open$ ls
brandy build buildroot build.sh device kernel openwrt platform prebuilt tools

对于想详细了解Allwinner Tina Linux系统平台,可以在后续访问:概述与介绍 - 全志Linux Tina-SDK开发完全手册

建立编译环境,输入 source build/envsetup.sh

book@100ask:~/workspaces/tina-v853-open$ source build/envsetup.sh
NOTE: The SDK(/home/book/workspaces/tina-v853-open) was successfully loaded
load openwrt... ok
Please run lunch next for openwrt.
load buildroot,bsp...ok
Please run ./build.sh config next for buildroot,bsp.

选择编译的开发板,输入lunch

book@100ask:~/workspaces/tina-v853-open$ lunch
​
You're building on Linux
​
Lunch menu... pick a combo:
1 v853-100ask-tina
2 v853-vision-tina
Which would you like?:

这里是需要您选择编译哪个方案的开发板,这里输入1,选择v853-100ask-tina,再按回车即可。

选择完成后会倒数8秒,让您阅读许可协议,阅读完成后,会询问您是否接受上述条款协议。输入y,再按回车即同意以上条款。

book@100ask:~/workspaces/tina-v853-open$ lunch
​
You're building on Linux
​
Lunch menu... pick a combo:
1 v853-100ask-tina
2 v853-vision-tina
Which would you like?: 1
Jump to longan autoconfig
/home/book/workspaces/tina-v853-open/build.sh autoconfig -o openwrt -i v853 -b 100ask -n default
​
Before using this files, please make sure that you note the following important information.
**********************************************************************
​
Copyright (c) 2019-2022 Allwinner Technology Co., Ltd. ALL rights reserved.
​
Allwinner is a trademark of Allwinner Technology Co.,Ltd., registered in
the the People's Republic of China and other countries.
All Allwinner Technology Co.,Ltd. trademarks are used with permission.
​
DISCLAIMER
THIRD PARTY LICENCES MAY BE REQUIRED TO IMPLEMENT THE SOLUTION/PRODUCT.
IF YOU NEED TO INTEGRATE THIRD PARTY'S TECHNOLOGY (SONY, DTS, DOLBY, AVS OR MPEGLA, ETC.)
IN ALLWINNERS'SDK OR PRODUCTS, YOU SHALL BE SOLELY RESPONSIBLE TO OBTAIN
ALL APPROPRIATELY REQUIRED THIRD PARTY LICENCES.
ALLWINNER SHALL HAVE NO WARRANTY, INDEMNITY OR OTHER OBLIGATIONS WITH RESPECT TO MATTERS
COVERED UNDER ANY REQUIRED THIRD PARTY LICENSE.
YOU ARE SOLELY RESPONSIBLE FOR YOUR USAGE OF THIRD PARTY'S TECHNOLOGY.
​
​
THIS SOFTWARE IS PROVIDED BY ALLWINNER"AS IS" AND TO THE MAXIMUM EXTENT
PERMITTED BY LAW, ALLWINNER EXPRESSLY DISCLAIMS ALL WARRANTIES OF ANY KIND,
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION REGARDING
THE TITLE, NON-INFRINGEMENT, ACCURACY, CONDITION, COMPLETENESS, PERFORMANCE
OR MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL ALLWINNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS, OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
​
**********************************************************************
You can read /home/book/workspaces/tina-v853-open/build/disclaimer/Allwinnertech_Disclaimer(Cn_En)_20181122.md for detailed information.
​
You read time left 8 seconds....
I have already read, understood and accepted the above terms? [Y/N]y

确认同意条款后,系统会自动配置环境变量

You select Yes, Build continue.... ========ACTION List: mk_autoconfig -o openwrt -i v853 -b 100ask -n default;======== options : INFO: Prepare toolchain ... INFO: kernel defconfig: generate /home/book/workspaces/tina-v853-open/kernel/linux-4.9/.config by /home/book/workspaces/tina-v853-open/device/config/chips/v853/configs/100ask/linux-4.9/config-4.9 INFO: Prepare toolchain ... make: Entering directory '/home/book/workspaces/tina-v853-open/kernel/linux-4.9' HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf *** Default configuration is based on '../../../../../device/config/chips/v853/configs/100ask/linux-4.9/config-4.9' # # configuration written to .config # make: Leaving directory '/home/book/workspaces/tina-v853-open/kernel/linux-4.9' INFO: clean buildserver Usage: kill [options] <pid> [...] Options: <pid> [...] send signal to every <pid> listed -<signal>, -s, --signal <signal> specify the <signal> to be sent -l, --list=[<signal>] list all signal names, or convert one to a name -L, --table list all signal names in a nice table -h, --help display this help and exit -V, --version output version information and exit For more details see kill(1). INFO: prepare_buildserver

编译系统,输入make,输入完成后系统将会开始编译

book@100ask:~/workspaces/tina-v853-open$ make 
===There is tina environment.=== Note: make is the shell functon in envsetup.sh. == action: openwrt_build, action_args: == ========ACTION List: build_linuxdev ;======== options : INFO: ---------------------------------------- INFO: build linuxdev ... INFO: chip: sun8iw21p1 INFO: platform: linux INFO: kernel: linux-4.9 INFO: board: 100ask INFO: output: /home/book/workspaces/tina-v853-open/out/v853/100ask/openwrt INFO: ---------------------------------------- INFO: don't build dtbo ... INFO: build arisc INFO: build_bootloader: brandy_path= /home/book/workspaces/tina-v853-open/brandy/brandy-2.0 grep: /home/book/workspaces/tina-v853-open/brandy/brandy-2.0/spl/Makefile: No such file or directory build for sun8iw21p1_defconfig ... Prepare arm toolchain ... ...//此部分编译输出信息省略 Building kernel /home/book/workspaces/tina-v853-open/kernel/linux-4.9/output/lib/modules/4.9.191 CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK scripts/mod/devicetable-offsets.h CHK include/generated/timeconst.h CHK include/generated/bounds.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h DTC arch/arm/boot/dts/board.dtb Kernel: arch/arm/boot/Image is ready Building modules, stage 2. MODPOST 27 modules Kernel: arch/arm/boot/zImage is ready Kernel: arch/arm/boot/uImage is ready 'arch/arm/boot/Image' -> 'output/bImage' 'arch/arm/boot/uImage' -> 'output/uImage' 'arch/arm/boot/zImage' -> 'output/zImage' Copy rootfs.cpio.gz for arm Building modules [GPU]: No GPU type is configured in /home/book/workspaces/tina-v853-open/kernel/linux-4.9/.config. regenerate rootfs cpio 16149 blocks 16150 blocks build_ramfs Copy boot.img to output directory ... ./scripts/build.sh sun8iw21p1 compile Kernel successful INFO: ---------------------------------------- INFO: build Tina OK. INFO: ----------------------------------------

等待编译完成,此部分编译时间由电脑CPU等决定,第一次编译系统的时间比较长,请耐心等待。等待输出编译Tina OK即编译成功。

4.打包生成100ASK-V853-PRO系统镜像

编译完成后,输入pack,可以直接将刚刚编译完成的系统打包生成可烧写到板载EMMC上的镜像。

book@100ask:~/workspaces/tina-v853-open$ pack
 /home/book/workspaces/tina-v853-open/build/pack -c sun8iw21p1 -i v853 -p openwrt -b 100ask -k linux-4.9 -d uart0 -v none -m normal -w none -n default INFO: /home/book/workspaces/tina-v853-open/out/v853/common/keys copying tools file copying configs file copying product configs file ... 
Dragon execute image.cfg SUCCESS ! 
----------image is at---------- 33M
 /home/book/workspaces/tina-v853-open/out/v853/100ask/openwrt/v853_linux_100ask_uart0.img
 pack finish

等待打包完成,打包完成后可以根据上面的输出信息提示的目录下找到v853_linux_100ask_uart0.img镜像,将此镜像文件拷贝到Windows电脑中。

5.使用PhoenixSuit烧写工具进行系统的烧写

全志USB烧录驱动包:AllwinnerUSBFlashDeviceDriver

全志线刷工具:AllwinnertechPhoeniSuit

在连接开发板后需要注意,虚拟机可能会拦截串口或者USB,选择连接到主机即可。

5.1 安装全志USB驱动

全志USB烧录驱动包:AllwinnerUSBFlashDeviceDriver

如果是第一次使用,需要安装全志USB驱动,如果已经安装过全志USB驱动即可跳转到5.2继续进行烧写系统。

在我们连接好开发板的12V电源线,并将两条Type-C分别连接到开发板和电脑端以后,将开关拨向靠近12V电源的方向即可将开发板上电。然后先按住 100ASK-V853-PRO开发板 FEL 烧写模式按键,之后按一下reset复位键,就可以自动进入烧写模式。

这时我们可以看到电脑设备管理器 通用串行总线控制器 部分弹出一个 未知设备 ,这个时候我们就需要把我们提前下载好的 全志USB烧录驱动 进行修改,然后将解压缩过的 全志USB烧录驱动 压缩包,解压缩,可以看到里面有这么几个文件。

InstallUSBDrv.exe drvinstaller_IA64.exe drvinstaller_X86.exe UsbDriver/ drvinstaller_X64.exe install.bat

对于wind7系统的同学,只需要以管理员 打开 install.bat 脚本,等待安装,在弹出的 是否安装驱动的对话框里面,点击安装即可。

对于wind10/wind11系统的同学,需要在设备管理器里面进行手动安装驱动。

如下图所示,在第一次插入OTG设备,进入烧写模式设备管理器会弹出一个未知设备。

Windows_FlashDevice_001

接下来鼠标右键点击这个未知设备,在弹出的对话框里, 点击浏览我计算机以查找驱动程序软件。

Windows_FlashDevice_001

之后在弹出新的对话框里,点击浏览找到我们之前下载好的 usb烧录驱动文件夹内,找到 UsbDriver/ 这个目录,并进入,之后点击确定即可。

Windows_FlashDevice_001

注意进入到 UsbDriver/ 文件夹,然后点击确定,如下图所示。

Windows_FlashDevice_001

此时,我们继续点击 下一页 按钮,这时系统就会提示安装一个驱动程序。

在弹出的对话框里,我们点击 始终安装此驱动程序软件 等待安装完成。

Windows_FlashDevice_001

安装完成后,会提示,Windows已成功更新你的驱动程序。

Windows_FlashDevice_001

最后我们可以看到,设备管理器 里面的未知设备 变成了一个 USB Device(VID_1f3a_efe8)的设备,这时就表明设备驱动已经安装成功。

Windows_FlashDevice_001

安装完成USB驱动后后续即可正常使用烧录功能。

5.2 烧写系统

全志线刷工具:AllwinnertechPhoeniSuit

在我们连接好开发板的12V电源线,并将两条Type-C分别连接到开发板和电脑端以后,打开PhoenixSuit烧写工具,

打开软件后 软件主界面如下图所示

PhoenixSuit_001

接下来 我们需要切换到 一键刷机窗口。如下图所示,点击红框标号1,在弹出的新窗口内,我们点击 红框2 浏览 找到我们刚刚编译出来的 V853系统镜像v853_linux_100ask_uart0.img,选中镜像后,点击红框3 全盘擦除升级

这时 我们拿起已经连接好的开发板,先按住 FEL 烧写模式按键,之后按一下 RESET 系统复位键,就可以自动进入烧写模式并开始烧写。

烧写时会提示烧写进度条,烧写完成后,会在红框处提示固件烧写成功。

6.进入Tina系统

烧写完成,我们可以使用串口工具MobaXterm进入串口查看,软件我们放在百度网盘的02_开发工具/【Windows】MobaXterm(串口工具 ssh工具合集)

默认情况下系统会自动安装串口设备驱动,如果没有自动安装,可以使用驱动精灵来自动安装。 * 对于Windows系统 此时Windows设备管理器 在 端口(COM和LPT) 处会多出一个串口设备,一般是以 USB-Enhanced-SERIAL CH9102开头,您需要留意一下后面的具体COM编号,用于后续连接使用。

QuickStart-01

如上图,COM号是96,我们接下来连接所使用的串口号就是96。

打开软件后新建会话后,第1步选择串口功能,第2步在串口端选择CH9102的串口,第3步波特率设置115200,第4步流控选择None,第5步选择OK。

选择后进入了串口界面,此时可能会没有输出信息的情况,按下回车键即可进入tina开发板控制台。

image-20230411120726349

如果此时想重新查看启动信息,可以在终端输入reboot,或者在开发板上按下reset键。

上述为启动完成的信息,可以看到Tina Linux的标识

我在制作镜像时,在gitee上下载好补丁,并移动到指定目录后,执行make,出现如下错误,导致镜像编译不通过,请问有什么解决办法

看了您的打印信息,可能是您在Tina配置界面选中了gtstream,如果您用不到取消选中即可正常编译

根据学员后续反馈,编译过程中会出现的部分问题,以下做出补充

  • INFO: build kernel failed

解决方案:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
sudo dpkg --add-architecture i386
sudo apt-get install u-boot-tools
  • INFO: build_openwrt_rootfs failed

解决方案:

sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 -y


lunch后出现该错误怎么办

您没有按照文档操作,请按照文档操作

为什么拷贝了100ASK_V853-PRO_TinaSDK进去lunch还是只有1个v853-vision-tina没有100ask选项?

book@100ask:~/v853/tina-v853-open/device/config/chips/v853/configs$ ls
100ask default vision 这个目录下已经有100ask了拷贝进去了

1.你检查一下补丁包的所有文件都拷贝进去没?
2.拷贝进去后需要重新执行souce

100ASK_V853-PRO_TinaSDK/openwrt/dl/nss-3.26.tar.gz

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
网盘下载的解压出来出错,下载了很多次都错误

ubuntu下载总是超时下载不下来,咋解决
book@100ask:~/v853/tina-v853-open$ git clone GitHub - DongshanPI/100ASK_V853-PRO_TinaSDK
Cloning into ‘100ASK_V853-PRO_TinaSDK’…
remote: Enumerating objects: 14624, done.
remote: Counting objects: 100% (250/250), done.
remote: Compressing objects: 100% (182/182), done.
error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

新上传了一份补丁包,重新下载吧

你好,我想编写代码在屏幕上显示“hello world”一词或启动相机并将其显示在屏幕上,我该怎么做这个allwinner v853 dev.board?

100ASK_V853-PRO 环境配置及编译烧写,之前我成功制作过一次镜像。这次我准备在次制作的时候执行lunch时,就一直卡在这里了,求解。(在这个之前我进行了内核配置界面,不过我恢复原样了还是一样卡在这里)