WhyCan Forum

本站无需注册,无需积分,无需回复可下载所有资料,如果真的喜欢小站,请您注册之后请至少回复一个帖子激活Id,谢谢支持! 站长QQ: 516333132 (挖坑网/填坑网) admin@whycan.cn

您尚未登录。

#151 2019-01-26 18:15:03

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

@千石级灯 感谢分享! whycan.cn 感谢有你!

离线

#152 2019-02-07 03:04:19

dragoniye
会员
注册时间: 2019-02-07
累计积分: 3

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

已入坑。

编译u-boot 提示binman错误。 这应该是个特初级的问题吧?请大神指教


log数据:


  MKIMAGE u-boot-dtb.img
  CC      spl/common/spl/spl.o
  CC      spl/lib/display_options.o
  LD      spl/common/spl/built-in.o
  LD      spl/lib/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  COPY    spl/u-boot-spl.bin
  MKSUNXI spl/sunxi-spl.bin
  BINMAN  u-boot-sunxi-with-spl.bin
/bin/sh: 1: ./tools/binman/binman: not found
make: *** [u-boot-sunxi-with-spl.bin] Error 127
dragoniye@ubuntu:~/sdf1/licheeZero/u-boot$ python --version
Python 2.7.6

离线

#153 2019-02-07 08:44:27

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

@dragoniye

先检查一下 tools/binman/binman  tools/binman/binman.py 文件是否都存在,


然后看下, 这个是否可以执行:

tools/binman/binman

这个是否可以执行:

python tools/binman/binman.py

参考: https://github.com/u-boot/u-boot/blob/master/tools/binman/binman.py

离线

#154 2019-02-07 17:24:38

dragoniye
会员
注册时间: 2019-02-07
累计积分: 3

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

@晕哥
问题找到了。

share的win10目录, ln文件没创建成功。

离线

#155 2019-02-08 08:34:22

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

dragoniye 说:

@晕哥
问题找到了。

share的win10目录, ln文件没创建成功。

原来如此!

离线

#156 2019-02-21 14:11:06

蜀道难
会员
注册时间: 2019-02-15
累计积分: 2

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

楼主,linux4.13-y这个内核支持摄像头吗?

离线

#157 2019-02-21 14:16:31

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

蜀道难 说:

楼主,linux4.13-y这个内核支持摄像头吗?

linux4.13-y 不支持摄像头

linux 5.0支持 CSI 摄像头, 不支持 MIPI摄像头



围观蓝莓派(Blueberry-PI)之后, 一定要试一试 主线 Linux DVP CSI 摄像头:
https://whycan.cn/t_2039.html

离线

#158 2019-02-22 12:05:40

augyy
会员
注册时间: 2019-01-29
累计积分: 5

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

請問! 是否把原本sun8i.h 裡面的
" #ifdef CONFIG_USB_EHCI
  #define CONFIG USB_EHCI_SUNXI
  #endif

  #ifdef CONFIG_MACH_SUN8I_H3
.
.
"
不要.. 之後加下面 program?

#define CONFIG_BOOTCOMMAND   "setenv bootm_boot_mode sec; " \
                            "load mmc 0:1 0x41000000 zImage; "  \
                            "load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb; " \
                            "bootz 0x41000000 - 0x41800000;"

#define CONFIG_BOOTARGS      "console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw  vt.global_cursor_default=0"

cd u-boot
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_800x480LCD_defconfig (群主网店5寸屏)

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_480x272LCD_defconfig (通用4.3寸屏)

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig (默认)

ARCH=arm make menuconfig

执行编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

多核编译,避免cpu其他内核打酱油, J后的参数是参与编译的cpu个数:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -J3

离线

#159 2019-02-22 16:49:46

augyy
会员
注册时间: 2019-01-29
累计积分: 5

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

起 u-boot 裡打 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_800x480LCD_defconfig
就出現下面問題..
HOSTCC scripts/basic/fixdep
/bin/sh: 1: cc: not found
scripts/Makefile.host:99: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 127
Makefile:398: recipe for target 'scripts_basic' failed
make: *** [scripts basic] Error 2

离线

#160 2019-02-22 16:53:55

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

augyy 说:

起 u-boot 裡打 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_800x480LCD_defconfig
就出現下面問題..
HOSTCC scripts/basic/fixdep
/bin/sh: 1: cc: not found
scripts/Makefile.host:99: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 127
Makefile:398: recipe for target 'scripts_basic' failed
make: *** [scripts basic] Error 2

没有安装gcc?

试一试  apt-get install -y gcc g+++

离线

#161 2019-02-25 17:46:43

刘少来了
会员
注册时间: 2019-01-24
累计积分: 19

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

新人报道

离线

#162 2019-02-28 11:34:37

augyy
会员
注册时间: 2019-01-29
累计积分: 5

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

3. 设备树, Linux,
是否指 u-boot/dts 裡執行 git clone https://github.com/Lichee-Pi/linux.git -b zero-4.13.y?

离线

#163 2019-02-28 11:40:48

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

augyy 说:

3. 设备树, Linux,
是否指 u-boot/dts 裡執行 git clone https://github.com/Lichee-Pi/linux.git -b zero-4.13.y?

这里是指 Linux,和Linux对应的设备树。

离线

#164 2019-03-06 17:27:12

蜀道难
会员
注册时间: 2019-02-15
累计积分: 2

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

楼主,使用camroid环境时minigui中如何显示汉字呀!

离线

#165 2019-03-06 23:04:48

www220
会员
注册时间: 2018-02-09
累计积分: 46

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

晕哥 说:
basicdev 说:

https://whycan.cn/files/members/317/QQ20171223184340.png

musb-hrc musb-hdrc.1.auto: VBUS_ERROR in bidle(98 VALID)

请问大神们, 我的U盘插入荔枝派Zero dock板子上, 一点反应都没有, 就是上面这个错误.

我碰到过这个问题:
github 上 4.10-y 分支亲自试过, 板子上的电源拨码开关有问题,导致VBUS无电造成!
解决方法就是把电源开关按下,确认VUSB有5V,然后再插入U盘。
保证药到病除!
4.13-y 还没有验证。

造成这个的原因我问过荔枝派zero的群主, 因为这些开关不耐热,过高温回流焊的时候按键损坏造成接触不良。

https://whycan.cn/files/members/3/QQ20171223190045.png

大神有支持usb的v3s的uboot吗?

离线

#166 2019-03-07 09:26:57

山无棱
会员
注册时间: 2017-10-23
累计积分: 116

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

有,官方 uboot 就支持 usb,貌似有源码,只是spl闭源。

官方烧录软件的原理就是和 uboot usb通讯烧录。

离线

#167 2019-03-31 20:21:47

Jmhh247
会员
注册时间: 2018-12-21
累计积分: 52

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

呼叫大佬帮助。

我用一楼的固件 V3s_TFCard.7z,在荔枝派zero上测试,QT不能显示图片,不知道什么原因?(同样的代码在ubuntu上可以显示)

程序很简单就是直接在label上显示一张图片,如下:

 label->setPixmap(QPixmap(":/image/images/2019.png"));

离线

#168 2019-03-31 20:27:27

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

先用 bmp 文件测试, 如果 bmp 文件都正常, 说明缺 png 库.

那可能 buildroot 没有勾上 libpng,
也可能勾上了 libpng,
但是你的 Qt 路径, plugins 子目录下面没有 png 插件,
缺一不可.

离线

#169 2019-03-31 21:51:01

Jmhh247
会员
注册时间: 2018-12-21
累计积分: 52

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

晕哥 说:

先用 bmp 文件测试, 如果 bmp 文件都正常, 说明缺 png 库.

那可能 buildroot 没有勾上 libpng,
也可能勾上了 libpng,
但是你的 Qt 路径, plugins 子目录下面没有 png 插件,
缺一不可.

多谢晕哥指导,我测试了可以正常显示 bmp文件。后续我再测下png

离线

#170 2019-04-01 16:17:53

Jmhh247
会员
注册时间: 2018-12-21
累计积分: 52

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

晕哥 说:

先用 bmp 文件测试, 如果 bmp 文件都正常, 说明缺 png 库.

那可能 buildroot 没有勾上 libpng,
也可能勾上了 libpng,
但是你的 Qt 路径, plugins 子目录下面没有 png 插件,
缺一不可.

折腾了两天,终于能显示png了。。。

确实在buildroot里面勾上 png相关支持就可以了,然后要删除掉qt5目录内的.stamp_built .stamp_configured 。

刚开始我没删掉这些,生成的根文件系统还是不支持显示png

感觉自己蠢哭了。。。

离线

#171 2019-04-01 16:20:28

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

好事多磨嘛,解决就好了,感谢分享!

离线

#172 2019-04-18 14:34:27

渔头
会员
注册时间: 2019-04-08
累计积分: 37

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

沉鱼 说:

荔枝派zero核心板pdf:
https://whycan.cn/files/20171005/11/lichee_zero(核心板).pdf

荔枝派zero底板pdf:
https://whycan.cn/files/20171005/11/lichee_base(底板).pdf


二代一体开发板: 荔枝派一体开发板原理图(核心板与底板整合到一块).pdf

全志V3s手册V1.0: Allwinner_V3s_Datasheet_V1.0.pdf
全志S3手册V0.2: Allwinner_S3_Datasheet_V0_2.pdf (索智S3手册)


http://bbs.lichee.pro/d/127-lichee-sipeed

Lichee Zero:
链接: https://pan.baidu.com/s/1m7DHguNUOJr2QmNJepbQvw 37
提取码:66we
Lichee Zero Plus:
链接: https://pan.baidu.com/s/1DNx1UM7xzSOXFBMSEZv7nA 6
提取码:8umq
Lichee Two:
链接: https://pan.baidu.com/s/1xh74NrFtiGmQ9cdgCRBMBA 5
提取码:riw6
Lichee Nano:
链接: https://pan.baidu.com/s/1xfR7RCKHK033EXvAVQbMbQ 26
提取码:srv5
Lichee Tang:
链接: https://pan.baidu.com/s/1wiNE8Q4ddaF_c-vb40rfAA
提取码:zwfl
Lichee One:
链接: https://pan.baidu.com/s/12vld5q9yyokt2deF-CyX8A 2
提取码:sxq2
Lichee One Plus:
链接: https://pan.baidu.com/s/1PwepFH_TMQ5QJSOpXHZ4Xg 4
提取码:3rza
Lichee Dan/Sipeed M1
链接: https://pan.baidu.com/s/19lEeGs2j5sDK2Z9tgx6xxQ 33
提取码:bvl2




-------------------------------------------------------------------------------------------


回顾:  【视频分享】制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘

1. 准备工作
    1) 安装Ubuntu14.04LTS(长支持版本),如果用虚拟机请安装vmware14(别的虚拟机都不推荐,泪的教训),  然后安装 vmware tools(不是必须,但是方便文件共享)

    2) 安装arm linux 硬件浮点数工具链, 因为V3s支持VFPv4 浮点单元: sudo apt-get install gcc-arm-linux-gnueabihf

    3) 安装git源码管理软件:  sudo apt-get install git

    4) 其他支撑软件

2. u-boot
      首先获取u-boot源码:             git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current
      如果你需要支持spi flash:   git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental

修改 include/configs/sun8i.h, 使u-boot可以直接从tf卡启动:

#define CONFIG_BOOTCOMMAND   "setenv bootm_boot_mode sec; " \
                            "load mmc 0:1 0x41000000 zImage; "  \
                            "load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb; " \
                            "bootz 0x41000000 - 0x41800000;"

#define CONFIG_BOOTARGS      "console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw  vt.global_cursor_default=0"

cd u-boot
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_800x480LCD_defconfig (群主网店5寸屏)

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_480x272LCD_defconfig (通用4.3寸屏)

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig (默认)

ARCH=arm make menuconfig

执行编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

多核编译,避免cpu其他内核打酱油, J后的参数是参与编译的cpu个数:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j3

3. 设备树, Linux
    获取Linux源码(zero-4.13.y分支对网卡支持比较好):  git clone https://github.com/Lichee-Pi/linux.git -b zero-4.13.y
    生成荔枝派Zero 默认配置文件: CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm make licheepi_zero_defconfig
    设备树文件(默认不需要修改):  arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
    编译内核:     make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
    编译设备树: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs

4. 根文件系统
    1). 下载最新的buildroot稳定版本
        官方网站:   https://buildroot.org/download.html
        长支持版本:buildroot-2017.02.7.tar.gz
        最新稳定版:buildroot-2017.08.1.tar.gz

    2). 配置buildroot 参数, make menuconfig; make

        https://whycan.cn/files/members/4/QQ20171122094600.png

        https://whycan.cn/files/members/4/QQ20171122094653.png

        如果不会配置, 就下载下面这个文件,然后把 buildroot-v3s-20171122.zip解压后 拷贝到 buidroot目录成 .config 文件。       

     3). 执行编译, 生成文件跟文件系统。

     4). 如需构建Qt应用程序,   视频地址:  buildroot成功后如何编译Qt应用程序

5. 烧录TF卡启动盘:  【视频分享】制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘
    1) 删除TF卡所有分区
    2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
        sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
    3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero-dock.dtb拷贝到 这个分区
    4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
        tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录

这是我编译好的uboot, linux&dtb, rootfs: V3s_TFCard.7z
荔枝派Zero开发板网卡验证通过, 登陆账号root,无密码。
sha1sum文件校验码: 43c635802438e26c8fe96ada66255b664d52cddd


晕哥
我按这个步骤,编译出来的固件,内核提示找不到声卡设备哦,
我看sun8i-v3s-licheepi-zero.dts里面,没有声卡和网络的配置啊,
我要被这个芯片搞晕头了

离线

#173 2019-04-18 14:39:13

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

核心板: sun8i-v3s-licheepi-zero.dts
核心板+底板: sun8i-v3s-licheepi-zero-dock.dts

这个文件才有: https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts

/*
 * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
 *
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
 *
 *  a) This file is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This file is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */

#include "sun8i-v3s-licheepi-zero.dts"

#include <dt-bindings/input/input.h>

/ {
	model = "Lichee Pi Zero with Dock";
	compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
		     "allwinner,sun8i-v3s";

	aliases {
		ethernet0 = &emac;
	};

	leds {
		/* The LEDs use PG0~2 pins, which conflict with MMC1 */
		status = "disbaled";
	};
};

&codec {
	allwinner,audio-routing =
		"Headphone", "HP",
		"Headphone", "HPCOM",
		"MIC1", "Mic",
		"Mic",  "HBIAS";
	status = "okay";
};

&emac {
	status = "okay";
};

&mmc1 {
	broken-cd;
	bus-width = <4>;
	vmmc-supply = <&reg_vcc3v3>;
	status = "okay";
};

&lradc {
	vref-supply = <&reg_vcc3v0>;
	status = "okay";

	button@200 {
		label = "Volume Up";
		linux,code = <KEY_VOLUMEUP>;
		channel = <0>;
		voltage = <200000>;
	};

	button@400 {
		label = "Volume Down";
		linux,code = <KEY_VOLUMEDOWN>;
		channel = <0>;
		voltage = <400000>;
	};

	button@600 {
		label = "Select";
		linux,code = <KEY_SELECT>;
		channel = <0>;
		voltage = <600000>;
	};

	button@800 {
		label = "Start";
		linux,code = <KEY_OK>;
		channel = <0>;
		voltage = <800000>;
	};
};

离线

#174 2019-04-18 14:51:05

渔头
会员
注册时间: 2019-04-08
累计积分: 37

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

晕哥 说:

核心板: sun8i-v3s-licheepi-zero.dts
核心板+底板: sun8i-v3s-licheepi-zero-dock.dts

这个文件才有: https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts

/*
 * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
 *
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
 *
 *  a) This file is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This file is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */

#include "sun8i-v3s-licheepi-zero.dts"

#include <dt-bindings/input/input.h>

/ {
	model = "Lichee Pi Zero with Dock";
	compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
		     "allwinner,sun8i-v3s";

	aliases {
		ethernet0 = &emac;
	};

	leds {
		/* The LEDs use PG0~2 pins, which conflict with MMC1 */
		status = "disbaled";
	};
};

&codec {
	allwinner,audio-routing =
		"Headphone", "HP",
		"Headphone", "HPCOM",
		"MIC1", "Mic",
		"Mic",  "HBIAS";
	status = "okay";
};

&emac {
	status = "okay";
};

&mmc1 {
	broken-cd;
	bus-width = <4>;
	vmmc-supply = <&reg_vcc3v3>;
	status = "okay";
};

&lradc {
	vref-supply = <&reg_vcc3v0>;
	status = "okay";

	button@200 {
		label = "Volume Up";
		linux,code = <KEY_VOLUMEUP>;
		channel = <0>;
		voltage = <200000>;
	};

	button@400 {
		label = "Volume Down";
		linux,code = <KEY_VOLUMEDOWN>;
		channel = <0>;
		voltage = <400000>;
	};

	button@600 {
		label = "Select";
		linux,code = <KEY_SELECT>;
		channel = <0>;
		voltage = <600000>;
	};

	button@800 {
		label = "Start";
		linux,code = <KEY_OK>;
		channel = <0>;
		voltage = <800000>;
	};
};

谢谢晕哥
我是一体板,意思是要用带dock的dtb,这个dock是个啥意思
一会编译camdroid,一会有搞这个主线linux,真的太复杂啊

离线

#175 2019-04-18 15:12:38

渔头
会员
注册时间: 2019-04-08
累计积分: 37

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

渔头 说:
晕哥 说:

核心板: sun8i-v3s-licheepi-zero.dts
核心板+底板: sun8i-v3s-licheepi-zero-dock.dts

这个文件才有: https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts

/*
 * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
 *
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
 *
 *  a) This file is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This file is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */

#include "sun8i-v3s-licheepi-zero.dts"

#include <dt-bindings/input/input.h>

/ {
	model = "Lichee Pi Zero with Dock";
	compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
		     "allwinner,sun8i-v3s";

	aliases {
		ethernet0 = &emac;
	};

	leds {
		/* The LEDs use PG0~2 pins, which conflict with MMC1 */
		status = "disbaled";
	};
};

&codec {
	allwinner,audio-routing =
		"Headphone", "HP",
		"Headphone", "HPCOM",
		"MIC1", "Mic",
		"Mic",  "HBIAS";
	status = "okay";
};

&emac {
	status = "okay";
};

&mmc1 {
	broken-cd;
	bus-width = <4>;
	vmmc-supply = <&reg_vcc3v3>;
	status = "okay";
};

&lradc {
	vref-supply = <&reg_vcc3v0>;
	status = "okay";

	button@200 {
		label = "Volume Up";
		linux,code = <KEY_VOLUMEUP>;
		channel = <0>;
		voltage = <200000>;
	};

	button@400 {
		label = "Volume Down";
		linux,code = <KEY_VOLUMEDOWN>;
		channel = <0>;
		voltage = <400000>;
	};

	button@600 {
		label = "Select";
		linux,code = <KEY_SELECT>;
		channel = <0>;
		voltage = <600000>;
	};

	button@800 {
		label = "Start";
		linux,code = <KEY_OK>;
		channel = <0>;
		voltage = <800000>;
	};
};

谢谢晕哥
我是一体板,意思是要用带dock的dtb,这个dock是个啥意思
一会编译camdroid,一会有搞这个主线linux,真的太复杂啊


晕哥
哈哈,搞定了,网络和声音,太谢谢了,下一步搞摄像头了

离线

#176 2019-04-18 15:18:33

渔头
会员
注册时间: 2019-04-08
累计积分: 37

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

渔头 说:
渔头 说:
晕哥 说:

核心板: sun8i-v3s-licheepi-zero.dts
核心板+底板: sun8i-v3s-licheepi-zero-dock.dts

这个文件才有: https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts

/*
 * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
 *
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
 *
 *  a) This file is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This file is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */

#include "sun8i-v3s-licheepi-zero.dts"

#include <dt-bindings/input/input.h>

/ {
	model = "Lichee Pi Zero with Dock";
	compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
		     "allwinner,sun8i-v3s";

	aliases {
		ethernet0 = &emac;
	};

	leds {
		/* The LEDs use PG0~2 pins, which conflict with MMC1 */
		status = "disbaled";
	};
};

&codec {
	allwinner,audio-routing =
		"Headphone", "HP",
		"Headphone", "HPCOM",
		"MIC1", "Mic",
		"Mic",  "HBIAS";
	status = "okay";
};

&emac {
	status = "okay";
};

&mmc1 {
	broken-cd;
	bus-width = <4>;
	vmmc-supply = <&reg_vcc3v3>;
	status = "okay";
};

&lradc {
	vref-supply = <&reg_vcc3v0>;
	status = "okay";

	button@200 {
		label = "Volume Up";
		linux,code = <KEY_VOLUMEUP>;
		channel = <0>;
		voltage = <200000>;
	};

	button@400 {
		label = "Volume Down";
		linux,code = <KEY_VOLUMEDOWN>;
		channel = <0>;
		voltage = <400000>;
	};

	button@600 {
		label = "Select";
		linux,code = <KEY_SELECT>;
		channel = <0>;
		voltage = <600000>;
	};

	button@800 {
		label = "Start";
		linux,code = <KEY_OK>;
		channel = <0>;
		voltage = <800000>;
	};
};

谢谢晕哥
我是一体板,意思是要用带dock的dtb,这个dock是个啥意思
一会编译camdroid,一会有搞这个主线linux,真的太复杂啊


晕哥
哈哈,搞定了,网络和声音,太谢谢了,下一步搞摄像头了

下面这么多DTB,我就没试这个dock的,因为不知道啥意思
sun8i-v3s.dtsi                    sun8i-v3s-licheepi-zero-with-480x272-lcd.dtb
sun8i-v3s-licheepi-zero-dock.dtb  sun8i-v3s-licheepi-zero-with-480x272-lcd.dts
sun8i-v3s-licheepi-zero-dock.dts  sun8i-v3s-licheepi-zero-with-800x480-lcd.dtb
sun8i-v3s-licheepi-zero.dtb       sun8i-v3s-licheepi-zero-with-800x480-lcd.dts
sun8i-v3s-licheepi-zero.dts       sun8i-v3s-licheepi-zero-with-lcd.dtsi

离线

#177 2019-04-18 15:21:57

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

很荣幸为大家解决入坑小问题.

dtb 是 dts 编译好的二进制文件,
dts 是设备树文件
dtsi 一般是 dts include 的文件, 一般不直接参与编译,而是和 dts 一起。


sun8i-v3s.dtsi  这个是最核心的设备树基础文件,


sun8i-v3s-licheepi-zero.dts  这个是核心板设备树

sun8i-v3s-licheepi-zero-dock.dts  dock的意思应该就是 核心板 + 底板了, 所以里面启用了网卡和声卡。

离线

#178 2019-04-18 17:30:50

渔头
会员
注册时间: 2019-04-08
累计积分: 37

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

晕哥 说:

很荣幸为大家解决入坑小问题.

dtb 是 dts 编译好的二进制文件,
dts 是设备树文件
dtsi 一般是 dts include 的文件, 一般不直接参与编译,而是和 dts 一起。


sun8i-v3s.dtsi  这个是最核心的设备树基础文件,


sun8i-v3s-licheepi-zero.dts  这个是核心板设备树

sun8i-v3s-licheepi-zero-dock.dts  dock的意思应该就是 核心板 + 底板了, 所以里面启用了网卡和声卡。



我刚买的开发板,录音居然也要换咪头才行,幸好前面已经有人把坑填了

离线

#179 2019-04-18 17:37:39

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

那现在录到声音了吗?

离线

#180 2019-04-18 17:38:41

渔头
会员
注册时间: 2019-04-08
累计积分: 37

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

晕哥 说:

那现在录到声音了吗?

离线

#181 2019-04-18 17:42:04

渔头
会员
注册时间: 2019-04-08
累计积分: 37

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

晕哥 说:

那现在录到声音了吗?


晕哥
推荐一下,用哪个摄像头比较好,还有wifi,我想用USB的WIFI模块,如果用USB的WIFI,会不会影响烧录

离线

#182 2019-04-18 17:42:48

smartcar
会员
注册时间: 2018-02-19
累计积分: 241

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

渔头 说:
晕哥 说:

那现在录到声音了吗?

是把 MIC 焊下换个方向?

离线

#183 2019-04-18 17:46:19

渔头
会员
注册时间: 2019-04-08
累计积分: 37

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

没有,方向没错,只是换了个咪头,用导线引出来,没直接焊到板上

最近编辑记录 渔头 (2019-04-18 17:55:16)

离线

#184 2019-04-18 18:27:19

smartcar
会员
注册时间: 2018-02-19
累计积分: 241

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

渔头 说:

没有,方向没错,只是换了个咪头,用导线引出来,没直接焊到板上

原来如此,学习了,怪不得我的录不到声音。

离线

#185 2019-04-22 10:17:00

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

沉鱼 说:

荔枝派zero核心板pdf:
https://whycan.cn/files/20171005/11/lichee_zero(核心板).pdf

荔枝派zero底板pdf:
https://whycan.cn/files/20171005/11/lichee_base(底板).pdf


二代一体开发板: 荔枝派一体开发板原理图(核心板与底板整合到一块).pdf

全志V3s手册V1.0: Allwinner_V3s_Datasheet_V1.0.pdf
全志S3手册V0.2: Allwinner_S3_Datasheet_V0_2.pdf (索智S3手册)












http://bbs.lichee.pro/d/127-lichee-sipeed

Lichee Zero:
链接: https://pan.baidu.com/s/1m7DHguNUOJr2QmNJepbQvw 37
提取码:66we
Lichee Zero Plus:
链接: https://pan.baidu.com/s/1DNx1UM7xzSOXFBMSEZv7nA 6
提取码:8umq
Lichee Two:
链接: https://pan.baidu.com/s/1xh74NrFtiGmQ9cdgCRBMBA 5
提取码:riw6
Lichee Nano:
链接: https://pan.baidu.com/s/1xfR7RCKHK033EXvAVQbMbQ 26
提取码:srv5
Lichee Tang:
链接: https://pan.baidu.com/s/1wiNE8Q4ddaF_c-vb40rfAA
提取码:zwfl
Lichee One:
链接: https://pan.baidu.com/s/12vld5q9yyokt2deF-CyX8A 2
提取码:sxq2
Lichee One Plus:
链接: https://pan.baidu.com/s/1PwepFH_TMQ5QJSOpXHZ4Xg 4
提取码:3rza
Lichee Dan/Sipeed M1
链接: https://pan.baidu.com/s/19lEeGs2j5sDK2Z9tgx6xxQ 33
提取码:bvl2




-------------------------------------------------------------------------------------------


回顾:  【视频分享】制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘

1. 准备工作
    1) 安装Ubuntu14.04LTS(长支持版本),如果用虚拟机请安装vmware14(别的虚拟机都不推荐,泪的教训),  然后安装 vmware tools(不是必须,但是方便文件共享)

    2) 安装arm linux 硬件浮点数工具链, 因为V3s支持VFPv4 浮点单元: sudo apt-get install gcc-arm-linux-gnueabihf

    3) 安装git源码管理软件:  sudo apt-get install git

    4) 其他支撑软件

2. u-boot
      首先获取u-boot源码:             git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current
      如果你需要支持spi flash:   git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental

修改 include/configs/sun8i.h, 使u-boot可以直接从tf卡启动:

#define CONFIG_BOOTCOMMAND   "setenv bootm_boot_mode sec; " \
                            "load mmc 0:1 0x41000000 zImage; "  \
                            "load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb; " \
                            "bootz 0x41000000 - 0x41800000;"

#define CONFIG_BOOTARGS      "console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw  vt.global_cursor_default=0"

cd u-boot
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_800x480LCD_defconfig (群主网店5寸屏)

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_480x272LCD_defconfig (通用4.3寸屏)

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig (默认)

ARCH=arm make menuconfig

执行编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

多核编译,避免cpu其他内核打酱油, J后的参数是参与编译的cpu个数:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j3

3. 设备树, Linux
    获取Linux源码(zero-4.13.y分支对网卡支持比较好):  git clone https://github.com/Lichee-Pi/linux.git -b zero-4.13.y
    生成荔枝派Zero 默认配置文件: CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm make licheepi_zero_defconfig
    设备树文件(默认不需要修改):  arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
    编译内核:     make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
    编译设备树: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs

4. 根文件系统
    1). 下载最新的buildroot稳定版本
        官方网站:   https://buildroot.org/download.html
        长支持版本:buildroot-2017.02.7.tar.gz
        最新稳定版:buildroot-2017.08.1.tar.gz

    2). 配置buildroot 参数, make menuconfig; make

        https://whycan.cn/files/members/4/QQ20171122094600.png

        https://whycan.cn/files/members/4/QQ20171122094653.png

        如果不会配置, 就下载下面这个文件,然后把 buildroot-v3s-20171122.zip解压后 拷贝到 buidroot目录成 .config 文件。       

     3). 执行编译, 生成文件跟文件系统。

     4). 如需构建Qt应用程序,   视频地址:  buildroot成功后如何编译Qt应用程序

5. 烧录TF卡启动盘:  【视频分享】制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘
    1) 删除TF卡所有分区
    2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
        sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
    3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero-dock.dtb拷贝到 这个分区
    4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
        tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录

这是我编译好的uboot, linux&dtb, rootfs: V3s_TFCard.7z
荔枝派Zero开发板网卡验证通过, 登陆账号root,无密码。
sha1sum文件校验码: 43c635802438e26c8fe96ada66255b664d52cddd

晕哥,使用这个固件,烧写完成之后,串口一点输出都没有。硬件上是接的U0。

离线

#186 2019-04-22 10:21:45

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,164

Re: 荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)

串口输出是 UART0(PB8, PB9), 看下有没有接错?

离线

页脚