您尚未登录。

楼主 #1 2020-09-03 17:03:26

chainsx
会员
注册时间: 2019-08-01
已发帖子: 37
积分: 31.5

淘了一个a20行车记录仪主板,并编译lichee

偶然间在淘宝上发现了20块钱的a20行车记录仪的主板,
淘宝链接:https://item.taobao.com/item.htm?spm=a230r.1.14.91.6de65a756h4Fsi&id=594462933314&ns=1&abbucket=8#detail
到手后发现运行camdroid,通过bootlogo来看是凌度的机子,

先将bananapi的官方系统写入,成功启动,但是无法使用usb,
bananian系统下载地址:
https://mirrors.tuna.tsinghua.edu.cn/bananian/releases/bananian-latest.zip

从原系统无法获取到scripts.bin,
于是就想编译a20的lichee来使用usb。
全志官方下载地址:http://dl.linux-sunxi.org/SDK/A20-SDK-2.0/aw.tar.bz2
有5个G,但是真正使用的是里面的lichee-2.0.tar.gz,
但是在github上找到了相应项目,https://github.com/dwlinux/Armcore_a20_V30_lichee

参考晕哥的这篇教程:https://whycan.cn/t_1522.html

注意,一定要使用ubuntu-14.04,不然的话遇到的坑是无法填的,
首先安装依赖

sudo apt-get install -y libncurses-dev lib32z1 lib32ncurses5 lib32stdc++6 u-boot-tools make g++ gettext python unzip fakeroot bison texinfo bc flex gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf
cd /opt
git clone --depth=1 https://github.com/dwlinux/Armcore_a20_V30_lichee

这里可以将github.com换成github.com.cnpmjs.org提高克隆速度。

然后直接编译就行了

cd Armcore_a20_V30_lichee
./build.sh -m all

其中会遇到几个坑,
1.host-m4-1.4.15

In file includedfrom clean-temp.h:22:0,
from clean-temp.c:23:
./stdio.h:456:1:error: 'gets' undeclared here (not in a function)
_GL_WARN_ON_USE(gets, "gets is a security hole - use fgets instead");

对host-m4-1.4.15/lib/stdio.in.h文件根据补丁内容自行修改

<span style="font-family:Arial;font-size:12px;"># Begin patch
=== modified file 'grub-core/gnulib/stdio.in.h'
--- grub-core/gnulib/stdio.in.h	2010-09-20 10:35:33 +0000
+++ grub-core/gnulib/stdio.in.h	2012-07-04 15:18:15 +0000
@@ -140,8 +140,10 @@
 /* It is very rare that the developer ever has full control of stdin,
    so any use of gets warrants an unconditional warning.  Assume it is
    always declared, since it is required by C89.  */
+#if defined gets
 #undef gets
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif

2.host-autoconf-2.65

conftest.c:14625:must be after `@defmac' to use `@defmacx'
make[3]: ***[autoconf.info] Error 1
make[3]: Leavingdirectory`/opt/Armcore_a20_V30_lichee/out/linux/common/buildroot/build/host-autoconf-2.65/doc'
make[2]: ***[install-recursive] Error 1
make[2]: Leavingdirectory`/opt/Armcore_a20_V30_lichee/out/linux/common/buildroot/build/host-autoconf-2.65'
make[1]: ***[install] Error 2
make[1]: Leavingdirectory`/opt/Armcore_a20_V30_lichee/out/linux/common/buildroot/build/host-autoconf-2.65'
make: ***[/opt/Armcore_a20_V30_lichee/out/linux/common/buildroot/build/host-autoconf-2.65/.stamp_host_installed]Error 2

应用以下补丁

--- autoconf-2.65/doc/autoconf.texi	2009-11-05 10:42:15.000000000 +0800
+++ autoconf-2.65/doc/autoconf.texi.new	2013-05-28 05:41:09.243770263 +0800
@@ -15,7 +15,7 @@
 @c The ARG is an optional argument.  To be used for macro arguments in
 @c their documentation (@defmac).
 @macro ovar{varname}
-@r{[}@var{\varname\}@r{]}@c
+@r{[}@var{\varname\}@r{]}
 @end macro
 
 @c @dvar(ARG, DEFAULT)
@@ -23,7 +23,7 @@
 @c The ARG is an optional argument, defaulting to DEFAULT.  To be used
 @c for macro arguments in their documentation (@defmac).
 @macro dvar{varname, default}
-@r{[}@var{\varname\} = @samp{\default\}@r{]}@c
+@r{[}@var{\varname\} = @samp{\default\}@r{]}
 @end macro
 
 @c Handling the indexes with Texinfo yields several different problems.

根据这个补丁文件修改即可,直接修改源代码包,下次编译就不会再提示这个错误了。

3.host-makedevs

/opt/Armcore_a20_V30_lichee/out/linux/common/buildroot/build/host-makedevs/makedevs.c:374:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
  int ret = EXIT_SUCCESS;
      ^
cc1: all warnings being treated as errors

直接修改/opt/Armcore_a20_V30_lichee/out/linux/common/buildroot/build/host-makedevs/makedevs.c文件:
最后一行,return 0;
修改为:return ret;

我给板子上换了一个8GB的nand flash,所以去内核里面勾选nand flash的驱动后再编译

最后打包,选择sun7i_linux_evb-v10

./build.sh pack

最后打包好的文件在tools/pack/sun7i_linux_evb-v10.img

使用PhoenixSuit烧录,要提前进入fel模式,可以通过烧录fel-boot.sunxi到sd卡来进入,

wget http://www.hno.se/code/A10/OLD/fel-boot.sunxi
dd if=fel-boot.sunxi of=/dev/sdX bs=1024 seek=8

离线

楼主 #2 2020-09-03 17:05:28

chainsx
会员
注册时间: 2019-08-01
已发帖子: 37
积分: 31.5

Re: 淘了一个a20行车记录仪主板,并编译lichee

但是遇到的问题是,第一次启动的log如下

HELLO! BOOT0 is starting!
boot0 version : 2.0.0▒
read dram para.
dram driver version: 1.15
dram size =256MB
0xffffffff
super_standby_flag = 0
Succeed in opening nand flash.
block from 2 to 6
deal block 2
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00068000.
The file stored in 0x00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.147] boot1 version : 2.0.0
[       0.147] script installed early ok
[       0.148] pmu type = 3
[       0.253] bat vol = 1936 mv
[       0.266] axi:ahb:apb=4:2:2
[       0.266] set dcdc2=1400mv, clock=912M successed
[       0.269] key
[       0.281] no key found
[       0.281] flash init start
[       0.281] NB1 : enter NFB_Init
[       0.284] NB1 : enter phy init
[       0.287] [NAND] nand driver(A20) version: 0x0x00000002, 0x0x00000012, data: 0x426fff64 1111692733
[       0.296] get the good blk ratio from hwscan : 870
[       0.301] NB1 : nand phy init ok
[       0.359] NB1 : init ok
[       0.359] flash init finish
[       0.361] fs init ok
[       0.362] fattype FAT16
[       0.364] fs mount ok
[       0.368] nand good_block_ratio=870
[       0.370] storage_type=0
[       0.383] 0
[       0.383] set pc
[       0.383] usbdc_vol = 4000, usbdc_cur = 0
[       0.385] usbpc_vol = 4200, usbpc_cur = 0
[       0.389] init to usb pc
[       0.392] set pc
[       0.475] battery enough
[       0.475] power_start=0x00000000
[       0.475] power trigger
[       0.795] power start detect
[       0.795] power enter detect
[       0.797] vbus insert
[       0.798] usb start detect
[       0.801] usb enter detect
[       0.804] USB Device!!
[       0.806] usb start detect
[       0.932] base bat_cal = 0
[       1.204] usb set dc
[       1.204] set dc
[       5.267] extenal power low go high startup
[       5.267] usb start detect
[       5.268] usb enter detect
[       5.271] USB Device!!
[       5.671] usb set dc
[       5.671] set dc
[       5.875] usb exit detect
[       5.875] power exit detect
[       5.875] usb exit detect
[       5.878] enter standby

卡在这里不会动了,按一下板子上的reset键,又卡在了Starting kernel ...

HELLO! BOOT0 is starting!
boot0 version : 2.0.0▒
read dram para.
dram driver version: 1.15
dram size =256MB
0xffffffff
super_standby_flag = 0
Succeed in opening nand flash.
block from 2 to 6
deal block 2
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00068000.
The file stored in 0x00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.147] boot1 version : 2.0.0
[       0.147] script installed early ok
[       0.148] pmu type = 3
[       0.252] bat vol = 0 mv
[       0.265] axi:ahb:apb=4:2:2
[       0.265] set dcdc2=1400mv, clock=912M successed
[       0.267] key
[       0.280] no key found
[       0.280] flash init start
[       0.280] NB1 : enter NFB_Init
[       0.283] NB1 : enter phy init
[       0.286] [NAND] nand driver(A20) version: 0x0x00000002, 0x0x00000012, data: 0x426fff64 1111692733
[       0.295] get the good blk ratio from hwscan : 870
[       0.300] NB1 : nand phy init ok
[       0.358] NB1 : init ok
[       0.358] flash init finish
[       0.360] fs init ok
[       0.361] fattype FAT16
[       0.363] fs mount ok
[       0.367] nand good_block_ratio=870
[       0.369] storage_type=0
[       0.382] 0
[       0.382] set pc
[       0.382] usbdc_vol = 4000, usbdc_cur = 0
[       0.384] usbpc_vol = 4200, usbpc_cur = 0
[       0.388] init to usb pc
[       0.391] set pc
[       0.473] battery enough
[       0.474] power_start=0x00000000
[       0.474] pre boot mode
[       0.794] power start detect
[       0.794] power enter detect
[       0.795] usb start detect
[       0.797] usb enter detect
[       0.800] USB Device!!
[       0.923] no battery exist
[       0.923] power exit detect
[       0.924] usb exit detect
[       0.927] key value = 0
[       0.929] recovery key high 40, low 4
[       1.032] show pic finish
[       1.032] load kernel start
[       1.051] load kernel successed
[       1.051] start address = 0x4a000000
[       1.679] power exit detect
[       1.679] usb exit detect
[       1.679

U-Boot 2011.09-rc1-00000-g556d5c7-dirty (Sep 03 2020 - 03:52:29) Allwinner Technology

CPU:   SUNXI Family
Board: SUN7I-EVB
DRAM:  256 MiB
NAND:  NB1 : enter NFB_Init
[NAND] nand driver(A20) version: 0x2, 0x12, data: 12 1207571896
[NAND] set nand_good_block_ratio 870
NB1 : nand phy init ok
NB1 : init ok
2864 MiB
MMC:   SUNXI SD/MMC: 0
In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:5-
-name-        -start-       -size-
bootloader  : 8000          10000
env         : 18000         8000
boot        : 20000         8000
rootfs      : 28000         100000
UDISK       : 128000        470000
-----------------------------------
no misc partition is found
Card did not respond to voltage select!
MMC: block number 0x1 exceeds max(0x0)
** Can't read from device 0 **

** Unable to use mmc 0:0 for fatload **
MMC: block number 0x1 exceeds max(0x0)
** Can't read from device 0 **

** Unable to use mmc 0:1 for fatload **
Hit any key to stop autoboot:  0
[NAND]dumy read,chip 0

Starting kernel ...

离线

楼主 #3 2020-09-03 17:08:55

chainsx
会员
注册时间: 2019-08-01
已发帖子: 37
积分: 31.5

Re: 淘了一个a20行车记录仪主板,并编译lichee

CPU已经非常烫了,
而且这个板子的DRAM也不是256MB,而是128MB

离线

楼主 #4 2020-09-03 17:11:47

chainsx
会员
注册时间: 2019-08-01
已发帖子: 37
积分: 31.5

Re: 淘了一个a20行车记录仪主板,并编译lichee

发一下已经编译好的固件
sun7i_linux_evb-v10.zip

离线

#5 2020-09-03 17:38:06

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: 淘了一个a20行车记录仪主板,并编译lichee

感谢楼主分享! 因为本站钱包功能还在开发中, 麻烦加下我的微信 whycan_cn, 发个小红包感谢一下。





离线

楼主 #6 2020-09-03 18:13:12

chainsx
会员
注册时间: 2019-08-01
已发帖子: 37
积分: 31.5

Re: 淘了一个a20行车记录仪主板,并编译lichee

哇酷小二 说:

感谢楼主分享! 因为本站钱包功能还在开发中, 麻烦加下我的微信 whycan_cn, 发个小红包感谢一下。

不用了,人人为我我为人人,我这里还有坑等着大家一起解决呢。。

离线

#7 2020-09-03 21:05:47

晕哥小弟
会员
注册时间: 2019-04-04
已发帖子: 309
积分: 299.5

Re: 淘了一个a20行车记录仪主板,并编译lichee

我服

离线

#8 2020-09-03 21:41:02

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: 淘了一个a20行车记录仪主板,并编译lichee

chainsx 说:
哇酷小二 说:

感谢楼主分享! 因为本站钱包功能还在开发中, 麻烦加下我的微信 whycan_cn, 发个小红包感谢一下。

不用了,人人为我我为人人,我这里还有坑等着大家一起解决呢。。

谢谢大佬看得起小站, 那等钱包功能完成, 我这边给您打赏.





离线

#9 2020-09-03 23:51:08

muzhi
会员
注册时间: 2019-12-14
已发帖子: 39
积分: 35.5

Re: 淘了一个a20行车记录仪主板,并编译lichee

前一阵淘宝首页推荐了这个商品 也顺势点进去关注了店铺,无奈刚入门萌新不太会整。问了下荔枝派群里说是没啥用就没买到现在还在购物车里躺着。

离线

#10 2020-09-04 20:05:18

马前卒
会员
注册时间: 2020-08-08
已发帖子: 60
积分: 57

Re: 淘了一个a20行车记录仪主板,并编译lichee

我服, 液晶是什么规格呢?有没有驱动起来?

离线

#11 2020-10-02 17:27:43

qinxiongxu
会员
注册时间: 2018-12-13
已发帖子: 88
积分: 80.5

Re: 淘了一个a20行车记录仪主板,并编译lichee

问题解决了吗?,另外请问下这个lichee可以支持A10的吗?

离线

#12 2020-10-04 15:57:51

SdtElectronics
会员
注册时间: 2020-07-27
已发帖子: 101
积分: 379.5
个人网站

Re: 淘了一个a20行车记录仪主板,并编译lichee

巧了,我前段时间也在折腾这块板子,最后用了点“奇技淫巧”把script.bin导出来了: https://whycan.com/t_5343.html
如果有人需要我可以上传一下转换过后的fex。
另外从fex内容中看不出板子上8脚的fpc母座和空焊的无线模块焊盘连接的GPIO(fex没有gpio_para段)。目前我想到的最简单的方法就是把SoC吹下来然后挨个脚测,或者在gpio_vx里顺序把每个引脚拉高一次然后测电平,但可能是因为之前配置的方式不对或没选对引脚,没能测到电平变化。
这个板子疑似是全志的公版方案,我找到了一篇疑似其软件方案的文档:

https://wenku.baidu.com/view/5dd3cba8195f312b3069a548.html
国庆这段时间又去折腾另一张四块五的Mstar的行车记录仪板子了,那个自带系统是RTOS,前两天编译了一个疑似可用的镜像。之后有时间还要接着折腾这个A20的板子

离线

#13 2020-10-26 19:11:40

ubuntufull
会员
注册时间: 2020-06-15
已发帖子: 11
积分: 56

Re: 淘了一个a20行车记录仪主板,并编译lichee

好巧,我去年10月份买了一块这个板子,用openwrt可以跑完内核,但是无法加载文件系统

离线

#14 2020-10-29 10:02:45

SdtElectronics
会员
注册时间: 2020-07-27
已发帖子: 101
积分: 379.5
个人网站

Re: 淘了一个a20行车记录仪主板,并编译lichee

已通过主线u-boot带起主线内核。稍晚一些时候发贴说过程,先发一贴说适配u-boot

离线

#15 2020-10-29 10:42:31

孤星泪
会员
注册时间: 2020-03-18
已发帖子: 235
积分: 231

Re: 淘了一个a20行车记录仪主板,并编译lichee

SdtElectronics 说:

已通过主线u-boot带起主线内核。稍晚一些时候发贴说过程,先发一贴说适配u-boot

那坐等了,坐等了。

离线

#16 2022-01-17 21:32:54

lsmcld
会员
所在地: 成都
注册时间: 2021-12-19
已发帖子: 27
积分: 12
个人网站

Re: 淘了一个a20行车记录仪主板,并编译lichee

这个服,这也能玩

离线

#18 2022-09-05 20:16:43

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: 淘了一个a20行车记录仪主板,并编译lichee

楼主买的A20板子是一颗ddr 还是两颗?

离线

#20 2023-03-25 16:02:32

iamkylin
会员
注册时间: 2019-10-09
已发帖子: 16
积分: 4

Re: 淘了一个a20行车记录仪主板,并编译lichee

液晶屏之前测试过普通的4.3寸屏(好像是TM043NDH02)可以驱动起来

离线

#21 2023-05-21 15:34:05

技术小白
会员
注册时间: 2020-09-01
已发帖子: 3
积分: 2.5

Re: 淘了一个a20行车记录仪主板,并编译lichee

LinuxGo 说:

楼主买的A20板子是一颗ddr 还是两颗?

应该时一颗的,我也有一块:D

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn