全志v3s linux 编译,全志V3S 编译运行xboot笔记

前言

现在手上有一块V3S的板子,想将其用起来。现在来记录一下这个过程。记录一下荔枝派zero的使用流程。

01

环境准备

首先需要clone代码

git clone git@gitee.com:xboot/xboot.git

接着就是设定交叉编译环境

清理环境

make clean

编译

make CROSS_COMPILE=/opt/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- PLATFORM=arm32-v3s

需要注意的是gcc一定是arm-linux-gnueabihf-否则可能会编译链接出错。因为v3s需要硬浮点hf。

编译完成后可以看到效果如下:

9b57f4cecf50384b25e44c063db136f3.png

02

程序下载

编译完成后,就可以将我们编译好的文件下载进去了。

fel模式进入

全志芯片的启动特点,需要进入fel模式:

TF卡和spi flash 同时没有可启动镜像;也就是说你不插卡,且焊接的是新的或者没有有效镜像的spi flash,那就上电自动进入fel下载模式

TF卡中有进入fel模式的特殊固件 fel-sdboot.sunxi如果你的spiflash已经有了启动镜像,那么需要在TF卡中烧入一个sunxi提供的 启动工具 ( dd if=fel-sdboot.sunxi of=/dev/mmcblk0 bs=1024 seek=8 ), 那么插入该TF卡启动会进入fel模式;

上电时SPI_MISO拉低到地该引脚为boot引脚,上电时出于低电平即会进入fel下载模式。

86ecb4fb90f4141606b86d1551e6ddd1.png

插上我们的usb线即可。

sunxi-fel工具的使用

由于在Ubuntu上进行开发工作,所以可以采用https://github.com/Icenowy/sunxi-tools.git提供的sunxi-fel工具进行spi flash的烧录工作。

具体的步骤如下:

第一步:clone代码

git clone https://github.com/Icenowy/sunxi-tools.git

第二步:切换分支

5e81b8fea321ab981cb0be3508eaef9f.png

对于v3s来说,我们切换到v3s的分支即可。

然后编译代码

sudo make

sudo make install

完成后就可以在控制台输入sunxi-fel了。

检查是否可以探测到芯片信息

073cfd94af507de50fbb9b0410bdf70e.png

这样就可以开始烧录了。

烧录

烧录过程可以直接烧录到RAM中去执行

sudo sunxi-fel -p write 0x40000000 xboot.bin

sudo sunxi-fel exec 0x40000000

并且可以看到我们的开发板上的红灯一闪一闪的了

8889660fb847b8a023c76984e7257d26.png

当然也可以进行烧录到spi flash中,这样,每次上电都会启动程序。

需要注意的是,要切换到spi-rebase分支才可以,并且spi flash需要手动焊接。

03

串口打印

我们有的时候需要用串口查看具体的信息,那么怎么办呢?

可以连接板子的uart0作为输出信息。

d9ea22ae949eeffd05bfc41b5f8c1447.png

连接完成ttl转usb线后就可以在控制台看到打印信息了。

7f299477173b49d27005f3b50c8f9654.png

此时,我们的xboot开发环境就搭建完成了。

04

总结

通过对xboot环境的搭建,我们可以更加清楚知道v3s的开发流程。所以一定需要做好记录,这样才能不必每次都需要摸索折腾。

全志R16平台编译linux系统V1.0.txt 2017/4/11 13:36 (编译请使用编译android的lichee的选项编译生成的.config文件,不然直接编译会报错!!!!) rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ tar zxvf lichee_parrotv1.1_20161202.tar.gz rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ cd lichee/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 2 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. bell-one 1. evb 2. evb-20 3. evb-30 4. evb-rtl8723bs 5. sc3813r Choice: 3 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh 错误1: KCONFIG_AUTOCONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/tristate.config BUILDROOT_CONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf --silentoldconfig Config.in # # make dependencies written to .auto.deps # ATTENTION buildroot devels! # See top of this file before playing with this auto-preprequisites! # make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot' You must install 'makeinfo' on your build machine makeinfo is usually part of the texinfo package in your distribution make: *** [dependencies] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ d/buildroot-config/conf.o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/zconf.tab.o -o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buil
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值