0.前言
本章主要介绍关于100ASK-V853-PRO开发板的Tina SDK包的下载和编译打包生成镜像,并将镜像烧录到100ASK-V853-PRO开发板上。在进行100ASK-V853-PRO开发板的环境配置前需要获取配置虚拟机系统,可以参考:https://dongshanpi.com/DongshanPI-D1s/06-ConfigHostEnv/#_3。
1.下载Tina SDK包
由于Tina SDK包的大小较大,我们将其分卷压缩并放在在了百度网盘中 ,链接:https://pan.baidu.com/s/1TX742vfEde9bMLd9IrwwqA?pwd=sp6a 提取码: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系统
进入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系统平台,可以在后续访问:https://tina.100ask.net/SdkModule/Linux_SystemSoftware_DevelopmentGuide-01/
建立编译环境,输入 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设备,进入烧写模式设备管理器会弹出一个未知设备。
接下来鼠标右键点击这个未知设备,在弹出的对话框里, 点击浏览我计算机以查找驱动程序软件。
之后在弹出新的对话框里,点击浏览找到我们之前下载好的 usb烧录驱动文件夹内,找到 UsbDriver/
这个目录,并进入,之后点击确定即可。
注意进入到 UsbDriver/
文件夹,然后点击确定,如下图所示。
](https://cdn.staticaly.com/gh/DongshanPI/Docs-Photos@master/DongshanNezhaSTU/Windows_FlashDevice_003.png)
此时,我们继续点击 下一页 按钮,这时系统就会提示安装一个驱动程序。
在弹出的对话框里,我们点击 始终安装此驱动程序软件 等待安装完成。
安装完成后,会提示,Windows已成功更新你的驱动程序。
最后我们可以看到,设备管理器 里面的未知设备 变成了一个 USB Device(VID_1f3a_efe8)
的设备,这时就表明设备驱动已经安装成功。
安装完成USB驱动后后续即可正常使用烧录功能。
5.2 烧写系统
在我们连接好开发板的12V电源线,并将两条Type-C分别连接到开发板和电脑端以后,打开PhoenixSuit烧写工具,
打开软件后 软件主界面如下图所示
接下来 我们需要切换到 **一键刷机**窗口。如下图所示,点击红框标号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编号,用于后续连接使用。
如上图,COM号是96,我们接下来连接所使用的串口号就是96。
打开软件后新建会话后,第1步选择串口功能,第2步在串口端选择CH9102的串口,第3步波特率设置115200,第4步流控选择None,第5步选择OK。
选择后进入了串口界面,此时可能会没有输出信息的情况,按下回车键即可进入tina开发板控制台。
如果此时想重新查看启动信息,可以在终端输入reboot,或者在开发板上按下reset键。
上述为启动完成的信息,可以看到Tina Linux的标识
- 本文转载自全志在线开发者论坛:https://bbs.aw-ol.com/topic/3302/