Skip to content

Commit

Permalink
licheervnano: doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
0x754C committed Feb 6, 2024
1 parent 709378a commit 221f6dd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 60 deletions.
6 changes: 1 addition & 5 deletions docs/hardware/zh/lichee/RV_Nano/3_images.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ update:

## 镜像格式

镜像使用xz进行压缩,解压后使用rufs/win32diskimager/dd工具写入到SD卡
镜像使用xz/lz4进行压缩,解压后使用rufs/win32diskimager/dd工具写入到SD卡

## 基于官方SDK的镜像

[下载地址](https://github.com/sipeed/LicheeRV-Nano-Build/releases)

## 基于主线buildroot sdk的镜像 (WORK-IN-PROGRESS)

[下载地址](https://github.com/0x754C/sipeed-toolchain/releases)
55 changes: 11 additions & 44 deletions docs/hardware/zh/lichee/RV_Nano/5_peripheral.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ PC会使用DHCP自动获取地址
使用命令:

```
avahi-browse -art | grep lpirvnano
avahi-browse -art | grep licheervnano
```

列出广播域中域名带有的lpirvnano的设备
Expand All @@ -76,21 +76,11 @@ avahi-browse -art | grep lpirvnano
然后使用:

```
ssh root@lpirvnano-XXXX.local
ssh root@licheervnano-XXXX.local
```

连接板子


## 关闭镜像的的开机DEMO

```
# 清空rc.local
echo '#!/bin/sh' > /etc/rc.local
# 重启
reboot
```

## Audio

licheerv nano 支持录音和播放,使用标准 ALSA 工具可以进行录音、播放等操作。
Expand Down Expand Up @@ -147,47 +137,33 @@ cat /sys/class/cvi-saradc/cvi-saradc0/device/cv_saradc

将屏幕的排线接到板子的MIPI接口,注意线序

编辑板子上的/opt/fb_load.sh,将具体型号的初始化命令的注释去掉
然后在cvi_mmf_sdk的panel中选择对应的时序设置,(MIPI屏幕初始化代码放在uboot中)

然后执行:
然后编译出新的uboot: fip.bin,放在系统SD卡的第一个分区

```
/opt/fb_load.sh # 初始化屏幕驱动
devmem # 测试彩条
```
LCD会提供framebuffer供用户空间程序访问:

测试是否可用,如果可用,可以加入到开机脚本:
一些用于测试的demo:

```
echo /opt/fb_load.sh >> /etc/rc.local
/opt/lcd/fbpattern # 测试LCD时序
/otp/lcd/fbbar # 在屏幕上显示字符串
```

LCD会提供framebuffer供用户空间程序访问

建议使用QT5,SDL1.2,或LVGL进行界面开发,也可以直接写入Framebuffer

直接写入framebuffer可以参考板子文件系统内的/opt/src/vendortest

## 触摸屏

将触摸屏排线接到板子的触摸屏接口,注意线序

然后执行:

```
/opt/touch.sh # 加载触摸屏驱动
```

然后执行:

```
echo 2 | evtest
```

点击触摸屏会在终端看到具体坐标

读取坐标和点击事件可以参考/opt/src/vendortest里面的输入部分

## WIFI

将天线安装到WIFI模块的天线座子上
Expand All @@ -204,7 +180,7 @@ network={
然后执行:

```
/opt/wifi.sh
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
```

验证网络是否可用:
Expand All @@ -213,11 +189,8 @@ network={
ping 你的网关地址
```

如果可用,可以加入到开机脚本:
如果可用,可以加入到开机脚本 /etc/rc.local

```
echo '/opt/wifi.sh' >> /etc/rc.local
```

## 摄像头

Expand All @@ -226,13 +199,7 @@ echo '/opt/wifi.sh' >> /etc/rc.local
然后执行:

```
/opt/camera.sh 0
echo "
1
0
1
255" | sensor_test # 捕获一张图片,保存在当前目录
/mnt/system/usr/bin/sample_vio 6 # 将摄像头画面实时显示到屏幕
```

## 按键
Expand Down
16 changes: 5 additions & 11 deletions docs/hardware/zh/lichee/RV_Nano/6_develop_mainline.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ datasheet: https://github.com/sophgo/sophgo-doc/releases

源码:

https://github.com/sipeed/LicheeRV-Nano-Build/tree/v4.1.0
https://github.com/sipeed/LicheeRV-Nano-Build/tree/v4.1.0-licheervnano

构建环境搭建可以参考repo内的github cicd文件:

Expand All @@ -47,17 +47,11 @@ https://github.com/sipeed/LicheeRV-Nano-Build/blob/main/.github/workflows/lichee
- https://developer.sophgo.com/thread/556.html
- 如何交叉编译HelloWorld: https://github.com/sipeed/LicheeRV-Nano-Build/blob/v4.1.0/build/boards/cv181x/cv1812cp_licheerv_nano_sd/readme.md#compile-program-use-vendors-toolchain

## buildroot
## 主线buildroot

基于crosstool-ng生成专用的交叉工具链,用在基于主线buildroot的SDK上,在cvi_mmf_sdk上验证好的功能可以移植到这里使用。

源码:

https://github.com/0x754C/sipeed-toolchain

构建环境搭建可以参考repo内的github cicd文件:
TODO

https://github.com/0x754C/sipeed-toolchain/blob/master/.github/workflows/licheervnano-host-linux-amd64.yml
基于主线buildroot,提供更干净的构建环境

## openwrt

Expand Down Expand Up @@ -95,7 +89,7 @@ https://github.com/sipeed/LicheeRV-Nano-Build/blob/926bbe94f4f00059ce0ff3857cc72

1. 在middleware中的用户空间demo中添加屏幕初始化序列.

2. 在uboot中添加屏幕的初始化序列.
2. 在uboot中添加屏幕的初始化序列.(目前使用这种方式)

## 初始化MIPI RX

Expand Down
1 change: 1 addition & 0 deletions docs/hardware/zh/lichee/RV_Nano/8_mmf_development_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ scp sample_vio [email protected]:/root # xxx.xxx.xxx.xxx是板子的IP地址
ssh [email protected]

# 如果需要使用显示屏,则需要运行fb_load.sh以确保加载了驱动(只需要执行一次)
# 新版镜像不用执行这个,已经内置到uboot
/opt/fb_load.sh

# 运行示例
Expand Down

0 comments on commit 221f6dd

Please sign in to comment.