差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
nk-r39s2-a1 [2023/03/06 18:08] wjj |
nk-r39s2-a1 [2023/06/04 19:18] (当前版本) hc |
||
---|---|---|---|
行 17: | 行 17: | ||
==== 快速上手 ==== | ==== 快速上手 ==== | ||
=== 系统烧录 === | === 系统烧录 === | ||
- | {{page>: | + | |
+ | 1、下载烧录工具: | ||
+ | * 请务必先安装驱动,烧录工具链接含有驱动DriverAssitant压缩包,解压后点击DriverInstall.exe安装驱动 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 2、开始烧录: | ||
+ | * 将数据线一端与主板OTG连接,另一端连接电脑。注意烧录前,需关闭电源,开电源时按住boot_key按键进行烧入。 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | * 打开压缩包中开发工具 >> 升级固件 >> 点击固件并选择好固件 >> 点升级开始烧录 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | * 烧录过程中的状态,会有进度显示 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | * 更换系统平台(例如安卓切换到Linux)时,可能出现无法烧录的情况,此时打开开发工具 >> 高级功能 >> 点击进入Maskrom切换烧录模式后烧录系统 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 3、完成烧录: | ||
+ | * 烧录过程不需要任何操作,烧录成功后右框会显示设备自动重启,烧录完成。 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | === Fwbackups备份软件安装 === | ||
+ | |||
+ | {{page>: | ||
+ | |||
+ | === 生成rootfs镜像 === | ||
+ | |||
+ | {{page>: | ||
=== Debug串口调试 === | === Debug串口调试 === | ||
1、通过串口进入系统后台,需要利用板子的Debug接口,接口位置和定义如图: | 1、通过串口进入系统后台,需要利用板子的Debug接口,接口位置和定义如图: | ||
行 60: | 行 95: | ||
{{page>: | {{page>: | ||
== LAN == | == LAN == | ||
- | {{page>:template:temp_android_lan}} | + | 1. 将网线连接到主板LAN1接口上 |
+ | |||
+ | {{: | ||
+ | |||
+ | 2. 查看网卡IP地址 | ||
+ | |||
+ | | ||
+ | |||
+ | {{: | ||
+ | |||
+ | | ||
+ | |||
+ | {{: | ||
+ | |||
+ | | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 3. 连接上网络后,打开浏览器浏览网页查看是否连接上网络 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 4.设置以太网静态IP地址 | ||
+ | |||
+ | * 点击 Ethernet IP mode 选择 static | ||
+ | |||
+ | {{: | ||
+ | |||
+ | * 进行设置 | ||
+ | |||
+ | {{: | ||
== WIFI == | == WIFI == | ||
- | {{page>:template:temp_android_wifi}} | + | 1.打开设置,点击WLAN |
+ | |||
+ | {{:arm:rk3399: | ||
+ | |||
+ | 2.点击开启 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 3.浏览可用的WIFI路由,然后点击,输入密码 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 4.连接成功右上角状态栏图标变为这样 | ||
+ | |||
+ | {{: | ||
== 4G/5G == | == 4G/5G == | ||
1.测试4G网络 | 1.测试4G网络 | ||
行 178: | 行 258: | ||
== LAN == | == LAN == | ||
- | {{page>:template:temp_linux_lan}} | + | 1. 查看网卡IP地址,系统默认都为动态获取IP地址 |
+ | #ifconfig -a | ||
+ | {{:arm:rk3399: | ||
+ | |||
+ | 2. 设置网卡静态IP地址 | ||
+ | * 方法1 -- 使用图形界面工具设置 | ||
+ | |||
+ | 双击桌面图标Advanced Network Configuration | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | * 方法2 -- 修改配置文件的方式: | ||
+ | |||
+ | vim / | ||
+ | |||
+ | {{: | ||
+ | |||
+ | * 修改完成后输入重启生效。 | ||
+ | |||
== WIFI == | == WIFI == | ||
- | {{page>:template:temp_linux_wifi}} | + | 1. 点击右下角网络图标,浏览可用WIFI路由: |
+ | |||
+ | {{:arm:rk3399: | ||
+ | |||
+ | * 输入WIFI密码,点击connect | ||
+ | {{: | ||
+ | |||
+ | 2. 方法2 -- 命令行连接wifi | ||
+ | |||
+ | nmcli d wifi connect " | ||
== 4G/5G == | == 4G/5G == | ||
- | {{page>:template:temp_linux_4g5g}} | + | 1. 系统已带自动拨号,打开终端,输入命令4g 即可自动拨号: |
+ | |||
+ | root@rk3399: | ||
+ | |||
+ | 2. 拨号完成后,查看IP地址: | ||
+ | |||
+ | {{:arm:rk3399: | ||
+ | |||
+ | 3. 打开浏览器,浏览任意网站。 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 4. 5G测试方法与4G类似,输入命令5g即可自动拨号: | ||
+ | |||
+ | root@rk3399: | ||
== Can == | == Can == | ||
{{page>: | {{page>: | ||
行 221: | 行 345: | ||
{{page>: | {{page>: | ||
== Audio == | == Audio == | ||
- | {{page>:template:temp_linux_audio}} | + | * 将喇叭连接板子上的 SPK 端口 |
+ | |||
+ | 1. 方法① -- 使用系统自带SMPayer播放器,以及音频测试文件,可以做简单音频功能测试 | ||
+ | |||
+ | {{:arm:rk3399: | ||
+ | |||
+ | 2. 方法② -- 使用命令方式播放: | ||
+ | |||
+ | aplay / | ||
== Mic == | == Mic == | ||
- | {{page>: | + | * 录音测试 |
+ | |||
+ | arecord -d 5 -f cd -r 44100 -c 2 -t wav test.wav | ||
+ | aplay test.wav | ||
== USB == | == USB == | ||
- | {{page>:template: | + | 1. U盘自动挂载/ |
+ | |||
+ | root@rk3399:~# df -h | ||
+ | 文件系统 | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | / | ||
== SDCARD == | == SDCARD == | ||
- | {{page>:template: | + | * SDcard 自动挂载: |
+ | |||
+ | root@rk3399:~# df -h | ||
+ | 文件系统 | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | / | ||
+ | |||
+ | 解除挂载: | ||
+ | |||
+ | umount / | ||
+ | |||
+ | 挂载: | ||
+ | |||
+ | mount / | ||
== Bluetooth == | == Bluetooth == | ||
- | {{page>:template:temp_linux_bluetooch}} | + | 1. 打开蓝牙管理器,搜索附近蓝牙设备: |
+ | |||
+ | {{:arm:rk3399: | ||
+ | |||
+ | 2. 选中蓝牙设备,配对然后选择信任: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 3. 设置蓝牙连接类型: | ||
+ | |||
+ | {{: | ||
== WatchDog == | == WatchDog == | ||
{{page>: | {{page>: | ||
== Key == | == Key == | ||
- | {{page>:template:temp_linux_key}} | + | 1. 输入命令evtest 查看系统下所有按键、输入设备: |
+ | |||
+ | root@rk3399: | ||
+ | No device specified, trying to scan all of / | ||
+ | Available devices: | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | Select the device event number [0-4]: | ||
+ | |||
+ | 2. 按照上面提示选择测试按键,如RK3399 boot按键为 | ||
+ | |||
+ | | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 3. 自定义按键功能,配置文件为 | ||
+ | |||
+ | / | ||
+ | 如下为定义按键为reboot功能,亦为系统默认配置,用户可以根据需要自定义。 | ||
+ | |||
+ | KEY_VOLUMEUP | ||
== LCD/ | == LCD/ | ||
- | {{page>:template:temp_linux_lcd}} | + | 1. 系统支持使用APP切换不同的LCD屏,输入dis命令打开APP如下图: |
+ | |||
+ | * 选择对应的eDP/ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 2. 背光亮度调节: | ||
+ | |||
+ | * 方法①:点击右下角系统托盘如下图标,打开背光调节APP | ||
+ | |||
+ | {{: | ||
+ | |||
+ | * 方法②:控制驱动应用层接口: | ||
+ | |||
+ | echo 100 > / | ||
+ | (注:写入数值越大亮度越大,max_brightness 为250) | ||
== PowerManager == | == PowerManager == | ||
- | {{page>:template:temp_linux_pm}} | + | 1. 电源管理设置: |
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 休眠后按POWER键唤醒 | ||
+ | 2. 电源管理功能非所有产品支持,需定制系统请联系业务窗口人员。 | ||
== RTC/ | == RTC/ | ||
- | {{page>:template:temp_linux_rtc}} | + | 1.查看当前系统时间: |
+ | |||
+ | [root@rk3399: | ||
+ | Wed Jun 8 15:54:09 CST 2022 | ||
+ | |||
+ | 2. 设置同步硬件时钟: | ||
+ | |||
+ | [root@rk3399:/ | ||
+ | Wed Jun 8 17:01:01 CST 2022 | ||
+ | [root@rk3399:/ | ||
+ | [root@rk3399:/ | ||
+ | Wed Jun 8 17:01:09 2022 0.000000 seconds | ||
+ | |||
+ | 3. 关机断电5秒以上,再开机查看系统时间是否保存: | ||
+ | [root@rk3399:/ | ||
+ | Wed Jun 8 17:02:30 CST 2022 | ||
+ | 注:系统默认为网络时间同步,以上RTC测试需要在断外网情况下测试。 | ||
+ | |||
+ | 4. 时区设置 | ||
+ | |||
+ | * 方法① -- 修改link文件, | ||
+ | |||
+ | ln -sf / | ||
+ | reboot | ||
+ | |||
+ | |||
+ | 设置其他时区只需将上面命令中的Asia/ | ||
+ | |||
+ | * 方法② -- 在图形界面依次打开首选项-> | ||
+ | |||
+ | {{:arm: | ||
+ | |||
+ | 选择完成后关闭窗口,使用date命令查看时区变化: | ||
+ | |||
+ | | ||
== CPU == | == CPU == | ||
- | {{page>: | + | 查看CPU信息: |
+ | |||
+ | cat / | ||
== Memory == | == Memory == | ||
- | {{page>: | + | 查看内存容量大小: |
+ | |||
+ | free -h | ||
+ | | ||
== EMMC == | == EMMC == | ||
- | {{page>: | + | 查看EMMC可用容量大小 |
+ | |||
+ | df -h | ||
==== Linux 编程指南 ==== | ==== Linux 编程指南 ==== | ||
行 527: | 行 790: | ||
==== Linux 应用支持 ==== | ==== Linux 应用支持 ==== | ||
=== QT交叉编译环境 === | === QT交叉编译环境 === | ||
- | {{page>:template:temp_Linux_qt}} | + | * 主机环境推荐:Debian 10 x64 bit, |
+ | 可以直接导入配置好的虚拟机镜像: | ||
+ | [[ftp:// | ||
+ | |||
+ | 或者使用QT编译环境 Docker image: | ||
+ | [[ftp:// | ||
+ | |||
+ | ### load docker image | ||
+ | sudo docker load < | ||
+ | |||
+ | ### 运行docker image, | ||
+ | sudo docker run --rm --mount type=bind, | ||
+ | |||
+ | ### | ||
+ | | ||
+ | | ||
+ | | ||
+ | * 主机交叉编译环境配置参考步骤: | ||
+ | |||
+ | 1. 安装交叉编译工具链: | ||
+ | apt install -y crossbuild-essential-arm64 | ||
+ | |||
+ | 2. 拷贝平板系统内的/ | ||
+ | |||
+ | 3. 配置以下环境变量 | ||
+ | |||
+ | QTSYSROOT="/ | ||
+ | QTPATH=$QTSYSROOT/ | ||
+ | |||
+ | LD_LIBRARY_PATH=$QTPATH/ | ||
+ | LIBRARY_PATH=$QTPATH/ | ||
+ | C_INCLUDE_PATH=$QTPATH/ | ||
+ | PATH=$QTPATH/ | ||
+ | |||
+ | PKG_CONFIG_PATH=$QTPATH/ | ||
+ | |||
+ | export LD_LIBRARY_PATH | ||
+ | export LIBRARY_PATH | ||
+ | export C_INCLUDE_PATH | ||
+ | export CPLUS_INCLUDE_PATH | ||
+ | |||
+ | export PKG_CONFIG_PATH | ||
+ | export PATH | ||
+ | |||
+ | |||
+ | 4. 编译APP | ||
+ | |||
+ | qmake | ||
+ | make | ||
+ | |||
+ | {{: | ||
=== QT Creator === | === QT Creator === | ||
- | {{page>:template:temp_Linux_qt_creator}} | + | 1. 安装 |
+ | |||
+ | 进入Qt官方下载页面,选择一个版本下载 qt-creator-opensource-linux-x86_64-x.x.x.run,下载完成之后,在终端执行 ./xxxx.run 运行安装,注意文件需要有执行权限。 | ||
+ | |||
+ | 2.配置 | ||
+ | |||
+ | 安装完成后,启动 Qt Creator,打开菜单 Tools -> Option , | ||
+ | |||
+ | *配置 Qt Versions | ||
+ | |||
+ | 点击右侧 add 按钮添加,选择 Qt 环境安装位置中的 qmake 即可 | ||
+ | |||
+ | qmake: | ||
+ | |||
+ | / | ||
+ | |||
+ | {{:arm: | ||
+ | |||
+ | *配置 Compilers | ||
+ | |||
+ | 点击右侧 add 按钮添加 gcc 和 g++ 交叉编译器的位置 | ||
+ | |||
+ | 如果主机安装了 crossbuild-essential-arm64,则编译器就在 /usr/bin/ 下 | ||
+ | |||
+ | 如果使用了第三方的交叉编译器,找到安装位置并添加即可 | ||
+ | |||
+ | 如果目标平台是 Buildroot ,则需要使用 Buildroot Qt 环境包中的编译器 | ||
+ | |||
+ | g++:/ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | gcc:/ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 为方便调试,配置 Debeggers 和 Devices 用于在线调试: | ||
+ | |||
+ | *配置 Debuggers | ||
+ | |||
+ | 点击右侧 add 按钮添加 gbd-multiarch: | ||
+ | |||
+ | 检查目标机上是否存在 / | ||
+ | |||
+ | 回到主机的 Qt Creator, | ||
+ | |||
+ | 选择主机中的 gdb-multiarch : / | ||
+ | |||
+ | {{: | ||
+ | |||
+ | *配置 Devices | ||
+ | |||
+ | 设置好设备的 IP 、用户名(root)。为了方便调试,可以在设备上设置静态 IP。 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | *配置Kits | ||
+ | |||
+ | 将前面设置的配置项添加到 Kits。 | ||
+ | |||
+ | 如果目标平台是 Ubuntu 系统,这一步也需要添加 sysroot 的路径 | ||
+ | |||
+ | {{: | ||
=== 高清硬解码 === | === 高清硬解码 === | ||
{{page>: | {{page>: | ||
=== Docker === | === Docker === | ||
- | {{page>:template:temp_Linux_docker}} | + | Docker English-Community 支持以下的 Ubuntu 版本: |
+ | *Xenial 16.04(LTS) | ||
+ | *Bionic 18.04(LTS) | ||
+ | *Cosmic 18.04 | ||
+ | *Disco 19.04 | ||
+ | *其他更新的版本... | ||
+ | |||
+ | 安装命令如下: | ||
+ | |||
+ | curl -fsSL https:// | ||
+ | |||
+ | 也可以使用国内 daocloud 一键安装命令: | ||
+ | |||
+ | curl -sSL https:// | ||
+ | |||
+ | 测试 Docker 是否安装成功,输入以下指令,打印出以下信息则安装成功: | ||
+ | |||
+ | sudo docker run hello-world | ||
+ | |||
+ | Unable to find image ' | ||
+ | latest: Pulling from library/ | ||
+ | 1b930d010525: | ||
+ | Digest: sha256: | ||
+ | Status: Downloaded newer image for hello-world: | ||
+ | |||
+ | |||
+ | Hello from Docker! | ||
+ | This message shows that your installation appears to be working correctly. | ||
+ | |||
+ | |||
+ | To generate this message, Docker took the following steps: | ||
+ | 1. The Docker client contacted the Docker daemon. | ||
+ | 2. The Docker daemon pulled the " | ||
+ | (amd64) | ||
+ | 3. The Docker daemon created a new container from that image which runs the | ||
+ | executable that produces the output you are currently reading. | ||
+ | 4. The Docker daemon streamed that output to the Docker client, which sent it | ||
+ | to your terminal. | ||
+ | |||
+ | |||
+ | To try something more ambitious, you can run an Ubuntu container with: | ||
+ | $ docker run -it ubuntu bash | ||
+ | |||
+ | |||
+ | Share images, automate workflows, and more with a free Docker ID: | ||
+ | | ||
+ | |||
+ | |||
+ | For more examples and ideas, visit: | ||
+ | | ||
===OpenCL=== | ===OpenCL=== |