Rockchip RK3588 - Mali-G610 GPU驱动(mesa+Panthor)
----------------------------------------------------------------------------------------------------------------------------
开发板 :ArmSoM-Sige7/NanoPC-T6开发板
eMMC :64GB/256GB
LPDDR4 :8GB/16GB
显示屏 :15.6英寸HDMI接口显示屏
u-boot :2017.09
linux :6.1
Linux发行版 :ubuntu 24.04
----------------------------------------------------------------------------------------------------------------------------
在两年前,我们介绍了如何移植ARM Mali GPU的开源驱动到NanoPC-T4(RK3399)开发板,具体可以参考《Rockchip RK3399 - Mali-T860 GPU驱动 (mesa+Panfrost) 》。
今天呢,我们就来谈一谈如何将ARM Mali GPU开源驱动移植到ArmSoM-Sige7/NanoPC-T6(RK3588)开发板。
一、GPU驱动回顾
我们在《Rockchip RK3588 - OpenCL环境搭建(官方GPU驱动)》介绍了ARM Mali GPU闭源驱动,其分为两部分:
- 内核层
GPU驱动:Mail GPU IP提供商ARM公司只开放了内核部分驱动,而且这部分驱动还没有按照linux kernel的规范以DRM的框架去实现,位于kernel/drivers/gpu/arm/bifrost/目录; - 用户层动态库:此外
Userspace部分ARM没有开源,只是以库的形式提供给购买了Mali GPU授权的SoC厂商,官方提供的用户层动态库libmali.so,libmali.so一般会有不同的版本(X11,Wayland等),其提供了OpenGL ES,EGL,OpenCL接口;
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# ll external/libmali/lib/aarch64-linux-gnu/
-rwxr-xr-x 1 root root 43370976 6月 9 2024 libmali-valhall-g610-g13p0-dummy.so*
-rwxr-xr-x 1 root root 43489296 6月 9 2024 libmali-valhall-g610-g13p0-gbm.so*
-rwxr-xr-x 1 root root 43513872 6月 9 2024 libmali-valhall-g610-g13p0-wayland-gbm.so*
-rwxr-xr-x 1 root root 43526160 6月 9 2024 libmali-valhall-g610-g13p0-x11-gbm.so*
-rwxr-xr-x 1 root root 43550736 6月 9 2024 libmali-valhall-g610-g13p0-x11-wayland-gbm.so*
......
而ARM Mali GPU开源驱动,我们在《Rockchip RK3399 - Mali-T860 GPU驱动(mesa+Panfrost) 》中详细介绍过,其包括:
- 内核层
GPU驱动:Lima驱动支持Utgard Mali GPU:Mali-400/Mali-450 GPU(Linux 5.2+);Panfrost驱动支持Midgard、Bifrost和Valhall Mali GPU:Mali-Gxx GPU和Mali-T6xx/Mali-T7xx/Mali-T8xx GPU(Linux 5.2+);Panthor驱动为新一代的开源驱动,专门为未来基于ARM最新GPU架构(如Valhall和后续架构)的Mali GPU而设计(Linux 6.10+);
- 用户层动态库:
Usersacpe部分的开源库叫做mesa,对Mali GPU的支持从mesa 19.2开始。
1.1 Panfrost
Panfrost是一个开源的自由及开放源代码软件(FOSS)图形驱动项目,旨在为ARM Mali系列GPU提供在Linux系统上的支持。它包含在Mesa 3D图形库中,是 Linux开源图形栈的核心组成部分。
Panfrost最初是通过对ARM Mali GPU的硬件行为和官方闭源驱动进行逆向工程而开发的。这是一个由社区推动的巨大成就。它支持多代Mali GPU架构:、
Midgard(例如Mali-T760,T860);Bifrost(例如Mali-G31,G52);Valhall(例如Mali-G57,G310):注意:对Valhall的早期支持是在Panfrost内开始的,但现在发展的重点已经转移到了Panthor上。
作为Mesa的一部分,Panfrost已经进入了几乎所有主要的Linux发行版。
Panfrost驱动程序栈包括基于Midgard、Bifrost和Valhalla 微架构的ARM Mali GPU的OpenGL ES实现,目前支持以下硬件:
GPU |
Architecture |
Found in SoC |
Mesa version |
Notes |
|---|---|---|---|---|
T600 |
Midgard (v4) |
Exynos 5250 |
25.0.7+ |
|
T620 |
Midgard (v4) |
Exynos 5420/5422/5430/5800 |
22.3+ |
|
T720 |
Midgard (v4) |
Exynos 7580, MT6735, and MT6753 |
20.0+ |
|
T760 |
Midgard (v5) |
RK3288 |
19.3+ |
|
T820 |
Midgard (v5) |
S912 |
19.3+ |
|
T830 |
Midgard (v5) |
Kirin 65x |
22.0+ |
|
T860 |
Midgard (v5) |
RK3399 |
19.3+ |
|
T880 |
Midgard (v5) |
Kirin 95x and MediaTek Helio X20/X27 |
22.0+ |
|
G31 |
Bifrost (v7) |
Amlogic S905, RK3326 and Allwinner H616 SoC |
20.3 |
kernel 5.10+ |
G51 |
Bifrost (v7) |
Kirin 710 |
22.0 |
|
G52 |
Bifrost (v7) |
Amlogic S922, RK3530, Kirin 810 and Helio P65/G70/G80/G85 |
20.3 |
kernel 5.10+ |
G52r1 |
Bifrost (v7) |
RK3566 and RK3568 |
21.2 |
|
G57 |
Valhall (v9) |
MediaTek MT8192 |
22.2+ |
kernel 5.20+ |
G72 |
Bifrost (v6) |
Exynos 7 9610, Exynos 9 9810, Helio P60/P70 and Kirin 970 |
20.3 |
kernel 5.10+ |
G76 |
Bifrost (v7) |
elio G90T/G95 |
22.0 |
|
G310 |
Valhall (v10) |
RK3688 |
25.0.7+ |
kernel 6.10+ |
G610 |
Valhall (v10) |
RK3588 |
25.0.7+ |
kernel 6.10+ |
G720 |
5th Gen (v12) |
25.1+ |
kernel TBD - Requires patch series to be merged: https://lwn.net/Articles/1023522/ |
|
G725 |
5th Gen (v13) |
25.1+ |
kernel TBD - Requires patch series to be merged: https://lwn.net/Articles/1023522/ |
1.2 Panthor
Panthor是ARM公司推出的Mali GPU开源驱动项目,主要用于替代传统闭源驱动,支持Linux系统下的OpenGL和Vulkan图形渲染。
- 目标硬件:主要针对
Valhall以及其后续架构,例如瑞芯微、全志等国产芯片方案中集成的Mali GPU(例如Mali-G31,Mali-G52,Mali-G710等); - 驱动类型:它是一个完全开源、符合现代
Linux内核标准的GPU驱动。
Panthor目前处于积极开发阶段,它在Linux 6.10版本中引入。在最新的Linux内核和Mesa版本中,它已经提供了基本的功能(2D/3D 加速),并且性能和改进正在快速推进。
1.3 区别
我们来详细解释一下Panthor和Panfrost这两个与ARM Mali GPU相关的开源驱动程序。
简单来说:
Panfrost是现有的、已经成熟的开源驱动,支持从较旧到较新的多代Mali GPU;Panfrost已经非常成熟和稳定,对于Midgard和Bifrost架构的GPU,它提供了优秀的日常使用体验和良好的性能。对于早期的Valhall GPU,它也能提供基本功能,但更高级的功能和优化正在Panthor中实现;Panthor是新一代的开源驱动,专门为未来基于ARM最新GPU架构(如Valhall和后续架构)的Mali GPU而设计;Panthor是继Panfrost之后的新一代开源GPU驱动,同样集成在Mesa中;Panthor并非完全取代Panfrost,对于Midgard和Bifrost GPU,Panfrost仍然是主要且推荐的驱动,Panthor是为新硬件准备的“接班人”。
为什么需要Panthor?
- 随着
GPU架构从Bifrost演进到Valhall,硬件的工作方式和特性发生了显著变化。继续在旧的Panfrost驱动代码上修修补补来支持新硬件会变得非常低效和混乱。因此,驱动开发者决定“另起炉灶”: - 更清晰的代码结构:
Panthor从头开始设计,代码库更干净、更模块化,便于维护和为新硬件添加支持; - 利用现代
GPU特性:Valhall架构引入了新的着色器核心、新的指令集和新的内存管理单元(MMU)。Panthor能够更好地利用这些特性,以实现更高的性能和更低的功耗。 - 支持新功能:例如
Vulkan 1.3 API的支持是Panthor的一个关键目标。虽然Panfrost主要专注于OpenGL ES,但Panthor旨在同时提供高质量的Vulkan和OpenGL ES支持。 - 统一内存管理:
Panthor引入了更现代和高效的GPU内存管理方法,这对于性能和多任务处理至关重要。
二、NanoPC-T6 GPU驱动移植
2.1 准备工作
2.1.1 下载sd-fuse_rk3588
我们在《Rockchip RK3588 - 移植uboot 2017.09 & linux 6.1》介绍了如何编译适用于NanoPC-T6开发板的固件。由于我本地代码是2年前拉取的,到2025年已经两年多了,仓库的代码也提交了许多,因此这里将源码删除了重新下载了。
编译使用的SDK源码如下:
root@ubuntu:/work/sambashare/rk3588/friendly# git clone https://github.com/friendlyarm/sd-fuse_rk3588.git --single-branch -b kernel-6.1.y
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ll
-rwxr-xr-x 1 root root 1137 11月 8 20:07 build-boot-img.sh
-rwxr-xr-x 1 root root 12433 11月 8 23:11 build-kernel.sh
-rwxr-xr-x 1 root root 7769 11月 8 20:07 build-rootfs-img.sh
-rwxr-xr-x 1 root root 4265 11月 8 20:07 build-uboot.sh
-rwxr-xr-x 1 root root 39 11月 8 20:07 clean.sh
drwxr-xr-x 3 root root 4096 11月 8 20:07 files/
-rwxr-xr-x 1 root root 3677 11月 8 20:07 fusing.sh
-rw-r--r-- 1 root root 599 11月 8 20:07 .gitignore
-rwxr-xr-x 1 root root 3215 11月 8 20:07 mk-emmc-image.sh
-rwxr-xr-x 1 root root 5834 11月 8 20:07 mk-sd-image.sh
drwxr-xr-x 14 root root 4096 11月 8 23:27 out/
drwxr-xr-x 4 root root 4096 11月 8 23:33 prebuilt/
-rw-r--r-- 1 root root 12790 11月 8 20:07 README_cn.md
-rw-r--r-- 1 root root 13176 11月 8 20:07 README.md
drwxr-xr-x 3 root root 4096 11月 8 20:07 test/
drwxr-xr-x 3 root root 4096 11月 8 23:31 tools/
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# git log -n 1
commit 6700e2bcf7ba23037ba59eee918f77c8580fbe75 (HEAD -> kernel-6.1.y, origin/kernel-6.1.y, origin/HEAD)
Author: Lawrence-Tang <[email protected]>
Date: Mon Sep 8 14:10:02 2025 +0800
update readme
2.1.2 下载固件(ubuntu 24.04)
系统镜像,这里我们以ubuntu-noble-desktop-arm64为例,下载地址:https://download.friendlyelec.com/NanoPC-T6。
这里简单说一下我们为什么使用ubuntu-noble(即ubuntu 24.04)版本这是因为G610要求的Mesa版本为25.0.7+,而不同版本的ubuntu默认安装的Mesa版本是不一样的;如果安装低版本的ubuntu,比如ubuntu 20.04,其默认的Mesa通常是21.2.6版本,这时我们如果去编译安装高版本的Mesa,可能会出现各种兼容性问题等;为此,我们直接安装高版本ubuntu 24.04,其默认的Mesa版本为25.0.7。
将ubuntu-noble-desktop-arm64-images.tgz(位于"\03_分区镜像文件"目录下,以实际下载的文件为准)拷贝到/work/sambashare/rk3588/friendly/sd-fuse_rk3588目录下;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ll ubuntu*
-rw-r--r-- 1 root root 1767884420 11月 10 20:26 ubuntu-noble-desktop-arm64-images.tgz
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# tar -xvzf ubuntu-noble-desktop-arm64-images.tgz
解压得到ubuntu-noble-desktop-arm64文件夹;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ll ubuntu-noble-desktop-arm64
-rw-r--r-- 1 root root 7945164 8月 10 23:04 boot.img
-rw-r--r-- 1 root root 1424 5月 28 2023 dtbo.img
-rw-r--r-- 1 root root 331776 1月 9 2025 idbloader.img
-rw-r--r-- 1 root root 73 10月 10 15:15 info.conf
-rw-r--r-- 1 root root 35911700 8月 7 15:06 kernel.img
-rw-r--r-- 1 root root 487872 1月 9 2025 MiniLoaderAll.bin
-rw-r--r-- 1 root root 49152 5月 28 2023 misc.img
-rw-r--r-- 1 root root 470 10月 10 15:15 parameter.txt
-rw-r--r-- 1 root root 8446976 8月 7 15:06 resource.img
-rw-r--r-- 1 root root 4786943072 10月 10 15:15 rootfs.img
-rw-r--r-- 1 root root 4194304 7月 21 14:38 uboot.img
-rw-r--r-- 1 root root 159868 10月 10 15:15 userdata.img
2.1.3 安装交叉编译工具
下载交叉编辑工具:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# wget https://github.com/friendlyarm/prebuilts/blob/master/gcc-x64/toolchain-11.3-aarch64.tar.xz
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# tar xvf toolchain-11.3-aarch64.tar.xz -C /
默认安装到/opt/FriendlyARM/toolchain/11.3-aarch64/:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ll /opt/FriendlyARM/toolchain/11.3-aarch64/
dr-xr-xr-x 8 root root 4096 12月 6 2022 aarch64-cortexa53-linux-gnu/
dr-xr-xr-x 2 root root 4096 12月 6 2022 bin/
dr-xr-xr-x 2 root root 4096 12月 6 2022 include/
dr-xr-xr-x 4 root root 4096 12月 6 2022 lib/
dr-xr-xr-x 3 root root 4096 12月 6 2022 libexec/
dr-xr-xr-x 5 root root 4096 12月 6 2022 share/
2.1.4 下载内核
下载内核源代码:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi6-v6.1.y kernel-rk3588
查看提交历史(由于--depth 1,只有一条记录);
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# git log
commit 4944602540b62f5aad139fe602a76cf7c3176128 (grafted, HEAD -> nanopi6-v6.1.y, origin/nanopi6-v6.1.y, origin/HEAD)
Author: Jon Lin <[email protected]>
Date: Mon Apr 28 10:12:42 2025 +0800
arm64: dts: rockchip: rk3588: Add clk PCLK_PHP_ROOT to pcie30phy
Configure pcie30phy phy_grf with clk PCLK_PHP_ROOT on.
Change-Id: Ie3f9fa78aaf7b1098450ade48e6f0c9f09725869
Signed-off-by: Jon Lin <[email protected]>
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3
注意:该仓库代码是forked from https://github.com/rockchip-linux/kernel。
我们来看一下nanopi6-v6.1.y 分支的代码是否已经移植了Panthor源码,我们切换到目录drivers/gpu/drm目录查看是否存在子目录panthor,可以看到是没有;
2.1.5 内核配置和设备树
NanoPC-T6开发板内核编译使用的板级配置是nanopi6_linux_defconfig,该文件位于arch/arm64/configs目录下;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# ll arch/arm64/configs/nanopi6_linux_defconfig
-rw-r--r-- 1 root root 46618 11月 8 17:03 arch/arm64/configs/nanopi6_linux_defconfig
由于配置文件有近2000行,具体可以查看:nanopi6_linux_defconfig。
该开发板使用的设备树是rk3588-nanopi6-rev01.dt,位于arch/arm64/boot/dts/rockchip目录下;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# ll arch/arm64/boot/dts/rockchip/rk3588-nanopi6-rev01.dts
-rw-r--r-- 1 root root 16387 11月 8 17:03 arch/arm64/boot/dts/rockchip/rk3588-nanopi6-rev01.dts
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# vim arch/arm64/boot/dts/rockchip/rk3588-nanopi6-rev01.dts
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd.
* (http://www.friendlyelec.com)
*/
/dts-v1/;
#include "rk3588.dtsi"
#include "rk3588-nanopi6-common.dtsi"
/ {
model = "FriendlyElec NanoPC-T6";
compatible = "friendlyelec,nanopc-t6", "rockchip,rk3588";
aliases {
ethernet0 = &r8125_u10;
ethernet1 = &r8125_u12;
};
......
可以看到设备树引用了rk3588.dtsi和rk3588-nanopi6-common.dtsi文件,具体可以查看:rk3588-nanopi6-rev01.dt。
而rk3588-nanopi6-common.dtsi文件又引入了如下文件;
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd.
* (http://www.friendlyelec.com)
*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/input/rk-input.h>
#include <dt-bindings/display/drm_mipi_dsi.h>
#include <dt-bindings/display/rockchip_vop.h>
#include <dt-bindings/sensor-dev.h>
#include <dt-bindings/usb/pd.h>
#include "rk3588s.dtsi"
#include "rk3588-android.dtsi"
#include "rk3588-rk806-single.dtsi"
/ {
model = "FriendlyElec boards based on Rockchip RK3588";
compatible = "friendlyelec,nanopi6",
"rockchip,rk3588";
......
这里我们主要记住这个文件rk3588-rk806-single.dtsi,后面会使用到。
2.2 Panthor源码移植
由于Panthor是基于Linux内核6.10版发布的,因此在将其移植到Linux 6.1时需要对drm驱动程序进行一些调整。
Panthor代码(https://github.com/jacobchencc/panthor-linux6.1)是从Panfrost freedesktop项目的Linux存储库panthor-next+rk3588分支获得的;
https://gitlab.freedesktop.org/panfrost/linux.git
这里我们在github找到了可以直接使用的源码;
root@ubuntu:/work/sambashare/rk3588/friendly# git clone https://github.com/jacobchencc/panthor-linux6.1.git
这里我们主要看一下panthor-linux6.1仓库的代码做了哪些变更;
root@ubuntu:/work/sambashare/rk3588/friendly# cd panthor-linux6.1
root@ubuntu:/work/sambashare/rk3588/friendly/panthor-linux6.1# git log --oneline --grep=panthor --name-only > panthor_commits.txt
root@ubuntu:/work/sambashare/rk3588/friendly/panthor-linux6.1# cat panthor_commits.txt
e0a632d panthor for develop-6.1
arch/arm64/boot/dts/rockchip/rk3588-rk806-dual.dtsi # 变更
arch/arm64/boot/dts/rockchip/rk3588s.dtsi # 变更
arch/arm64/configs/rk3588_linux.config # 变更
drivers/gpu/drm/Kconfig # 变更
drivers/gpu/drm/Makefile # 变更
drivers/gpu/drm/drm_debugfs.c # 变更
drivers/gpu/drm/drm_exec.c # 新增
drivers/gpu/drm/drm_gem.c # 变更
drivers/gpu/drm/drm_gpuvm.c # 新增
drivers/gpu/drm/panthor/Kconfig # 新增
drivers/gpu/drm/panthor/Makefile # 新增
drivers/gpu/drm/panthor/panthor_devfreq.c # 新增
drivers/gpu/drm/panthor/panthor_devfreq.h # 新增
drivers/gpu/drm/panthor/panthor_device.c # 新增
drivers/gpu/drm/panthor/panthor_device.h # 新增
drivers/gpu/drm/panthor/panthor_drv.c # 新增
drivers/gpu/drm/panthor/panthor_fw.c # 新增
drivers/gpu/drm/panthor/panthor_fw.h # 新增
drivers/gpu/drm/panthor/panthor_gem.c # 新增
drivers/gpu/drm/panthor/panthor_gem.h # 新增
drivers/gpu/drm/panthor/panthor_gpu.c # 新增
drivers/gpu/drm/panthor/panthor_gpu.h # 新增
drivers/gpu/drm/panthor/panthor_heap.c # 新增
drivers/gpu/drm/panthor/panthor_heap.h # 新增
drivers/gpu/drm/panthor/panthor_mmu.c # 新增
drivers/gpu/drm/panthor/panthor_mmu.h # 新增
drivers/gpu/drm/panthor/panthor_regs.h # 新增
drivers/gpu/drm/panthor/panthor_sched.c # 新增
drivers/gpu/drm/panthor/panthor_sched.h # 新增
include/drm/drm_debugfs.h # 变更
include/drm/drm_drv.h # 变更
include/drm/drm_exec.h # 新增
include/drm/drm_gem.h # 变更
include/drm/drm_gpuvm.h # 新增
include/uapi/drm/panthor_drm.h # 新增
2.2.1 rk3588s.dtsi文件修改
比较arch/arm64/boot/dts/rockchip/rk3588s.dtsi文件差异,这里我们只关注GPU差异部分;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff arch/arm64/boot/dts/rockchip/rk3588s.dtsi /work/sambashare/rk3588/friendly/panthor-linux6.1/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
......
由于比较出来差异较多,包含cluster1_opp_table、cluster2_opp_table、dmc_opp_table、gpu_opp_table、gpu: gpu@fb000000等节点;
为了简单方便我们直接覆盖源文件;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/arch/arm64/boot/dts/rockchip/rk3588s.dtsi arch/arm64/boot/dts/rockchip/
2.2.2 rk3588-rk806-single.dtsi文件修改
比较arch/arm64/boot/dts/rockchip/rk3588-rk806-dual.dtsi文件差异:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff arch/arm64/boot/dts/rockchip/rk3588-rk806-dual.dtsi /work/sambashare/rk3588/friendly/panthor-linux6.1/arch/arm64/boot/dts/rockchip/rk3588-rk806-dual.dtsi
152c152
< regulator-boot-on;
---
> regulator-always-on;
159c159
< regulator-off-in-suspend;
---
> regulator-always-on;
201c201
< regulator-boot-on;
---
> regulator-always-on;
208c208
< regulator-off-in-suspend;
---
> regulator-always-on;
535d534
< regulator-init-microvolt = <800000>;
548d546
< regulator-init-microvolt = <800000>;
561d558
< regulator-init-microvolt = <800000>;
586d582
< regulator-init-microvolt = <800000>;
600d595
< regulator-init-microvolt = <800000>;
625d619
< regulator-init-microvolt = <800000>;
这里涉及变更的节点就是vdd_gpu_s0、vdd_gpu_mem_s0;
vdd_gpu_s0: DCDC_REG1 {
regulator-always-on; # 从regulator-boot-on修改成这个
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <950000>;
regulator-ramp-delay = <12500>;
regulator-name = "vdd_gpu_s0";
regulator-enable-ramp-delay = <400>;
regulator-state-mem {
regulator-always-on; # 从regulator-off-in-suspend修改成这个
};
};
vdd_gpu_mem_s0: DCDC_REG5 {
regulator-always-on; # 从regulator-boot-on修改成这个
regulator-min-microvolt = <675000>;
regulator-max-microvolt = <950000>;
regulator-ramp-delay = <12500>;
regulator-enable-ramp-delay = <400>;
regulator-name = "vdd_gpu_mem_s0";
regulator-state-mem {
regulator-always-on; # 从regulator-off-in-suspend修改成这个
};
};
这里提一下第一处修改regulator-boot-on->regulator-always-on:
regulator-boot-on:只在系统启动时自动开启GPU电源,启动完成后可能会根据负载情况自动关闭;regulator-always-on:强制GPU电源始终开启,无论系统处于什么状态。
第二处修改regulator-off-in-suspend->regulator-always-on:
-
regulator-off-in-suspend:系统进入休眠(suspend)状态时关闭GPU电源; -
regulator-always-on:系统进入休眠状态时保持GPU电源开启。
对于我们使用的NanopC-T6开发板来说vdd_gpu_s0、vdd_gpu_mem_s0节点定义在文件rk3588-rk806-single.dtsi;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# vim arch/arm64/boot/dts/rockchip/rk3588-rk806-single.dtsi
.......
vdd_gpu_s0: vdd_gpu_mem_s0: DCDC_REG1 {
regulator-always-on;
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <950000>;
regulator-ramp-delay = <12500>;
regulator-name = "vdd_gpu_s0";
regulator-enable-ramp-delay = <400>;
regulator-state-mem {
regulator-always-on;
};
};
.......
这行代码定义了两个标签指向同一个节点,以用两个不同的名称(vdd_gpu_s0 和 vdd_gpu_mem_s0)来访问和配置同一个电源调节器(DCDC_REG1)。
2.2.3 nanopi6_linux_defconfig文件修改
比较arch/arm64/configs/rk3588_linux.config文件差异;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff arch/arm64/configs/rk3588_linux.config /work/sambashare/rk3588/friendly/panthor-linux6.1/arch/arm64/configs/rk3588_linux.config
3a4,6
> CONFIG_DRM_PANTHOR=y
> CONFIG_EXTRA_FIRMWARE="mali_csffw.bin"
> CONFIG_EXTRA_FIRMWARE_DIR="./firmware"
注意这里通过CONFIG_EXTRA_FIRMWARE_DIR指定了CSF固件的位置。
我们在arch/arm64/configs/nanopi6_linux_defconfig文件最后添加;
CONFIG_DRM_PANTHOR=y
CONFIG_EXTRA_FIRMWARE="mali_csffw.bin"
CONFIG_EXTRA_FIRMWARE_DIR="./firmware"
2.2.4 drivers/gpu/drm/Kconfig文件修改
比较drivers/gpu/drm/Kconfig文件差异:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff drivers/gpu/drm/Kconfig /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/Kconfig
417a418,419
> source "drivers/gpu/drm/panthor/Kconfig"
>
我们在drivers/gpu/drm/Kconfig文件添加;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# vim drivers/gpu/drm/Kconfig
source "drivers/gpu/drm/panthor/Kconfig"
2.2.5 drivers/gpu/drm/Makefile文件修改
比较drivers/gpu/drm/Makefile文件差异:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff drivers/gpu/drm/Makefile /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/Makefile
22c22,23
< drm_managed.o drm_vblank_work.o
---
> drm_managed.o drm_vblank_work.o \
> drm_exec.o drm_gpuvm.o
143a145
> obj-$(CONFIG_DRM_PANTHOR) += panthor/
我们在drivers/gpu/drm/Makefile文件添加;
# 22行替换成
drm_managed.o drm_vblank_work.o \
drm_exec.o drm_gpuvm.o
# 144行新增
obj-$(CONFIG_DRM_PANTHOR) += panthor/
2.2.6 drm_debugfs文件修改
比较drivers/gpu/drm/drm_debugfs文件差异:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff drivers/gpu/drm/drm_debugfs.c /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/drm_debugfs.c
162a163,200
> /**
> * drm_debugfs_gpuva_info - dump the given DRM GPU VA space
> * @m: pointer to the &seq_file to write
> * @gpuvm: the &drm_gpuvm representing the GPU VA space
> *
> * Dumps the GPU VA mappings of a given DRM GPU VA manager.
> *
> * For each DRM GPU VA space drivers should call this function from their
> * &drm_info_list's show callback.
> *
> * Returns: 0 on success, -ENODEV if the &gpuvm is not initialized
> */
> int drm_debugfs_gpuva_info(struct seq_file *m,
> struct drm_gpuvm *gpuvm)
> {
> struct drm_gpuva *va, *kva = &gpuvm->kernel_alloc_node;
>
> if (!gpuvm->name)
> return -ENODEV;
>
> seq_printf(m, "DRM GPU VA space (%s) [0x%016llx;0x%016llx]\n",
> gpuvm->name, gpuvm->mm_start, gpuvm->mm_start + gpuvm->mm_range);
> seq_printf(m, "Kernel reserved node [0x%016llx;0x%016llx]\n",
> kva->va.addr, kva->va.addr + kva->va.range);
> seq_puts(m, "\n");
> seq_puts(m, " VAs | start | range | end | object | object offset\n");
> seq_puts(m, "-------------------------------------------------------------------------------------------------------------\n");
> drm_gpuvm_for_each_va(va, gpuvm) {
> if (unlikely(va == kva))
> continue;
>
> seq_printf(m, " | 0x%016llx | 0x%016llx | 0x%016llx | 0x%016llx | 0x%016llx\n", va->va.addr, va->va.range, va->va.addr + va->va.range,
> (u64)(uintptr_t)va->gem.obj, va->gem.offset);
> }
>
> return 0;
> }
> EXPORT_SYMBOL(drm_debugfs_gpuva_info);
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff include/drm/drm_debugfs.h /work/sambashare/rk3588/friendly/panthor-linux6.1/include/drm/drm_debugfs.h
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff include/drm/drm_debugfs.h /work/sambashare/rk3588/friendly/panthor-linux6.1/include/drm/drm_debugfs.h
36a37,52
>
> #include <drm/drm_gpuvm.h>
>
> /**
> * DRM_DEBUGFS_GPUVA_INFO - &drm_info_list entry to dump a GPU VA space
> * @show: the &drm_info_list's show callback
> * @data: driver private data
> *
> * Drivers should use this macro to define a &drm_info_list entry to provide a
> * debugfs file for dumping the GPU VA space regions and mappings.
> *
> * For each DRM GPU VA space drivers should call drm_debugfs_gpuva_info() from
> * their @show callback.
> */
> #define DRM_DEBUGFS_GPUVA_INFO(show, data) {"gpuvas", show, DRIVER_GEM_GPUVA, data}
>
87a104,105
> int drm_debugfs_gpuva_info(struct seq_file *m,
> struct drm_gpuvm *gpuvm);
99,100d116
< #endif
<
105a122
> #endif
可以看到新增了drm_debugfs_gpuva_info函数,为了简单方便我们直接覆盖源文件;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/drm_debugfs.c drivers/gpu/drm/
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/include/drm/drm_debugfs.h include/drm/
2.2.7 drm_gem文件修改
比较drivers/gpu/drm/drm_gem文件差异:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff drivers/gpu/drm/drm_gem.c /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/drm_gem.c
166a167,169
> if (drm_core_check_feature(dev, DRIVER_GEM_GPUVA))
> drm_gem_gpuva_init(obj);
>
1050c1053
< vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP);
---
> vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP;
1185a1189,1208
>
> int drm_gem_vmap_unlocked(struct drm_gem_object *obj, struct iosys_map *map)
> {
> int ret;
>
> dma_resv_lock(obj->resv, NULL);
> ret = drm_gem_vmap(obj, map);
> dma_resv_unlock(obj->resv);
>
> return ret;
> }
> EXPORT_SYMBOL(drm_gem_vmap_unlocked);
>
> void drm_gem_vunmap_unlocked(struct drm_gem_object *obj, struct iosys_map *map)
> {
> dma_resv_lock(obj->resv, NULL);
> drm_gem_vunmap(obj, map);
> dma_resv_unlock(obj->resv);
> }
> EXPORT_SYMBOL(drm_gem_vunmap_unlocked);
可以看到都是新增的,为了简单方便我们直接覆盖源文件;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/drm_gem.c drivers/gpu/drm/
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/include/drm/drm_gem.h include/drm/
然后修改drivers/gpu/drm/drm_gem.c文件,第1053行:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# vim drivers/gpu/drm/drm_gem.c
vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP);
// vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP;
2.2.8 include/drm/drm_drv.h 文件修改
比较include/drm/drm_drv.h文件差异:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# diff include/drm/drm_drv.h /work/sambashare/rk3588/friendly/panthor-linux6.1/include/drm/drm_drv.h
96a97,119
> /**
> * @DRIVER_COMPUTE_ACCEL:
> *
> * Driver supports compute acceleration devices. This flag is mutually exclusive with
> * @DRIVER_RENDER and @DRIVER_MODESET. Devices that support both graphics and compute
> * acceleration should be handled by two drivers that are connected using auxiliary bus.
> */
> DRIVER_COMPUTE_ACCEL = BIT(7),
> /**
> * @DRIVER_GEM_GPUVA:
> *
> * Driver supports user defined GPU VA bindings for GEM objects.
> */
> DRIVER_GEM_GPUVA = BIT(8),
> /**
> * @DRIVER_CURSOR_HOTSPOT:
> *
> * Driver supports and requires cursor hotspot information in the
> * cursor plane (e.g. cursor plane has to actually track the mouse
> * cursor and the clients are required to set hotspot in order for
> * the cursor planes to work correctly).
> */
> DRIVER_CURSOR_HOTSPOT = BIT(9),
可以看到都是新增的,为了简单方便我们直接覆盖源文件;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/include/drm/drm_drv.h include/drm/
2.2.9 新增部分
新增的文件有:
drivers/gpu/drm/drm_exec.c、include/drm/drm_exec.h;drivers/gpu/drm/drm_gpuvm.c、include/drm/drm_gpuvm.h;include/uapi/drm/panthor_drm.h以及drivers/gpu/drm/panthor目录源码。
拷贝新增文件:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/drm_exec.c drivers/gpu/drm/
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/include/drm/drm_exec.h include/drm/
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/drm_gpuvm.c drivers/gpu/drm/
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/include/drm/drm_gpuvm.h include/drm/
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/include/uapi/drm/panthor_drm.h include/uapi/drm/
将Pathor源码部分合并进来:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp -r /work/sambashare/rk3588/friendly/panthor-linux6.1/drivers/gpu/drm/panthor ./drivers/gpu/drm/
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# ll drivers/gpu/drm/panthor/
-rw-r--r-- 1 root root 698 11月 8 18:26 Kconfig
-rw-r--r-- 1 root root 258 11月 8 18:26 Makefile
-rw-r--r-- 1 root root 7592 11月 8 18:26 panthor_devfreq.c
-rw-r--r-- 1 root root 579 11月 8 18:26 panthor_devfreq.h
-rw-r--r-- 1 root root 15155 11月 8 18:26 panthor_device.c
-rw-r--r-- 1 root root 12067 11月 8 18:26 panthor_device.h
-rw-r--r-- 1 root root 38936 11月 8 18:26 panthor_drv.c
-rw-r--r-- 1 root root 39248 11月 8 18:26 panthor_fw.c
-rw-r--r-- 1 root root 14358 11月 8 18:26 panthor_fw.h
-rw-r--r-- 1 root root 6344 11月 8 18:26 panthor_gem.c
-rw-r--r-- 1 root root 3356 11月 8 18:26 panthor_gem.h
-rw-r--r-- 1 root root 13804 11月 8 18:26 panthor_gpu.c
-rw-r--r-- 1 root root 1660 11月 8 18:26 panthor_gpu.h
-rw-r--r-- 1 root root 15538 11月 8 18:26 panthor_heap.c
-rw-r--r-- 1 root root 1122 11月 8 18:26 panthor_heap.h
-rw-r--r-- 1 root root 74877 11月 8 18:26 panthor_mmu.c
-rw-r--r-- 1 root root 3785 11月 8 18:26 panthor_mmu.h
-rw-r--r-- 1 root root 8316 11月 8 18:26 panthor_regs.h
-rw-r--r-- 1 root root 99414 11月 8 18:26 panthor_sched.c
-rw-r--r-- 1 root root 1848 11月 8 18:26 panthor_sched.h
修改文件drivers/gpu/drm/panthor/panthor_device.c第398行;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# vim drivers/gpu/drm/panthor/panthor_device.c
vm_flags_set(vma, VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_NORESERVE | VM_DONTDUMP | VM_PFNMAP);
// vma->vm_flags |=
// VM_IO | VM_DONTCOPY | VM_DONTEXPAND |
// VM_NORESERVE | VM_DONTDUMP | VM_PFNMAP;
2.3 CSF固件移植
下载Mali-G610 firmware镜像文件mali_csffw.bin,Mali-G610 CSF固件从以下存储库获取:
root@ubuntu:/work/sambashare/rk3588/friendly# git clone https://mirrors.tuna.tsinghua.edu.cn/git/linux-firmware.git
root@ubuntu:/work/sambashare/rk3588/friendly# cd linux-firmware
root@ubuntu:/work/sambashare/rk3588/friendly/linux-firmware# ll arm/mali/
drwxr-xr-x 2 root root 4096 11月 5 23:16 arch10.10/
drwxr-xr-x 2 root root 4096 11月 5 23:16 arch10.12/
drwxr-xr-x 2 root root 4096 11月 5 23:16 arch10.8/
drwxr-xr-x 2 root root 4096 11月 5 23:16 arch11.8/
drwxr-xr-x 2 root root 4096 11月 5 23:16 arch12.8/
drwxr-xr-x 2 root root 4096 11月 5 23:16 arch13.8/
由于ARM Mali G610属于Valhall (v10),因此我们这里使用arch10.8( Mali Arch 10.8 );
root@ubuntu:/work/sambashare/rk3588/friendly/linux-firmware# ll arm/mali/arch10.8/
-rw-r--r-- 1 root root 282624 11月 5 23:16 mali_csffw.bin
mali_csffw.bin是Mali GPU的微控制器固件,用于GPU调度和命令处理。
拷贝到linux-6.1内核源码以下位置后,编译内核镜像。
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# mkdir ./kernel-rk3588/firmware
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# cp ../linux-firmware/arm/mali/arch10.8/mali_csffw.bin ./kernel-rk3588/firmware/
当然我们也可以直接使用panthor-linux6.1库中的固件;
root@ubuntu:/work/sambashare/rk3588/friendly/panthor-linux6.1# ll firmware/
-rwxr-xr-x 1 root root 274432 11月 5 22:20 mali_csffw.bin
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# cp /work/sambashare/rk3588/friendly/panthor-linux6.1/firmware/mali_csffw.bin ./kernel-rk3588/firmware/
2.4 编译内核
执行编译内核命令,编译完成后会自动更新ubuntu-noble-desktop-arm64目录下的相关镜像文件,包括文件系统中的内核模块 (rootfs.img会被解包并重新打包,即更新/lib/modules下的驱动模块);
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh ubuntu-noble-desktop-arm64
kernel src: /work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588
using official logo.
using official kernel logo.
CLEAN arch/arm64/boot
CLEAN arch/arm64/crypto
CLEAN arch/arm64/kernel/pi
CLEAN arch/arm64/kernel/vdso
CLEAN arch/arm64/kernel
CLEAN certs
CLEAN drivers/base/firmware_loader/builtin
CLEAN drivers/misc/lkdtm
CLEAN drivers/scsi
CLEAN drivers/tty/vt
CLEAN fs/unicode
CLEAN init
CLEAN kernel
CLEAN lib/raid6
CLEAN lib
CLEAN net/wireless
CLEAN security/apparmor
CLEAN security/selinux
CLEAN usr
CLEAN .
CLEAN kernel.img resource.img vmlinux.symvers modules.builtin modules.builtin.modinfo .vmlinux.objs .vmlinux.export.c
CLEAN scripts/basic
CLEAN scripts/dtc
CLEAN scripts/genksyms
CLEAN scripts/kconfig
CLEAN scripts/mod
CLEAN scripts/selinux/genheaders
CLEAN scripts/selinux/mdp
CLEAN scripts
CLEAN include/config include/generated arch/arm64/include/generated .config .version Module.symvers
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
Using .config as base
Merging ./arch/arm64/configs/kvm.config
Value of CONFIG_KEXEC is redefined by fragment ./arch/arm64/configs/kvm.config:
Previous value: # CONFIG_KEXEC is not set
New value: CONFIG_KEXEC=y
Value of CONFIG_KEXEC_FILE is redefined by fragment ./arch/arm64/configs/kvm.config:
Previous value: # CONFIG_KEXEC_FILE is not set
New value: CONFIG_KEXEC_FILE=y
......
#
# merged configuration written to .config (needs make)
#
#
# configuration written to .config
#
SYNC include/config/auto.conf.cmd
HOSTCC arch/arm64/tools/gen-hyprel
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
WRAP arch/arm64/include/generated/uapi/asm/errno.h
WRAP arch/arm64/include/generated/uapi/asm/ioctl.h
WRAP arch/arm64/include/generated/uapi/asm/ioctls.h
WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h
WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h
WRAP arch/arm64/include/generated/uapi/asm/poll.h
WRAP arch/arm64/include/generated/uapi/asm/resource.h
WRAP arch/arm64/include/generated/uapi/asm/sembuf.h
WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h
WRAP arch/arm64/include/generated/uapi/asm/siginfo.h
WRAP arch/arm64/include/generated/uapi/asm/socket.h
WRAP arch/arm64/include/generated/uapi/asm/sockios.h
......
Image: resource.img (with rk3*-nanopi*-rev*.dtb logo.bmp logo_kernel.bmp) is ready
MODPOST vmlinux.symvers
Image: kernel.img is ready
CALL scripts/checksyscalls.sh
CHK kernel/kheaders_data.tar.xz
GEN vmlinux.symvers
INSTALL /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/poly1305-neon.ko
STRIP /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/poly1305-neon.ko
INSTALL /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/sha3-ce.ko
STRIP /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/sha3-ce.ko
INSTALL /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/sm3-ce.ko
STRIP /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/sm3-ce.ko
INSTALL /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/sm4-ce-cipher.ko
STRIP /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/sm4-ce-cipher.ko
INSTALL /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/sm4-neon.ko
STRIP /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/kernel/arch/arm64/crypto/sm4-neon.ko
......
********************************************************************************
* Building module - rtl8812au.ko for FriendlyARM boards
*
* Kernel TOP-Dir: /work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588
*
* Copyright 2020 FriendlyELEC (http://www.friendlyarm.com/)
********************************************************************************
#make -C /work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588 M=/work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au clean
cd hal ; rm -fr */*/*/*.mod.c */*/*/*.mod */*/*/*.o */*/*/.*.cmd */*/*/*.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko *.o.d
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions *.der *.priv
********************************************************************************
* Building module - rtl8812au.ko for FriendlyARM boards
*
* Kernel TOP-Dir: /work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588
*
* Copyright 2020 FriendlyELEC (http://www.friendlyarm.com/)
********************************************************************************
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C /work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588 M=/work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au modules
make[1]: 进入目录“/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588”
CC [M] /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au/core/rtw_cmd.o
CC [M] /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au/core/rtw_security.o
CC [M] /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au/core/rtw_debug.o
CC [M] /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au/core/rtw_io.o
CC [M] /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au/core/rtw_ioctl_query.o
......
CC [M] /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au/rtl8812au.mod.o
LD [M] /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/rtl8812au/rtl8812au.ko
make[1]: 离开目录“/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588”
'rtl8812au.ko' -> '/work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules/lib/modules/6.1.118/rtl8812au.ko'
depmod /work/sambashare/rk3588/friendly/sd-fuse_rk3588/out/output_rk3588_kmodules 6.1.118 ...
building kernel ok.
ubuntu-noble-desktop-arm64 found.
copying kernel module and firmware to rootfs ...
mke2fs 1.45.4 (23-Sep-2019)
Creating regular file ubuntu-noble-desktop-arm64/rootfs.img
Creating filesystem with 1212416 4k blocks and 114848 inodes
Filesystem UUID: abc8d43c-dedd-4625-9693-bf1141c33f06
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Copying files into the device: done
Writing superblocks and filesystem accounting information: done
'/work/sambashare/rk3588/friendly/sd-fuse_rk3588/prebuilt/parameter.template' -> 'ubuntu-noble-desktop-arm64/parameter.txt'
generating ubuntu-noble-desktop-arm64/parameter.txt done.
0
updating kernel ok.
注意:如果不想每次编译都执行清理工作,修改build-kernel.sh文件;
# true ${SKIP_DISTCLEAN:=0}
true ${SKIP_DISTCLEAN:=1}
2.4.1 异常处理
在编译内核的过程中,会编译第三方驱动,其中在编译rtl8822bu时候出现了错误,由于我们的开发板使用的网卡有:
- 有线网卡是
rtl8125bg:- 类型:
2.5 Gigabit以太网控制器; - 接口:
RJ45网线接口; - 速度:
10/100/1000/2500 Mbps; - 用途: 有线网络连接;
- 类型:
- 有线网卡是
rtl8822ce:通过NanoPC-T6的M.2接口连接;- 类型:
802.11ac Wave2 WiFi + Bluetooth 5.0组合模块; - 接口:
PCI Express; WiFi标准:802.11a/b/g/n/ac;- 速度: 最高
867 Mbps (5GHz) / 300 Mbps (2.4GHz); - 蓝牙:
Bluetooth 5.0 - 频段:
2.4GHz + 5GHz双频;
- 类型:
因此并不会使用到rtl8822bu驱动,我们修改build-kernel.sh:
#KERNEL_3RD_DRIVERS+=("https://github.com/friendlyarm/rtl8851bu")
#KERNEL_3RD_DRIVER_BRANCHES+=("nanopi-r2")
#KERNEL_3RD_DRIVER_NAME+=("rtl8851bu")
2.4.2 编译输出
编译完成后会在./out路径下生成若干文件;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ll out/
drwxr-xr-x 7 root root 4096 11月 10 20:49 cryptodev-linux/
-rw-r--r-- 1 root root 47 11月 8 20:07 .gitignore
drwxr-xr-x 4 root root 4096 11月 8 21:00 nft-fullcone/
drwxr-xr-x 3 root root 4096 11月 10 20:49 output_rk3588_kmodules/
drwxr-xr-x 3 root root 4096 11月 10 20:49 r8125/
drwxr-xr-x 21 root root 4096 11月 10 20:54 rootfs_new/
drwxr-xr-x 8 root root 4096 11月 10 20:52 rtl8812au/
drwxr-xr-x 9 root root 4096 11月 10 20:50 rtl8821CU/
drwxr-xr-x 8 root root 4096 11月 10 20:51 rtl8822bu/
drwxr-xr-x 8 root root 4096 11月 10 20:52 rtl8822ce/
drwxr-xr-x 8 root root 4096 11月 10 20:51 rtl8822cs/
drwxr-xr-x 8 root root 4096 11月 8 22:38 rtl8851bu/
drwxr-xr-x 6 root root 20480 11月 10 20:50 rtw88/
其中:
cryptodev-linux、nft-fullcone、r8125、rtl8812au、rtl8821CU等:为三方驱动源码;output_rk3588_kmodules:为内核驱动模块;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ls out/output_rk3588_kmodules/lib/modules/6.1.118/
cryptodev.ko modules.dep r8125.ko rtw_8723de.ko rtw_8814a.ko rtw_8822be.ko rtw_88xxa.ko
kernel modules.dep.bin rtl8812au.ko rtw_8723d.ko rtw_8814au.ko rtw_8822b.ko rtw_core.ko
modules.alias modules.devname rtl8821CU.ko rtw_8723ds.ko rtw_8821a.ko rtw_8822bs.ko rtw_pci.ko
modules.alias.bin modules.order rtl8822bu.ko rtw_8723du.ko rtw_8821au.ko rtw_8822bu.ko rtw_sdio.ko
modules.builtin modules.softdep rtl8822ce.ko rtw_8723x.ko rtw_8821ce.ko rtw_8822ce.ko rtw_usb.ko
modules.builtin.alias.bin modules.symbols rtl8822cs.ko rtw_8812a.ko rtw_8821c.ko rtw_8822c.ko
modules.builtin.bin modules.symbols.bin rtw_8703b.ko rtw_8812au.ko rtw_8821cs.ko rtw_8822cs.ko
modules.builtin.modinfo nft_fullcone.ko rtw_8723cs.ko rtw_8814ae.ko rtw_8821cu.ko rtw_8822cu.ko
rootfs_new:新的根文件系统的源码;
此外ubuntu-noble-desktop-arm64目录下的内核镜像和根文件系统被更新了;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ll ubuntu-noble-desktop-arm64
-rw-r--r-- 1 root root 7945164 8月 10 23:04 boot.img
-rw-r--r-- 1 root root 1424 5月 28 2023 dtbo.img
-rw-r--r-- 1 root root 331776 1月 9 2025 idbloader.img
-rw-r--r-- 1 root root 73 10月 10 15:15 info.conf
-rw-r--r-- 1 root root 36177940 11月 10 20:52 kernel.img # 更新了
-rw-r--r-- 1 root root 487872 1月 9 2025 MiniLoaderAll.bin
-rw-r--r-- 1 root root 49152 5月 28 2023 misc.img
-rw-r--r-- 1 root root 470 11月 10 20:58 parameter.txt # 更新了
-rw-r--r-- 1 root root 8283136 11月 10 20:52 resource.img # 更新了
-rw-r--r-- 1 root root 4782859288 11月 10 20:58 rootfs.img # 更新了
-rw-r--r-- 1 root root 4194304 7月 21 14:38 uboot.img
-rw-r--r-- 1 root root 159868 10月 10 15:15 userdata.img
2.4.3 系统分区介绍
parameter.txt保存着分区信息:
FIRMWARE_VER: 12.0
MACHINE_MODEL: RK3588
MACHINE_ID: 007
MANUFACTURER: RK3588
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: NanoPi6
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00002000@0x00008000(dtbo),0x00008000@0x0000a000(resource),0x00014000@0x00012000(kernel),0x00010000@0x00026000(boot),0x00010000@0x00036000(recovery),0x00940000@0x00046000(rootfs),-@0x00986000(userdata:grow)
解析信息如下:
| Number | Name | 镜像文件 | Start (sector) | End (sector) | Size |
|---|---|---|---|---|---|
| 1 | uboot | uboot.img | 0x4000(16384) | 0x5FFF | 4M |
| 2 | misc | misc.img | 0x6000(24576) | 0x7FFF | 4M |
| 3 | dtbo | dtbo.img | 0x8000(32768) | 0x9FFF | 4M |
| 4 | resource | resource.img | 0xa000(40960) | 0x11FFF | 16MB |
| 5 | kernel | kernel.img | 0x12000(73728) | 0x25FFF | 40MB |
| 6 | boot | boot.img | 0x26000(155648) | 0x35FFF | 32MB |
| 7 | recovery | recovery.img | 0x36000(221184) | 0x45FFF | 32MB |
| 8 | rootfs | rootfs.img | 0x46000(286720) | 0x985FFF | 4.875GB |
| 9 | userdata | userdata.img | 0x986000(9986048) | - |
其中:
uboot分区:供uboot编译出来的uboot.img;misc分区:引导参数分区,供misc.img,给recovery使用;uboot会根据misc分区存放的字段来判断将要引导的系统是normal系统还是recovery系统。更多可以参考《misc分区介绍》;
dtbo:供kernel编译出来的dtbo.img,dtbo.img镜像中存放了/chosen节点bootargs_ext属性信息,更多可以参考《android_fdt_overlay_apply》;resource:资源分区,由设备树、图片资源文件组成,不包含内核;boot:供kernel编译出来的boot.img(可能是FIT uImage镜像格式,也有可能是Android bootimg镜像格式),实际上烧录的boot.img并不是FIT uIamge,因此uboot启动并不会使用到这个文件,具体可以参考《启动内核》;kernel:供kernel编译出来的kernel.img(由tools/mkkrnlimg工具编译内核镜像Image文件得到),uboot启动使用的是这个;recovery分区:供recovery编译出的recovery.img(kernel + dtb + ramdisk),更多可以参考《Rockchip RK3588- 从零开始制作recovery》;rootfs分区:供buildroot、debian或yocto编出来的rootfs.img;userdata分区:供APP临时生成文件或给最终用户使用,挂载在/userdata目录下。
2.4.4 生成统一固件
将ubuntu-noble-desktop-arm64目录下的镜像文件重新打包成SD卡固件:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ./mk-sd-image.sh ubuntu-noble-desktop-arm64
Creating RAW image: out/rk3588-sd-ubuntu-noble-desktop-6.1-arm64-20251110.img (7800 MB)
---------------------------------
记录了0+0 的读入
记录了0+0 的写出
0字节已复制,0.000128123 s,0.0 kB/s
----------------------------------------------------------------
[out/rk3588-sd-ubuntu-noble-desktop-6.1-arm64-20251110.img] capacity = 7438MB, 7799999488 bytes
current out/rk3588-sd-ubuntu-noble-desktop-6.1-arm64-20251110.img partition:
----------------------------------------------------------------
parsing ./ubuntu-noble-desktop-arm64/parameter.txt:
create new GPT 9:
----------------------------------------------------------------
copy from: ./ubuntu-noble-desktop-arm64 to out/rk3588-sd-ubuntu-noble-desktop-6.1-arm64-20251110.img
[RAW. 0]: 324 KB | ./ubuntu-noble-desktop-arm64/idbloader.img > 100% : done.
[RAW. 1]: 4096 KB | ./ubuntu-noble-desktop-arm64/uboot.img > 100% : done.
[RAW. 2]: 48 KB | ./ubuntu-noble-desktop-arm64/misc.img > 100% : done.
[RAW. 3]: 1 KB | ./ubuntu-noble-desktop-arm64/dtbo.img > 100% : done.
[RAW. 4]: 8089 KB | ./ubuntu-noble-desktop-arm64/resource.img > 100% : done.
[RAW. 5]: 35330 KB | ./ubuntu-noble-desktop-arm64/kernel.img > 100% : done.
[RAW. 6]: 7758 KB | ./ubuntu-noble-desktop-arm64/boot.img > 100% : done.
[RAW. 8]: 4670761 KB | ./ubuntu-noble-desktop-arm64/rootfs.img > 100% : done.
[RAW. 9]: 156 KB | ./ubuntu-noble-desktop-arm64/userdata.img > 100% : done.
----------------------------------------------------------------
---------------------------------
RAW image successfully created (21:03:55).
-rw-r--r-- 1 root root 7799999488 11月 10 21:03 out/rk3588-sd-ubuntu-noble-desktop-6.1-arm64-20251110.img
Tip: You can compress it to save disk space.
该sh脚本内部调用了Rockchip官方提供的打包工具生成的统一固件,由于打包工具并不开源,所以无法研究源码。
不过我们大致可以猜测出应该就是做了一个镜像文件,然后按照parameter.txt进行划分分区,并将各个分区镜像依次烧录进去。
命令完成后,生成的统一固件位于out目录,可以用dd命令制作SD启动卡;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# ll out/rk3588-sd-ubuntu-noble-desktop-6.1-arm64-20251110.img
-rw-r--r-- 1 root root 7799999488 11月 10 21:03 out/rk3588-sd-ubuntu-noble-desktop-6.1-arm64-20251110.img
三、NanoPC-T6烧录测试
这里我们使用upgrade_tool工具进行烧录,将开发板连接上电源,并且通过HDMI接口连接到显示设备,连接Type-C数据线到PC。
3.1 烧写分区镜像
3.1.1 硬件准备
按住Mask键再长按Power键开机(保持按下Mask键5秒以上),将强制进入MASKROM模式;
进入MASKROM模式后,运行upgrade_tool后可以看到连接设备中有个Maskrom的提示:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588# sudo upgrade_tool LD
List of rockusb connected(1)
DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=11 Mode=Maskrom SerialNo=rockchip
注意:烧录工具upgrade_tool的安装参考:《upgrade_tool工具烧录》。
3.1.2 根文件系统调整
采用upgrade_tool方式方式烧录各个分区,在完成烧录之后,测试发现uboot、linux内核均能正常加载,但是挂载根文件系统的时候却失败了,这是因为官方提供的rootfs.img采用的sparse ext4 image,是无法直接烧写运行的;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# file rootfs.img
rootfs.img: Android sparse image, version: 1.0, Total of 1212416 4096-byte output blocks in 85 input chunks.
需要使用simg2img将simg (sparse ext4 image)还原为raw ext4 image;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# cp rootfs.img rootfs.simg
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# simg2img rootfs.simg rootfs.ext4
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# rm -rf rootfs.simg
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# file rootfs.ext4
rootfs.ext4: Linux rev 1.0 ext4 filesystem data, UUID=abc8d43c-dedd-4625-9693-bf1141c33f06, volume name "rootfs" (extents) (64bit) (large files) (huge files)
3.1.3 开始烧录
我们在开发过程中,经常会对内核、根文件系统、uboot进行修改,在这种情况下我们只需要替换我们修改的镜像文件即可。在ubuntu宿主机烧写分区镜像;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool ul MiniLoaderAll.bin -noreset
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -p parameter.txt
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -uboot uboot.img
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -misc misc.img
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -dtbo dtbo.img
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -resource resource.img
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -k kernel.img
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -boot boot.img
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -rootfs rootfs.ext4
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool di -userdata userdata.img
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool RD
对于MASKROM模式,其中前两步和最后一步是必须的,中间的步骤根据实际情况进行调整。如果烧录失败,可以重复上电->烧录的过程试试。
由于SoC进入到MASKROM模式后,目标板子会运行Rockusb驱动程序。在MASKROM模式下,烧写镜像需要使用到DDR,因此需要下载固件进行DDR的初始化,所以升级之前第一步要做的就是执行sudo upgrade_tool ul MiniLoaderAll.bin。
注意:如果在测试的时候发现,烧录完MiniLoaderAll.bin之后,系统自动重启了,是由于其命令后没有追加-noreset。
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64# sudo upgrade_tool ul MiniLoaderAll.bin -noreset
Loading loader...
Support Type:RK3588 Loader ver:1.0b Loader Time:2025-01-02 16:53:46
Start to upgrade loader...
Download Boot Start
Download Boot Success
Wait For Maskrom Start
Wait For Maskrom Success
Test Device Start
Test Device Success
Check Chip Start
Check Chip Success
Get FlashInfo Start
Get FlashInfo Success
Prepare IDB Start
Prepare IDB Success
Download IDB Start
Download IDB Success
Upgrade loader ok.
3.2 系统启动
3.2.1 串口连接
使用准备好的USB转串口适配器和连接线(需另购),连接开发板,其使用的是RK3588的UART2;
| 引脚 | 开发板接口 | USB转串口 |
|---|---|---|
| 1 | GND | GND(黑色) |
| 2 | UART2_TX_M0_DEBUG | RX(白色) |
| 3 | UART2_RX_M0_DEBUG | TX(绿色) |
3.2.2 启动日志
开发板上电启动完整日志:
点击查看代码
DDR 9fa84341ce typ 24/09/06-09:51:11,fwver: v1.18
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
ch0 ttot18
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
ch1 ttot18
channel[1] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
ch2 ttot16
channel[2] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
ch3 ttot16
channel[3] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
Manufacturer ID:0x1
DQS rds:l0,l0
CH0 RX Vref:27.5%, TX Vref:21.8%,22.8%
DQ rds:h1 h4 l0 h2 h5 h1 h1 h2, l1 h1 h1 h1 l0 h1 h2 l2
DQS rds:l0,l0
CH1 RX Vref:26.3%, TX Vref:22.8%,21.8%
DQ rds:l1 l0 l0 l0 h1 h7 l0 h1, h1 l0 l1 l1 h4 h3 h3 h1
DQS rds:l1,h1
CH2 RX Vref:28.8%, TX Vref:21.8%,21.8%
DQ rds:l0 h2 h4 h1 h3 l0 h1 h2, h3 l0 l0 h5 l0 h6 h3 l1
DQS rds:h2,h1
CH3 RX Vref:27.9%, TX Vref:20.8%,22.8%
DQ rds:h1 l0 h1 h2 h3 h1 l1 h2, l0 h3 h1 h1 h5 l0 h1 h2
stride=0x2, ddr_config=0x4
hash ch_mask0-1 0x20 0x40, bank_mask0-3 0xa00 0x1400 0x2800 0x0, rank_mask0 0x401000
change to F1: 528MHz
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
change to F2: 1068MHz
ch0 ttot14
ch1 ttot14
ch2 ttot12
ch3 ttot12
change to F3: 1560MHz
ch0 ttot16
ch1 ttot16
ch2 ttot14
ch3 ttot14
change to F0: 2112MHz
ch0 ttot18
ch1 ttot18
ch2 ttot18
ch3 ttot18
out
U-Boot SPL board init
U-Boot SPL 2017.09-ge4e124926e-230922 #lxh (Sep 25 2023 - 10:58:38), fwver: v1.13
Trying to boot from MMC2
MMC: no card present
mmc_init: -123, time 0
spl: mmc init failed with error: -123
Trying to boot from MMC1
SPL: A/B-slot: _a, successful: 0, tries-remain: 7
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 (gzip @0x00240000) ... sha256(921934f9ac...) + sha256(acb6e4b004...) + OK
## Checking uboot 0x00200000 (gzip @0x00400000) ... sha256(99a31c0983...) + sha256(a110dfc4d1...) + OK
## Checking fdt 0x0034f4a8 ... sha256(9ff849197b...) + OK
## Checking atf-2 0xff100000 ... sha256(11bdd78b17...) + OK
## Checking atf-3 0x000f0000 ... sha256(b2af21b504...) + OK
## Checking optee 0x08400000 (gzip @0x08600000) ... sha256(ea5d3492ad...) + sha256(3e0a1f56ed...) + OK
Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00040000)
Total: 489.26/685.410 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-893-g1653f2a08:derrick.huang, fwver: v1.49
NOTICE: BL31: Built : 14:27:47, Mar 3 2025
INFO: spec: 0x1
INFO: code: 0x88
INFO: ext 32k is not valid
INFO: ddr: stride-en 4CH
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0
INFO: l3 cache partition cfg-0
INFO: system boots from cpu-hwid-0
INFO: enable memory repair
INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
I/TC:
I/TC: OP-TEE version: 3.13.0-898-g57604957e #hisping.lin (gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16))) #2 Fri Nov 15 16:04:27 CST 2024 aarch64, fwver: v1.19
I/TC: OP-TEE memory: TEEOS 0x200000 TA 0xc00000 SHM 0x200000
I/TC: Primary CPU initializing
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2017.09-g44f011c4ba9-250620 #fa (Jul 17 2025 - 15:25:44 +0800)
Board: NanoPi R6S
PreSerial: 2, raw, 0xfeb50000
DRAM: 16 GiB
Sysmem: init
Relocation Offset: ed90e000
Relocation fdt: eb7fa180 - eb7fecd8
CR: M/C/I
Using default environment
optee api revision: 2.0
mmc@fe2c0000: 1, mmc@fe2e0000: 0
Bootdev(atags): mmc 0
MMC0: HS400 Enhanced Strobe, 200Mhz
PartType: EFI
TEEC: Waring: Could not find security partition
DM: v2
boot mode: normal
RESC: 'resource', blk@0x0000a000
lib/avb/libavb_user/avb_ops_user.c: trusty_read_lock_state failed
Error determining whether device is unlocked.
Device is: UNLOCKED
DTB: rk3588-nanopi6-rev01.dtb (279535)
HASH(c): OK
ANDROID: fdt overlay OK
usb dr_mode not found
usb dr_mode not found
I2c0 speed: 100000Hz
vsel-gpios- not found!
en-gpios- not found!
vdd_cpu_big0_s0 675000 uV
vsel-gpios- not found!
en-gpios- not found!
vdd_cpu_big1_s0 675000 uV
I2c2 speed: 100000Hz
vsel-gpios- not found!
en-gpios- not found!
vdd_npu_s0 837500 uV
spi2: RK806: 2
ON=0x80, OFF=0x04
vdd_gpu_s0 750000 uV
vdd_cpu_lit_s0 init 800000 uV
vdd_log_s0 750000 uV
vdd_vdenc_s0 init 750000 uV
vdd_ddr_s0 850000 uV
use 0xede00000 as drm logo base memory
get vp0 plane mask:0x7, primary id:0, cursor id:2, from dts
get vp1 plane mask:0x148, primary id:6, cursor id:3, from dts
get vp2 plane mask:0x280, primary id:9, cursor id:7, from dts
Could not find baseparameter partition
I2c6 speed: 200000Hz
Rockchip UBOOT DRM driver version: v1.0.1
vp0 have layer nr:3[Cluster0 Cluster1 Esmart0 ], primary plane: Cluster0
vp1 have layer nr:3[Esmart1 Cluster2 Esmart2 ], primary plane: Cluster2
vp2 have layer nr:2[Cluster3 Esmart3 ], primary plane: Esmart3
vp3 have layer nr:0[], primary plane: INVALID
I2c4 speed: 100000Hz
dsi@fde30000 disconnected
Monitor has basic audio support
Could not find baseparameter partition
color_format:1
hdmi_select_link_config use tmds mode
mode:1920x1080 bus_format:0x2025
hdmi@fde80000: detailed mode clock 148500 kHz, flags[5]
H: 1920 2008 2052 2200
V: 1080 1082 1087 1125
bus_format: 2025
VOP update mode to: 1920x1080p60, type: HDMI0 for VP0
dclk:148500000,if_pixclk_div;2,if_dclk_div:4
hdptx_ropll_cmn_config bus_width:16a8c8 rate:1485000
hdptx phy pll locked!
VP0 set crtc_clock to 1485KHz
VOP VP0 enable Cluster0[800x480->800x480@560x300] fmt[0] addr[0xede00000]
Non-CEA mode used in HDMI
mtmdsclock:148500000
hdptx_ropll_cmn_config bus_width:16a8c8 rate:1485000
hdptx phy pll locked!
dw_hdmi_setup HDMI mode
don't use dsc mode
dw hdmi qp use tmds mode
bus_width:0x16a8c8,bit_rate:1485000
hdptx phy lane locked!
CLK: (sync kernel. arm: enter 1008000 KHz, init 1008000 KHz, kernel 0N/A)
b0pll 24000 KHz
b1pll 24000 KHz
lpll 24000 KHz
v0pll 24000 KHz
aupll 786431 KHz
cpll 1500000 KHz
gpll 1188000 KHz
npll 850000 KHz
ppll 1100000 KHz
aclk_center_root 702000 KHz
pclk_center_root 100000 KHz
hclk_center_root 396000 KHz
aclk_center_low_root 500000 KHz
aclk_top_root 750000 KHz
pclk_top_root 100000 KHz
aclk_low_top_root 396000 KHz
vdd_usbc 12520 mV
Net: No ethernet found.
Hit key to stop autoboot('CTRL+C'): 0
## Booting FIT Image FIT: No fit blob
FIT: No FIT image
ANDROID: reboot reason: "(none)"
Not AVB images, AVB skip
No valid android hdr
Android image load failed
Android boot failed, error -1.
## Booting Rockchip Format Image
fdt @ 0x08300000 (0x0004468f)
kernel @ 0x00400000 (0x02280808)
ramdisk @ 0x0a200000 (0x00793bc0)
Fdt Ramdisk skip relocation
## Flattened Device Tree blob at 0x08300000
Booting using the fdt blob at 0x08300000
Using Device Tree in place at 0000000008300000, end 000000000834768e
## reserved-memory:
cma: addr=10000000 size=8000000
drm-logo@0: addr=ede00000 size=2ee000
vendor-storage-rm@00000000: addr=ebbbe000 size=10000
ramoops@110000: addr=110000 size=e0000
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x09400000 - 0xf0000000 (size: 0xe6c00000)
Adding bank: 0x100000000 - 0x3fc000000 (size: 0x2fc000000)
Adding bank: 0x3fc500000 - 0x3fff00000 (size: 0x03a00000)
Adding bank: 0x4f0000000 - 0x500000000 (size: 0x10000000)
Total: 1659.954/1715.646 ms
Starting kernel ...
[ 1.725809] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[ 1.725834] Linux version 6.1.118 (root@ubuntu) (aarch64-linux-gnu-gcc (ctng-1.25.0-119g-FA) 11.3.0, GNU ld (GNU Binutils) 2.38) #3 SMP Mon Nov 10 20:38:41 CST 2025
[ 1.728567] random: crng init done
[ 1.733134] Machine model: FriendlyElec NanoPC-T6
[ 1.740160] earlycon: uart8250 at MMIO32 0x00000000feb50000 (options '')
[ 1.743382] printk: bootconsole [uart8250] enabled
[ 1.746052] OF: fdt: Reserved memory: failed to reserve memory for node 'drm-cubic-lut@0': base 0x0000000000000000, size 0 MiB
[ 1.747128] OF: reserved mem: 0x0000000000110000..0x00000000001effff (896 KiB) map non-reusable ramoops@110000
[ 1.748047] Reserved memory: created CMA memory pool at 0x0000000010000000, size 128 MiB
[ 1.748775] OF: reserved mem: initialized node cma, compatible id shared-dma-pool
[ 1.749449] OF: reserved mem: 0x0000000010000000..0x0000000017ffffff (131072 KiB) map reusable cma
[ 1.750266] OF: reserved mem: 0x00000000ebbbe000..0x00000000ebbcdfff (64 KiB) map non-reusable vendor-storage-rm@00000000
[ 1.751255] OF: reserved mem: 0x00000000ede00000..0x00000000ee0edfff (3000 KiB) map non-reusable drm-logo@0
[ 1.966338] Zone ranges:
[ 1.966581] DMA [mem 0x0000000000200000-0x00000000ffffffff]
[ 1.967145] DMA32 empty
[ 1.967410] Normal [mem 0x0000000100000000-0x00000004ffffffff]
[ 1.967969] Movable zone start for each node
[ 1.968352] Early memory node ranges
[ 1.968675] node 0: [mem 0x0000000000200000-0x00000000083fffff]
[ 1.969242] node 0: [mem 0x0000000009400000-0x00000000efffffff]
[ 1.969808] node 0: [mem 0x0000000100000000-0x00000003fbffffff]
[ 1.970377] node 0: [mem 0x00000003fc500000-0x00000003ffefffff]
[ 1.970941] node 0: [mem 0x00000004f0000000-0x00000004ffffffff]
[ 1.971508] Initmem setup node 0 [mem 0x0000000000200000-0x00000004ffffffff]
[ 1.972840] On node 0, zone DMA: 512 pages in unavailable ranges
[ 1.991967] On node 0, zone DMA: 4096 pages in unavailable ranges
[ 2.055655] On node 0, zone Normal: 1280 pages in unavailable ranges
[ 2.057573] On node 0, zone Normal: 256 pages in unavailable ranges
[ 2.058322] psci: probing for conduit method from DT.
[ 2.059348] psci: PSCIv1.1 detected in firmware.
[ 2.059768] psci: Using standard PSCI v0.2 function IDs
[ 2.060242] psci: Trusted OS migration not required
[ 2.060719] psci: SMC Calling Convention v1.2
[ 2.061463] percpu: Embedded 30 pages/cpu s83448 r8192 d31240 u122880
[ 2.062228] Detected VIPT I-cache on CPU0
[ 2.062624] CPU features: detected: GIC system register CPU interface
[ 2.063207] CPU features: detected: Virtualization Host Extensions
[ 2.063774] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[ 2.064400] alternatives: applying boot alternatives
[ 2.066429] Built 1 zonelists, mobility grouping on. Total pages: 4122720
[ 2.067055] Kernel command line: storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal androidboot.dtbo_idx=0 androidboot.verifiedbootstate=orange earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 coherent_pool=1m irqchip.gicv3_pseudo_nmi=0 rw root=/dev/mmcblk2p8 rootfstype=ext4 rootflags=discard data=/dev/mmcblk2p9 consoleblank=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 androidboot.fwver=ddr-v1.18-9fa84341ce,spl-v1.13,bl31-v1.49,bl32-v1.19,uboot-44f011c4ba-07/17/2025
[ 2.071470] Unknown kernel command line parameters "storagemedia=emmc data=/dev/mmcblk2p9 cgroup_enable=memory cgroup_memory=1", will be passed to user space.
[ 2.074194] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes, linear)
[ 2.075642] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[ 2.076360] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 2.076926] software IO TLB: area num 8.
[ 2.088861] software IO TLB: mapped [mem 0x00000000e7bbe000-0x00000000ebbbe000] (64MB)
[ 2.192849] Memory: 16186020K/16752640K available (18816K kernel code, 3138K rwdata, 6844K rodata, 6400K init, 936K bss, 435548K reserved, 131072K cma-reserved)
[ 2.194289] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[ 2.194913] ftrace: allocating 60288 entries in 236 pages
[ 2.279395] ftrace: allocated 236 pages with 5 groups
[ 2.279945] trace event string verifier disabled
[ 2.280542] rcu: Hierarchical RCU implementation.
[ 2.280968] rcu: RCU event tracing is enabled.
[ 2.281377] Rude variant of Tasks RCU enabled.
[ 2.281783] Tracing variant of Tasks RCU enabled.
[ 2.282214] rcu: RCU calculated value of scheduler-enlistment delay is 30 jiffies.
[ 2.287210] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 2.290253] GICv3: GIC: Using split EOI/Deactivate mode
[ 2.290729] GICv3: 480 SPIs implemented
[ 2.291075] GICv3: 0 Extended SPIs implemented
[ 2.291498] Root IRQ handler: gic_handle_irq
[ 2.291893] GICv3: GICv3 features: 16 PPIs
[ 2.292303] GICv3: CPU0: found redistributor 0 region 0:0x00000000fe680000
[ 2.293216] ITS [mem 0xfe640000-0xfe65ffff]
[ 2.293636] ITS@0x00000000fe640000: allocated 8192 Devices @1000d0000 (indirect, esz 8, psz 64K, shr 0)
[ 2.294501] ITS@0x00000000fe640000: allocated 32768 Interrupt Collections @1000e0000 (flat, esz 2, psz 64K, shr 0)
[ 2.295441] ITS: using cache flushing for cmd queue
[ 2.295907] ITS [mem 0xfe660000-0xfe67ffff]
[ 2.296318] ITS@0x00000000fe660000: allocated 8192 Devices @100100000 (indirect, esz 8, psz 64K, shr 0)
[ 2.297182] ITS@0x00000000fe660000: allocated 32768 Interrupt Collections @100110000 (flat, esz 2, psz 64K, shr 0)
[ 2.298116] ITS: using cache flushing for cmd queue
[ 2.298758] GICv3: using LPI property table @0x0000000100120000
[ 2.299399] GIC: using cache flushing for LPI property table
[ 2.299909] GICv3: CPU0: using allocated LPI pending table @0x0000000100130000
[ 2.300609] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 2.431681] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 2.432242] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 2.433219] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 2.435128] Console: colour dummy device 80x25
[ 2.435564] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=80000)
[ 2.436498] pid_max: default: 32768 minimum: 301
[ 2.436966] LSM: Security Framework initializing
[ 2.437490] AppArmor: AppArmor initialized
[ 2.437959] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 2.438685] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 2.440873] cblist_init_generic: Setting adjustable number of callback queues.
[ 2.441527] cblist_init_generic: Setting shift to 3 and lim to 1.
[ 2.442160] cblist_init_generic: Setting adjustable number of callback queues.
[ 2.442813] cblist_init_generic: Setting shift to 3 and lim to 1.
[ 2.443509] rcu: Hierarchical SRCU implementation.
[ 2.443943] rcu: Max phase no-delay instances is 1000.
[ 2.445108] Platform MSI: msi-controller@fe640000 domain created
[ 2.445679] Platform MSI: msi-controller@fe660000 domain created
[ 2.446553] PCI/MSI: /interrupt-controller@fe600000/msi-controller@fe640000 domain created
[ 2.447319] PCI/MSI: /interrupt-controller@fe600000/msi-controller@fe660000 domain created
[ 2.448608] smp: Bringing up secondary CPUs ...
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot
I/TC: Secondary CPU 4 initializing
I/TC: Secondary CPU 4 switching to normal world boot
I/TC: Secondary CPU 5 initializing
I/TC: Secondary CPU 5 switching to normal world boot
I/TC: Secondary CPU 6 initializing
I/TC: Secondary CPU 6 switching to normal world boot
I/TC: Secondary CPU 7 initializing
I/TC: Secondary CPU 7 switching to normal world boot
[ 2.450162] Detected VIPT I-cache on CPU1
[ 2.450247] GICv3: CPU1: found redistributor 100 region 0:0x00000000fe6a0000
[ 2.450265] GICv3: CPU1: using allocated LPI pending table @0x0000000100140000
[ 2.450301] CPU1: Booted secondary processor 0x0000000100 [0x412fd050]
[ 2.451460] Detected VIPT I-cache on CPU2
[ 2.451536] GICv3: CPU2: found redistributor 200 region 0:0x00000000fe6c0000
[ 2.451552] GICv3: CPU2: using allocated LPI pending table @0x0000000100150000
[ 2.451583] CPU2: Booted secondary processor 0x0000000200 [0x412fd050]
[ 2.452731] Detected VIPT I-cache on CPU3
[ 2.452807] GICv3: CPU3: found redistributor 300 region 0:0x00000000fe6e0000
[ 2.452823] GICv3: CPU3: using allocated LPI pending table @0x0000000100160000
[ 2.452852] CPU3: Booted secondary processor 0x0000000300 [0x412fd050]
[ 2.453977] CPU features: detected: Spectre-v4
[ 2.453981] CPU features: detected: Spectre-BHB
[ 2.453984] CPU features: detected: SSBS not fully self-synchronizing
[ 2.453986] Detected PIPT I-cache on CPU4
[ 2.454040] GICv3: CPU4: found redistributor 400 region 0:0x00000000fe700000
[ 2.454051] GICv3: CPU4: using allocated LPI pending table @0x0000000100170000
[ 2.454074] CPU4: Booted secondary processor 0x0000000400 [0x414fd0b0]
[ 2.455199] Detected PIPT I-cache on CPU5
[ 2.455262] GICv3: CPU5: found redistributor 500 region 0:0x00000000fe720000
[ 2.455273] GICv3: CPU5: using allocated LPI pending table @0x0000000100180000
[ 2.455296] CPU5: Booted secondary processor 0x0000000500 [0x414fd0b0]
[ 2.456422] Detected PIPT I-cache on CPU6
[ 2.456482] GICv3: CPU6: found redistributor 600 region 0:0x00000000fe740000
[ 2.456492] GICv3: CPU6: using allocated LPI pending table @0x0000000100190000
[ 2.456515] CPU6: Booted secondary processor 0x0000000600 [0x414fd0b0]
[ 2.457635] Detected PIPT I-cache on CPU7
[ 2.457697] GICv3: CPU7: found redistributor 700 region 0:0x00000000fe760000
[ 2.457708] GICv3: CPU7: using allocated LPI pending table @0x00000001001a0000
[ 2.457730] CPU7: Booted secondary processor 0x0000000700 [0x414fd0b0]
[ 2.457787] smp: Brought up 1 node, 8 CPUs
[ 2.475198] SMP: Total of 8 processors activated.
[ 2.475625] CPU features: detected: 32-bit EL0 Support
[ 2.476091] CPU features: detected: Data cache clean to the PoU not required for I/D coherence
[ 2.476870] CPU features: detected: Common not Private translations
[ 2.477435] CPU features: detected: CRC32 instructions
[ 2.477905] CPU features: detected: RCpc load-acquire (LDAPR)
[ 2.478426] CPU features: detected: LSE atomic instructions
[ 2.478931] CPU features: detected: Privileged Access Never
[ 2.479434] CPU features: detected: RAS Extension Support
[ 2.479923] CPU features: detected: Speculative Store Bypassing Safe (SSBS)
[ 2.480624] CPU: All CPU(s) started at EL2
[ 2.480996] alternatives: applying system-wide alternatives
[ 2.488850] devtmpfs: initialized
[ 2.501854] Registered cp15_barrier emulation handler
[ 2.502327] Registered setend emulation handler
[ 2.502813] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[ 2.503706] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[ 2.505323] pinctrl core: initialized pinctrl subsystem
[ 2.506196] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 2.507246] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[ 2.508067] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 2.508797] audit: initializing netlink subsys (disabled)
[ 2.509362] audit: type=2000 audit(0.073:1): state=initialized audit_enabled=0 res=1
[ 2.509864] Registered FIQ tty driver
[ 2.510531] thermal_sys: Registered thermal governor 'fair_share'
[ 2.510534] thermal_sys: Registered thermal governor 'step_wise'
[ 2.511089] thermal_sys: Registered thermal governor 'user_space'
[ 2.511652] cpuidle: using governor menu
[ 2.512696] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 2.513412] ASID allocator initialised with 65536 entries
[ 2.516000] ramoops: dmesg-0 0x18000@0x0000000000110000
[ 2.516478] ramoops: dmesg-1 0x18000@0x0000000000128000
[ 2.517019] ramoops: console 0x80000@0x0000000000140000
[ 2.517501] ramoops: pmsg 0x30000@0x00000000001c0000
[ 2.518220] printk: console [ramoops-1] enabled
[ 2.518751] pstore: Registered ramoops as persistent store backend
[ 2.519320] ramoops: using 0xe0000@0x110000, ecc: 0
[ 2.543631] platform csi2-dphy0: Fixed dependency cycle(s) with /mipi2-csi2
[ 2.544292] platform mipi2-csi2: Fixed dependency cycle(s) with /csi2-dphy0
[ 2.545062] platform mipi2-csi2: Fixed dependency cycle(s) with /rkcif-mipi-lvds2
[ 2.545764] platform rkcif-mipi-lvds2: Fixed dependency cycle(s) with /mipi2-csi2
[ 2.546567] platform rkcif-mipi-lvds2-sditf: Fixed dependency cycle(s) with /rkisp0-vir0
[ 2.547325] platform rkisp0-vir0: Fixed dependency cycle(s) with /rkcif-mipi-lvds2-sditf
[ 2.558269] platform fdd90000.vop: Fixed dependency cycle(s) with /dsi@fde30000
[ 2.558961] platform fde30000.dsi: Fixed dependency cycle(s) with /dsi@fde30000/panel@0
[ 2.559697] platform fde30000.dsi: Fixed dependency cycle(s) with /vop@fdd90000
[ 2.560553] platform fdd90000.vop: Fixed dependency cycle(s) with /dp@fde50000
[ 2.561234] platform fde50000.dp: Fixed dependency cycle(s) with /vop@fdd90000
[ 2.562173] platform fdd90000.vop: Fixed dependency cycle(s) with /hdmi@fde80000
[ 2.562871] platform fde80000.hdmi: Fixed dependency cycle(s) with /vop@fdd90000
[ 2.569504] platform fed80000.phy: Fixed dependency cycle(s) with /i2c@fec80000/fusb302@22/connector
[ 2.576712] rockchip-gpio fd8a0000.gpio: probed /pinctrl/gpio@fd8a0000
[ 2.577530] rockchip-gpio fec20000.gpio: probed /pinctrl/gpio@fec20000
[ 2.578306] rockchip-gpio fec30000.gpio: probed /pinctrl/gpio@fec30000
[ 2.579078] rockchip-gpio fec40000.gpio: probed /pinctrl/gpio@fec40000
[ 2.579961] rockchip-gpio fec50000.gpio: probed /pinctrl/gpio@fec50000
[ 2.580611] rockchip-pinctrl pinctrl: probed pinctrl
[ 2.582545] platform fdd90000.vop: Fixed dependency cycle(s) with /hdmi@fdea0000
[ 2.583247] platform fdea0000.hdmi: Fixed dependency cycle(s) with /vop@fdd90000
[ 2.587653] KASLR disabled due to lack of seed
[ 2.592085] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[ 2.592708] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[ 2.593281] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[ 2.593901] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[ 2.594474] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 2.595098] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[ 2.595671] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[ 2.596291] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[ 2.597161] cryptd: max_cpu_qlen set to 1000
[ 2.652190] raid6: neonx8 gen() 4423 MB/s
[ 2.708907] raid6: neonx4 gen() 4345 MB/s
[ 2.765625] raid6: neonx2 gen() 4139 MB/s
[ 2.822340] raid6: neonx1 gen() 3345 MB/s
[ 2.879061] raid6: int64x8 gen() 2002 MB/s
[ 2.935777] raid6: int64x4 gen() 2263 MB/s
[ 2.992495] raid6: int64x2 gen() 1965 MB/s
[ 3.049205] raid6: int64x1 gen() 1614 MB/s
[ 3.049596] raid6: using algorithm neonx8 gen() 4423 MB/s
[ 3.105921] raid6: .... xor() 3480 MB/s, rmw enabled
[ 3.106375] raid6: using neon recovery algorithm
[ 3.107500] fiq_debugger fiq_debugger.0: error -ENXIO: IRQ fiq not found
[ 3.108119] fiq_debugger fiq_debugger.0: error -ENXIO: IRQ wakeup not found
[ 3.108765] fiq_debugger_probe: could not install nmi irq handler
[[ 3.109360] printk: console [ttyFIQ0] enabled
3.109360] printk: console [ttyFIQ0] enabled
[ 3.110136] printk: bootconsole [uart8250] disabled
[ 3.110136] printk: bootconsole [uart8250] disabled
[ 3.110651] Registered fiq debugger ttyFIQ0
[ 3.122334] iommu: Default domain type: Translated
[ 3.122341] iommu: DMA domain TLB invalidation policy: strict mode
[ 3.122484] SCSI subsystem initialized
[ 3.122555] usbcore: registered new interface driver usbfs
[ 3.122570] usbcore: registered new interface driver hub
[ 3.122585] usbcore: registered new device driver usb
[ 3.122728] mc: Linux media interface: v0.10
[ 3.122744] videodev: Linux video capture interface: v2.00
[ 3.122780] pps_core: LinuxPPS API ver. 1 registered
[ 3.122785] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 3.122793] PTP clock support registered
[ 3.122810] EDAC MC: Ver: 3.0.0
[ 3.123111] arm-scmi firmware:scmi: Enabled polling mode TX channel - prot_id:16
[ 3.123156] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled.
[ 3.123185] arm-scmi firmware:scmi: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0
[ 3.124374] Advanced Linux Sound Architecture Driver Initialized.
[ 3.124607] Bluetooth: Core ver 2.22
[ 3.124622] NET: Registered PF_BLUETOOTH protocol family
[ 3.124626] Bluetooth: HCI device and connection manager initialized
[ 3.124634] Bluetooth: HCI socket layer initialized
[ 3.124639] Bluetooth: L2CAP socket layer initialized
[ 3.124647] Bluetooth: SCO socket layer initialized
[ 3.124655] NetLabel: Initializing
[ 3.124659] NetLabel: domain hash size = 128
[ 3.124663] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 3.124688] NetLabel: unlabeled traffic allowed by default
[ 3.125944] rockchip-cpuinfo cpuinfo: SoC : 35880000
[ 3.125952] rockchip-cpuinfo cpuinfo: Serial : 1f0bee682f135e89
[ 3.126259] clocksource: Switched to clocksource arch_sys_counter
[ 3.126378] VFS: Disk quotas dquot_6.6.0
[ 3.126400] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 3.126451] FS-Cache: Loaded
[ 3.126643] AppArmor: AppArmor Filesystem Enabled
[ 3.130319] NET: Registered PF_INET protocol family
[ 3.130717] IP idents hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 3.137853] tcp_listen_portaddr_hash hash table entries: 8192 (order: 6, 262144 bytes, linear)
[ 3.137979] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 3.138008] TCP established hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 3.138850] TCP bind hash table entries: 65536 (order: 10, 4194304 bytes, linear)
[ 3.142004] TCP: Hash tables configured (established 131072 bind 65536)
[ 3.142073] UDP hash table entries: 8192 (order: 7, 786432 bytes, linear)
[ 3.142436] UDP-Lite hash table entries: 8192 (order: 7, 786432 bytes, linear)
[ 3.142851] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 3.143040] PCI: CLS 0 bytes, default 64
[ 3.143132] Trying to unpack rootfs image as initramfs...
[ 3.143666] rockchip-thermal fec00000.tsadc: Missing rockchip,grf property
[ 3.144413] rockchip-thermal fec00000.tsadc: tsadc is probed successfully!
[ 3.144938] kvm [1]: IPA Size Limit: 40 bits
[ 3.144955] kvm [1]: GICv3: no GICV resource entry
[ 3.144960] kvm [1]: disabling GICv2 emulation
[ 3.144978] kvm [1]: GIC system register CPU interface enabled
[ 3.145098] kvm [1]: vgic interrupt IRQ9
[ 3.145276] kvm [1]: VHE mode initialized successfully
[ 3.145932] Initialise system trusted keyrings
[ 3.146028] workingset: timestamp_bits=46 max_order=22 bucket_order=0
[ 3.148098] zbud: loaded
[ 3.148583] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 3.148718] fuse: init (API version 7.38)
[ 3.174677] xor: measuring software checksum speed
[ 3.175205] 8regs : 6298 MB/sec
[ 3.175739] 32regs : 6221 MB/sec
[ 3.176101] arm64_neon : 9212 MB/sec
[ 3.176106] xor: using function: arm64_neon (9212 MB/sec)
[ 3.176117] Key type asymmetric registered
[ 3.176122] Asymmetric key parser 'x509' registered
[ 3.176145] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 242)
[ 3.176238] io scheduler mq-deadline registered
[ 3.176243] io scheduler kyber registered
[ 3.176289] io scheduler bfq registered
[ 3.177452] rockchip-csi2-dphy-hw fedc0000.csi2-dphy0-hw: csi2 dphy hw probe successfully!
[ 3.177530] rockchip-csi2-dphy-hw fedc8000.csi2-dphy1-hw: csi2 dphy hw probe successfully!
[ 3.186277] rockchip-hdptx-phy-hdmi fed60000.hdmiphy: hdptx phy init success
[ 3.186981] rockchip-hdptx-phy-hdmi fed70000.hdmiphy: hdptx phy init success
[ 3.189835] rk-pcie fe180000.pcie: invalid prsnt-gpios property in node
[ 3.190124] rk-pcie fe150000.pcie: invalid prsnt-gpios property in node
[ 3.190248] pwm-backlight pwm-backlight: supply power not found, using dummy regulator
[ 3.190550] iep: Module initialized.
[ 3.190586] mpp_service mpp-srv: 494460254 author: Jon Lin 2025-08-07 arm64: dts: rockchip: rk3588: Add clk PCLK_PHP_ROOT to pcie30phy
[ 3.190593] mpp_service mpp-srv: probe start
[ 3.192119] mpp_vepu2 jpege-ccu: probing start
[ 3.192127] mpp_vepu2 jpege-ccu: probing finish
[ 3.193052] mpp_rkvdec2 fdc30000.rkvdec-ccu: rkvdec-ccu, probing start
[ 3.193109] mpp_rkvdec2 fdc30000.rkvdec-ccu: ccu-mode: 1
[ 3.193115] mpp_rkvdec2 fdc30000.rkvdec-ccu: probing finish
[ 3.193415] mpp_rkvenc2 rkvenc-ccu: probing start
[ 3.193422] mpp_rkvenc2 rkvenc-ccu: probing finish
[ 3.193834] mpp_service mpp-srv: probe success
[ 3.193960] rk_videotunnel_driver rkvtunnel: probe start
[ 3.194038] rk_videotunnel_driver rkvtunnel: probe success
[ 3.204130] dma-pl330 fea10000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 3.204144] dma-pl330 fea10000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[ 3.204934] dma-pl330 fea30000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 3.204943] dma-pl330 fea30000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[ 3.205716] dma-pl330 fed10000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 3.205725] dma-pl330 fed10000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
[ 3.206019] rockchip-pvtm fda40000.pvtm: pvtm@0 probed
[ 3.206071] rockchip-pvtm fda50000.pvtm: pvtm@1 probed
[ 3.206120] rockchip-pvtm fda60000.pvtm: pvtm@2 probed
[ 3.206166] rockchip-pvtm fdaf0000.pvtm: pvtm@3 probed
[ 3.206209] rockchip-pvtm fdb30000.pvtm: pvtm@4 probed
[ 3.206222] rk-pcie fe150000.pcie: can't get current limit.
[ 3.206619] rk-pcie fe150000.pcie: host bridge /pcie@fe150000 ranges:
[ 3.206662] rk-pcie fe150000.pcie: IO 0x00f0100000..0x00f01fffff -> 0x00f0100000
[ 3.206668] rockchip-system-monitor rockchip-system-monitor: system monitor probe
[ 3.206704] rk-pcie fe150000.pcie: MEM 0x00f0200000..0x00f0ffffff -> 0x00f0200000
[ 3.206727] rk-pcie fe150000.pcie: MEM 0x0900000000..0x093fffffff -> 0x0900000000
[ 3.206791] rk-pcie fe150000.pcie: iATU unroll: enabled
[ 3.206805] rk-pcie fe150000.pcie: iATU regions: 8 ob, 8 ib, align 64K, limit 8G
[ 3.207620] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[ 3.208076] feb90000.serial: ttyS6 at MMIO 0xfeb90000 (irq = 38, base_baud = 1500000) is a 16550A
[ 3.214752] rk_iommu fdca0000.iommu: av1d iommu enabled
[ 3.219226] dw-mipi-dsi2 fde30000.dsi: Fixed dependency cycle(s) with /dsi@fde30000/panel@0
[ 3.219295] mipi-dsi fde30000.dsi.0: Fixed dependency cycle(s) with /dsi@fde30000
[ 3.228172] panel-simple-dsi fde30000.dsi.0: supply power not found, using dummy regulator
[ 3.232711] brd: module loaded
[ 3.235466] loop: module loaded
[ 3.235615] lkdtm: No crash points registered, enable through debugfs
[ 3.235648] system_heap: orders[0] = 6
[ 3.235654] system_heap: orders[1] = 4
[ 3.235659] system_heap: orders[2] = 0
[ 3.237718] rockchip-spi feb20000.spi: no high_speed pinctrl state
[ 3.238052] spi spi2.0: Fixed dependency cycle(s) with /spi@feb20000/rk806single@0/regulators/DCDC_REG7
[ 3.238090] spi spi2.0: Fixed dependency cycle(s) with /spi@feb20000/rk806single@0/pinctrl_rk806/rk806_dvs1_pwrdn
[ 3.238104] spi spi2.0: Fixed dependency cycle(s) with /spi@feb20000/rk806single@0/pinctrl_rk806/rk806_dvs3_null
[ 3.238117] spi spi2.0: Fixed dependency cycle(s) with /spi@feb20000/rk806single@0/pinctrl_rk806/rk806_dvs2_null
[ 3.238130] spi spi2.0: Fixed dependency cycle(s) with /spi@feb20000/rk806single@0/pinctrl_rk806/rk806_dvs1_null
[ 3.238590] rk806 spi2.0: chip id: RK806,ver:0x2, 0x1
[ 3.238717] rk806 spi2.0: ON: 0x80 OFF:0x4
[ 3.238789] rk806 spi2.0: shutdown-sequence missing!
[ 3.238796] rk806 spi2.0: vb-shutdown-sequence missing!
[ 3.238803] rk806 spi2.0: dvs-suspend-control-by missing!
[ 3.240076] vdd_gpu_s0: No configuration
[ 3.251358] rk806 spi2.0: no sleep-setting state
[ 3.251369] rk806 spi2.0: no reset-setting pinctrl state
[ 3.251376] rk806 spi2.0: no dvs-setting pinctrl state
[ 3.251951] rockchip-spi feb20000.spi: probed, poll=0, rsd=0, cs-inactive=0, ready=0
[ 3.253867] PPP generic driver version 2.4.2
[ 3.253971] usbcore: registered new interface driver asix
[ 3.253993] usbcore: registered new interface driver ax88179_178a
[ 3.254007] usbcore: registered new interface driver cdc_ether
[ 3.254024] usbcore: registered new interface driver rndis_host
[ 3.254039] usbcore: registered new interface driver qmi_wwan
[ 3.254432] platform fc000000.usb: Fixed dependency cycle(s) with /i2c@fec80000/fusb302@22
[ 3.266659] phy phy-fd5d4000.syscon:[email protected]: illegal mode
[ 3.266674] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[ 3.266688] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1
[ 3.266779] xhci-hcd xhci-hcd.3.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000808002010010
[ 3.266809] xhci-hcd xhci-hcd.3.auto: irq 67, io mem 0xfc400000
[ 3.266893] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[ 3.266903] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 2
[ 3.266912] xhci-hcd xhci-hcd.3.auto: Host supports USB 3.0 SuperSpeed
[ 3.266985] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[ 3.266995] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.267002] usb usb1: Product: xHCI Host Controller
[ 3.267008] usb usb1: Manufacturer: Linux 6.1.118 xhci-hcd
[ 3.267015] usb usb1: SerialNumber: xhci-hcd.3.auto
[ 3.267264] hub 1-0:1.0: USB hub found
[ 3.267284] hub 1-0:1.0: 1 port detected
[ 3.267442] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 3.267487] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.01
[ 3.267496] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.267503] usb usb2: Product: xHCI Host Controller
[ 3.267509] usb usb2: Manufacturer: Linux 6.1.118 xhci-hcd
[ 3.267515] usb usb2: SerialNumber: xhci-hcd.3.auto
[ 3.267726] hub 2-0:1.0: USB hub found
[ 3.267741] hub 2-0:1.0: 1 port detected
[ 3.267901] usbcore: registered new interface driver cdc_acm
[ 3.267907] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 3.267925] usbcore: registered new interface driver cdc_wdm
[ 3.268030] usbcore: registered new interface driver uas
[ 3.268062] usbcore: registered new interface driver usb-storage
[ 3.268070] ehci-platform fc880000.usb: EHCI Host Controller
[ 3.268086] ohci-platform fc8c0000.usb: Generic Platform OHCI controller
[ 3.268089] ehci-platform fc880000.usb: new USB bus registered, assigned bus number 3
[ 3.268096] usbcore: registered new interface driver usbserial_generic
[ 3.268105] usbserial: USB Serial support registered for generic
[ 3.268122] ohci-platform fc8c0000.usb: new USB bus registered, assigned bus number 4
[ 3.268127] usbcore: registered new interface driver ch341
[ 3.268136] usbserial: USB Serial support registered for ch341-uart
[ 3.268149] usbcore: registered new interface driver cp210x
[ 3.268157] ehci-platform fc880000.usb: irq 69, io mem 0xfc880000
[ 3.268161] usbserial: USB Serial support registered for cp210x
[ 3.268178] usbcore: registered new interface driver ftdi_sio
[ 3.268189] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 3.268224] usbcore: registered new interface driver option
[ 3.268234] usbserial: USB Serial support registered for GSM modem (1-port)
[ 3.268243] ehci-platform fc800000.usb: EHCI Host Controller
[ 3.268245] ohci-platform fc8c0000.usb: irq 71, io mem 0xfc8c0000
[ 3.268248] ohci-platform fc840000.usb: Generic Platform OHCI controller
[ 3.268256] ohci-platform fc840000.usb: new USB bus registered, assigned bus number 5
[ 3.268281] usbcore: registered new interface driver pl2303
[ 3.268294] usbserial: USB Serial support registered for pl2303
[ 3.268293] ehci-platform fc800000.usb: new USB bus registered, assigned bus number 6
[ 3.268311] usbcore: registered new interface driver qcserial
[ 3.268311] ohci-platform fc840000.usb: irq 70, io mem 0xfc840000
[ 3.268322] usbserial: USB Serial support registered for Qualcomm USB modem
[ 3.268410] ehci-platform fc800000.usb: irq 68, io mem 0xfc800000
[ 3.268580] mousedev: PS/2 mouse device common for all mice
[ 3.269052] .. rk pwm remotectl v2.0 init
[ 3.269173] input: fd8b0030.pwm as /devices/platform/fd8b0030.pwm/input/input0
[ 3.269397] remotectl-pwm fd8b0030.pwm: Controller support pwrkey capture
[ 3.270309] input: rk805 pwrkey as /devices/platform/feb20000.spi/spi_master/spi2/spi2.0/rk805-pwrkey.1.auto/input/input1
[ 3.270491] i2c_dev: i2c /dev entries driver
[ 3.279606] ehci-platform fc880000.usb: USB 2.0 started, EHCI 1.00
[ 3.279816] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[ 3.279838] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.279853] usb usb3: Product: EHCI Host Controller
[ 3.279865] usb usb3: Manufacturer: Linux 6.1.118 ehci_hcd
[ 3.279877] usb usb3: SerialNumber: fc880000.usb
[ 3.280251] hub 3-0:1.0: USB hub found
[ 3.280285] hub 3-0:1.0: 1 port detected
[ 3.290152] platform csi2-dphy0: Fixed dependency cycle(s) with /i2c@feab0000/imx415@1a
[ 3.290215] i2c 3-001a: Fixed dependency cycle(s) with /csi2-dphy0
[ 3.291170] <<GTP-INF>>[gt1x_ts_probe:546] GTP Driver Version: V1.4<2015/07/10>
[ 3.291187] <<GTP-INF>>[gt1x_ts_probe:547] GTP I2C Address: 0x14
[ 3.291364] <<GTP-ERR>>[gt1x_parse_dt:338] vdd_ana not specified, fallback to power-supply
[ 3.291410] <<GTP-ERR>>[gt1x_parse_dt:341] power not specified, ignore power ctrl
[ 3.291476] <<GTP-INF>>[gt1x_reset_guitar:807] GTP RESET!
[ 3.292937] ehci-platform fc800000.usb: USB 2.0 started, EHCI 1.00
[ 3.293146] rtc-hym8563 6-0051: rtc information is valid
[ 3.293244] usb usb6: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[ 3.293265] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.293279] usb usb6: Product: EHCI Host Controller
[ 3.293292] usb usb6: Manufacturer: Linux 6.1.118 ehci_hcd
[ 3.293304] usb usb6: SerialNumber: fc800000.usb
[ 3.293717] hub 6-0:1.0: USB hub found
[ 3.293772] hub 6-0:1.0: 1 port detected
[ 3.297130] rtc-hym8563 6-0051: registered as rtc0
[ 3.297644] rtc-hym8563 6-0051: setting system clock to 2025-11-10T13:30:36 UTC (1762781436)
[ 3.304550] IR NEC protocol handler initialized
[ 3.304842] rkcifhw fdce0000.rkcif: Adding to iommu group 16
[ 3.305736] rkcifhw fdce0000.rkcif: No reserved memory region assign to CIF
[ 3.305851] rkcif rkcif-mipi-lvds2: Adding to iommu group 16
[ 3.305868] rkcif rkcif-mipi-lvds2: rkcif driver version: v00.02.00
[ 3.305939] rkcif rkcif-mipi-lvds2: attach to cif hw node
[ 3.305945] rkcif rkcif-mipi-lvds2: rkcif wait line 0
[ 3.305952] rkcif rkcif-mipi-lvds2: rkcif fastboot reserve bufs num 3
[ 3.305959] rkcif rkcif-mipi-lvds2: rkcif pins used group 0
[ 3.305968] : terminal subdev does not exist
[ 3.305976] : terminal subdev does not exist
[ 3.305982] : terminal subdev does not exist
[ 3.305988] : terminal subdev does not exist
[ 3.305994] : get_remote_sensor: video pad[0] is null
[ 3.306000] : rkcif_update_sensor_info: stream[0] get remote sensor_sd failed!
[ 3.306007] : rkcif_scale_set_fmt: req(40, 30) src out(0, 0)
[ 3.306014] : get_remote_sensor: video pad[0] is null
[ 3.306019] : rkcif_update_sensor_info: stream[0] get remote sensor_sd failed!
[ 3.306025] : rkcif_scale_set_fmt: req(40, 30) src out(0, 0)
[ 3.306032] : get_remote_sensor: video pad[0] is null
[ 3.306037] : rkcif_update_sensor_info: stream[0] get remote sensor_sd failed!
[ 3.306042] : rkcif_scale_set_fmt: req(40, 30) src out(0, 0)
[ 3.306049] : get_remote_sensor: video pad[0] is null
[ 3.306054] : rkcif_update_sensor_info: stream[0] get remote sensor_sd failed!
[ 3.306059] : rkcif_scale_set_fmt: req(40, 30) src out(0, 0)
[ 3.306734] rkcif rkcif-mipi-lvds2: No memory-region-thunderboot specified
[ 3.307609] rockchip-mipi-csi2-hw fdd10000.mipi0-csi2-hw: enter mipi csi2 hw probe!
[ 3.307719] rockchip-mipi-csi2-hw fdd10000.mipi0-csi2-hw: probe success, v4l2_dev:mipi0-csi2-hw!
[ 3.307756] rockchip-mipi-csi2-hw fdd20000.mipi1-csi2-hw: enter mipi csi2 hw probe!
[ 3.307833] rockchip-mipi-csi2-hw fdd20000.mipi1-csi2-hw: probe success, v4l2_dev:mipi1-csi2-hw!
[ 3.307866] rockchip-mipi-csi2-hw fdd30000.mipi2-csi2-hw: enter mipi csi2 hw probe!
[ 3.307937] rockchip-mipi-csi2-hw fdd30000.mipi2-csi2-hw: probe success, v4l2_dev:mipi2-csi2-hw!
[ 3.307967] rockchip-mipi-csi2-hw fdd40000.mipi3-csi2-hw: enter mipi csi2 hw probe!
[ 3.308038] rockchip-mipi-csi2-hw fdd40000.mipi3-csi2-hw: probe success, v4l2_dev:mipi3-csi2-hw!
[ 3.308068] rockchip-mipi-csi2-hw fdd50000.mipi4-csi2-hw: enter mipi csi2 hw probe!
[ 3.308137] rockchip-mipi-csi2-hw fdd50000.mipi4-csi2-hw: probe success, v4l2_dev:mipi4-csi2-hw!
[ 3.308166] rockchip-mipi-csi2-hw fdd60000.mipi5-csi2-hw: enter mipi csi2 hw probe!
[ 3.308248] rockchip-mipi-csi2-hw fdd60000.mipi5-csi2-hw: probe success, v4l2_dev:mipi5-csi2-hw!
[ 3.308614] rockchip-mipi-csi2 mipi2-csi2: attach to csi2 hw node
[ 3.308642] rkcif rkcif-mipi-lvds2: Entity type for entity rockchip-mipi-csi2 was not initialized!
[ 3.308651] rockchip-mipi-csi2: Async registered subdev
[ 3.308657] rockchip-mipi-csi2: probe success, v4l2_dev:rkcif-mipi-lvds2!
[ 3.309494] rkisp_hw fdcb0000.rkisp: Adding to iommu group 15
[ 3.309649] rkisp_hw fdcb0000.rkisp: is_thunderboot: 0
[ 3.309658] rkisp_hw fdcb0000.rkisp: Missing rockchip,grf property
[ 3.309676] rkisp_hw fdcb0000.rkisp: max input:0x0@0fps
[ 3.309791] rkisp_hw fdcb0000.rkisp: no find phandle sram
[ 3.310042] rkisp rkisp0-vir0: rkisp driver version: v02.09.00
[ 3.310131] rkisp rkisp0-vir0: No memory-region-thunderboot specified
[ 3.310196] rkisp rkisp0-vir0: Entity type for entity rkisp-isp-subdev was not initialized!
[ 3.311651] rk_hdmirx fdee0000.hdmirx-controller: No reserved memory for HDMIRX, use default CMA
[ 3.311675] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_get_phy_cpuid_func: mpidr: 0x0000000500, phy_cpuid:0x5
[ 3.311692] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_probe: cpu_aff:0x500, Bound_cpu:5, wdt_cfg_bound_cpu:2, phy_cpuid:5
[ 3.312215] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_audio_interrupts_setup: 0
[ 3.312917] rk_hdmirx fdee0000.hdmirx-controller: rk_hdmirx_hdcp_register success
[ 3.312947] rk_hdmirx fdee0000.hdmirx-controller: fdee0000.hdmirx-controller driver probe ok!
[ 3.314317] device-mapper: uevent: version 1.0.3
[ 3.314428] device-mapper: ioctl: 4.47.0-ioctl (2022-07-28) initialised: [email protected]
[ 3.314852] cpu cpu0: no pvtpll
[ 3.315339] cpu cpu0: bin=0
[ 3.315522] cpu cpu0: leakage=8
[ 3.316992] cpu cpu0: pvtm=1404
[ 3.317180] cpu cpu0: pvtm-volt-sel=0
[ 3.317485] cpu cpu4: no pvtpll
[ 3.319185] cpu cpu4: bin=0
[ 3.319363] cpu cpu4: leakage=7
[ 3.325946] cpu cpu4: pvtm=1636
[ 3.327010] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 6.01
[ 3.327023] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.327031] usb usb5: Product: Generic Platform OHCI controller
[ 3.327038] usb usb5: Manufacturer: Linux 6.1.118 ohci_hcd
[ 3.327044] usb usb5: SerialNumber: fc840000.usb
[ 3.327278] hub 5-0:1.0: USB hub found
[ 3.327297] hub 5-0:1.0: 1 port detected
[ 3.327554] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 6.01
[ 3.327576] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.327590] usb usb4: Product: Generic Platform OHCI controller
[ 3.327603] usb usb4: Manufacturer: Linux 6.1.118 ohci_hcd
[ 3.327614] usb usb4: SerialNumber: fc8c0000.usb
[ 3.327982] hub 4-0:1.0: USB hub found
[ 3.328021] hub 4-0:1.0: 1 port detected
[ 3.329976] cpu cpu4: pvtm-volt-sel=2
[ 3.331055] cpu cpu6: no pvtpll
[ 3.332746] cpu cpu6: bin=0
[ 3.332928] cpu cpu6: leakage=7
[ 3.339530] cpu cpu6: pvtm=1629
[ 3.343588] cpu cpu6: pvtm-volt-sel=2
[ 3.345670] cpu cpu0: avs=0
[ 3.346970] cpu cpu4: avs=0
[ 3.348089] cpu cpu6: avs=0
[ 3.348198] cpu cpu0: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=1608000000 h_table=0
[ 3.348664] cpu cpu0: EM: created perf domain
[ 3.349122] cpu cpu4: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=2208000000 h_table=0
[ 3.355536] cpu cpu4: EM: created perf domain
[ 3.356142] cpu cpu6: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=2208000000 h_table=0
[ 3.363127] <<GTP-ERR>>[_do_i2c_write:434] I2c transfer error! (-6)
[ 3.363150] <<GTP-ERR>>[gt1x_init:2344] Reset guitar failed!
[ 3.363161] <<GTP-INF>>[gt1x_reset_guitar:807] GTP RESET!
[ 3.367093] cpu cpu6: EM: created perf domain
[ 3.368625] sdhci: Secure Digital Host Controller Interface driver
[ 3.368637] sdhci: Copyright(c) Pierre Ossman
[ 3.368643] Synopsys Designware Multimedia Card Interface Driver
[ 3.369123] sdhci-pltfm: SDHCI platform and OF driver helper
[ 3.371146] ledtrig-cpu: registered to indicate activity on CPUs
[ 3.371166] arm-scmi firmware:scmi: Failed. SCMI protocol 17 not active.
[ 3.371190] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[ 3.371210] hid: raw HID events driver (C) Jiri Kosina
[ 3.371307] usbcore: registered new interface driver usbhid
[ 3.371312] usbhid: USB HID core driver
[ 3.372456] rockchip-dfi fe060000.dfi: Failed to get pclk_ddr_mon_ch0
[ 3.372462] rockchip-dfi: probe of fe060000.dfi failed with error -22
[ 3.376203] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[ 3.376802] optee: probing for conduit method.
[ 3.376816] optee: revision 3.13 (57604957)
[ 3.377148] optee: dynamic shared memory is enabled
[ 3.377228] optee: initialized driver
[ 3.396244] rockchip-i2s-tdm fddf0000.i2s: CLK-ALWAYS-ON: mclk: 12288000, bclk: 3072000, fsync: 48000
[ 3.397018] rockchip-i2s-tdm fe470000.i2s: Register PCM for TRCM mode
[ 3.397511] rockchip-i2s-tdm fddf4000.i2s: CLK-ALWAYS-ON: mclk: 12288000, bclk: 3072000, fsync: 48000
[ 3.397714] rockchip-i2s-tdm fddf8000.i2s: Init RX wait-time-ms: 50
[ 3.403093] mmc2: SDHCI controller on fe2e0000.mmc [fe2e0000.mmc] using ADMA
[ 3.409048] rk-pcie fe150000.pcie: PCIe Linking... LTSSM is 0x0
[ 3.411507] debugfs: File 'Capture' in directory 'dapm' already present!
[ 3.412167] input: rockchip,hdmiin rockchip,hdmiin as /devices/platform/hdmiin-sound/sound/card0/input2
[ 3.412583] Initializing XFRM netlink socket
[ 3.412593] IPsec XFRM device driver
[ 3.412722] NET: Registered PF_INET6 protocol family
[ 3.413585] Segment Routing with IPv6
[ 3.413600] In-situ OAM (IOAM) with IPv6
[ 3.413638] NET: Registered PF_PACKET protocol family
[ 3.413942] Bluetooth: RFCOMM TTY layer initialized
[ 3.413953] Bluetooth: RFCOMM socket layer initialized
[ 3.413964] Bluetooth: RFCOMM ver 1.11
[ 3.413971] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 3.413977] Bluetooth: HIDP socket layer initialized
[ 3.413981] [BT_RFKILL]: Enter rfkill_rk_init
[ 3.413985] [WLAN_RFKILL]: Enter rfkill_wlan_init
[ 3.414217] Key type dns_resolver registered
[ 3.414658] imx415 3-001a: driver version: 00.01.08
[ 3.414671] imx415 3-001a: Get hdr mode failed! no hdr default
[ 3.414682] imx415 3-001a: detect imx415 lane 4
[ 3.414738] imx415 3-001a: could not get default pinstate
[ 3.414742] imx415 3-001a: could not get sleep pinstate
[ 3.414773] imx415 3-001a: supply dvdd not found, using dummy regulator
[ 3.414835] imx415 3-001a: supply dovdd not found, using dummy regulator
[ 3.414862] imx415 3-001a: supply avdd not found, using dummy regulator
[ 3.430148] rk-pcie fe150000.pcie: PCIe Linking... LTSSM is 0x0
[ 3.431886] Freeing initrd memory: 7756K
[ 3.433344] <<GTP-ERR>>[_do_i2c_write:434] I2c transfer error! (-6)
[ 3.433370] <<GTP-ERR>>[gt1x_init:2344] Reset guitar failed!
[ 3.433382] <<GTP-INF>>[gt1x_reset_guitar:807] GTP RESET!
[ 3.451267] rk-pcie fe150000.pcie: PCIe Linking... LTSSM is 0x1
[ 3.472436] rk-pcie fe150000.pcie: PCIe Linking... LTSSM is 0x0
[ 3.480493] imx415 3-001a: Unexpected sensor id(000000), ret(-5)
[ 3.481857] registered taskstats version 1
[ 3.481898] Loading compiled-in X.509 certificates
[ 3.482304] zswap: loaded using pool lzo/zbud
[ 3.484025] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=yes
[ 3.484231] pstore: Using crash dump compression: deflate
[ 3.484295] AppArmor: AppArmor sha1 policy hashing enabled
[ 3.484779] rga3 fdb60000.rga: Adding to iommu group 2
[ 3.485623] rga3 fdb60000.rga: probe successfully, irq = 43, hw_version:3.0.76831
[ 3.485833] rga3 fdb70000.rga: Adding to iommu group 3
[ 3.486480] rga3 fdb70000.rga: probe successfully, irq = 44, hw_version:3.0.76831
[ 3.487869] rga2 fdb80000.rga: probe successfully, irq = 110, hw_version:3.2.63318
[ 3.488209] rga: IOMMU binding successfully, default mapping core[0x1]
[ 3.488428] rga: Module initialized. v1.3.8
[ 3.493595] rk-pcie fe150000.pcie: PCIe Linking... LTSSM is 0x0
[ 3.494492] mmc2: Host Software Queue enabled
[ 3.494511] mmc2: new HS400 Enhanced strobe MMC card at address 0001
[ 3.495020] mmcblk2: mmc2:0001 A3A444 230 GiB
[ 3.498432] mmcblk2: p1 p2 p3 p4 p5 p6 p7 p8 p9
[ 3.500307] mmcblk2boot0: mmc2:0001 A3A444 4.00 MiB
[ 3.501510] mmcblk2boot1: mmc2:0001 A3A444 4.00 MiB
[ 3.502553] mmcblk2rpmb: mmc2:0001 A3A444 4.00 MiB, chardev (236:0)
[ 3.503343] <<GTP-ERR>>[_do_i2c_write:434] I2c transfer error! (-6)
[ 3.503355] <<GTP-ERR>>[gt1x_init:2344] Reset guitar failed!
[ 3.503360] <<GTP-INF>>[gt1x_reset_guitar:807] GTP RESET!
[ 3.521974] vendor storage:20190527 ret = 0
[ 3.522162] friendlyelec-board board: Serial : 1f0bee682f135e89
[ 3.524181] rockchip-csi2-dphy csi2-dphy0: csi2 dphy0 probe successfully!
[ 3.524846] rk-pcie fe190000.pcie: invalid prsnt-gpios property in node
[ 3.525234] rk-pcie fe170000.pcie: invalid prsnt-gpios property in node
[ 3.525466] rk-pcie fe190000.pcie: can't get current limit.
[ 3.525482] mpp_vdpu1 fdb51000.avsd-plus: Adding to iommu group 1
[ 3.525944] rk-pcie fe190000.pcie: host bridge /pcie@fe190000 ranges:
[ 3.525979] rk-pcie fe190000.pcie: IO 0x00f4100000..0x00f41fffff -> 0x00f4100000
[ 3.525999] rk-pcie fe190000.pcie: MEM 0x00f4200000..0x00f4ffffff -> 0x00f4200000
[ 3.526013] rk-pcie fe190000.pcie: MEM 0x0a00000000..0x0a3fffffff -> 0x0a00000000
[ 3.526024] mpp_vdpu1 fdb51000.avsd-plus: probe device
[ 3.526084] rk-pcie fe190000.pcie: iATU unroll: enabled
[ 3.526093] rk-pcie fe190000.pcie: iATU regions: 8 ob, 8 ib, align 64K, limit 8G
[ 3.526329] mpp_vdpu1 fdb51000.avsd-plus: reset_group->rw_sem_on=0
[ 3.526356] mpp_vdpu1 fdb51000.avsd-plus: reset_group->rw_sem_on=0
[ 3.526439] mpp_vdpu1 fdb51000.avsd-plus: probing finish
[ 3.526721] mpp_vdpu2 fdb50400.vdpu: Adding to iommu group 1
[ 3.526809] mpp_vdpu2 fdb50400.vdpu: probe device
[ 3.527020] mpp_vdpu2 fdb50400.vdpu: reset_group->rw_sem_on=0
[ 3.527039] mpp_vdpu2 fdb50400.vdpu: reset_group->rw_sem_on=0
[ 3.527068] mpp_vdpu2 fdb50400.vdpu: probing finish
[ 3.527337] mpp_vepu2 fdba0000.jpege-core: Adding to iommu group 5
[ 3.527500] mpp_vepu2 fdba0000.jpege-core: probing start
[ 3.527784] mpp_vepu2 fdba0000.jpege-core: attach ccu success
[ 3.527835] mpp_vepu2 fdba0000.jpege-core: probing finish
[ 3.528108] mpp_vepu2 fdba4000.jpege-core: Adding to iommu group 6
[ 3.528266] mpp_vepu2 fdba4000.jpege-core: probing start
[ 3.528543] mpp_vepu2 fdba4000.jpege-core: attach ccu success
[ 3.528598] mpp_vepu2 fdba4000.jpege-core: probing finish
[ 3.528869] mpp_vepu2 fdba8000.jpege-core: Adding to iommu group 7
[ 3.529031] mpp_vepu2 fdba8000.jpege-core: probing start
[ 3.529307] mpp_vepu2 fdba8000.jpege-core: attach ccu success
[ 3.529357] mpp_vepu2 fdba8000.jpege-core: probing finish
[ 3.529663] mpp_vepu2 fdbac000.jpege-core: Adding to iommu group 8
[ 3.529828] mpp_vepu2 fdbac000.jpege-core: probing start
[ 3.530100] mpp_vepu2 fdbac000.jpege-core: attach ccu success
[ 3.530154] mpp_vepu2 fdbac000.jpege-core: probing finish
[ 3.530406] mpp-iep2 fdbb0000.iep: Adding to iommu group 9
[ 3.530579] mpp-iep2 fdbb0000.iep: probe device
[ 3.531181] mpp-iep2 fdbb0000.iep: probing finish
[ 3.531454] mpp_jpgdec fdb90000.jpegd: Adding to iommu group 4
[ 3.531859] mpp_jpgdec fdb90000.jpegd: probe device
[ 3.532175] mpp_jpgdec fdb90000.jpegd: probing finish
[ 3.532473] mpp_rkvdec2 fdc38100.rkvdec-core: Adding to iommu group 12
[ 3.533171] mpp_rkvdec2 fdc38100.rkvdec-core: rkvdec-core, probing start
[ 3.533471] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_a is not found!
[ 3.533487] rkvdec2_init:1250: No niu aclk reset resource define
[ 3.533502] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_h is not found!
[ 3.533514] rkvdec2_init:1253: No niu hclk reset resource define
[ 3.533592] mpp_rkvdec2 fdc38100.rkvdec-core: no regulator, devfreq is disabled
[ 3.533711] mpp_rkvdec2 fdc38100.rkvdec-core: core_mask=00010001
[ 3.533727] mpp_rkvdec2 fdc38100.rkvdec-core: attach ccu as core 0
[ 3.533996] mpp_rkvdec2 fdc38100.rkvdec-core: sram_start 0x00000000ff001000
[ 3.534013] mpp_rkvdec2 fdc38100.rkvdec-core: rcb_iova 0x00000000fff00000
[ 3.534026] mpp_rkvdec2 fdc38100.rkvdec-core: sram_size 491520
[ 3.534038] mpp_rkvdec2 fdc38100.rkvdec-core: rcb_size 1048576
[ 3.534052] mpp_rkvdec2 fdc38100.rkvdec-core: min_width 512
[ 3.534066] mpp_rkvdec2 fdc38100.rkvdec-core: rcb_info_count 20
[ 3.534078] mpp_rkvdec2 fdc38100.rkvdec-core: [136, 24576]
[ 3.534091] mpp_rkvdec2 fdc38100.rkvdec-core: [137, 49152]
[ 3.534103] mpp_rkvdec2 fdc38100.rkvdec-core: [141, 90112]
[ 3.534116] mpp_rkvdec2 fdc38100.rkvdec-core: [140, 49152]
[ 3.534128] mpp_rkvdec2 fdc38100.rkvdec-core: [139, 180224]
[ 3.534140] mpp_rkvdec2 fdc38100.rkvdec-core: [133, 49152]
[ 3.534152] mpp_rkvdec2 fdc38100.rkvdec-core: [134, 8192]
[ 3.534164] mpp_rkvdec2 fdc38100.rkvdec-core: [135, 4352]
[ 3.534176] mpp_rkvdec2 fdc38100.rkvdec-core: [138, 13056]
[ 3.534188] mpp_rkvdec2 fdc38100.rkvdec-core: [142, 291584]
[ 3.534255] mpp_rkvdec2 fdc38100.rkvdec-core: probing finish
[ 3.534529] mpp_rkvdec2 fdc48100.rkvdec-core: Adding to iommu group 13
[ 3.535036] mpp_rkvdec2 fdc48100.rkvdec-core: rkvdec-core, probing start
[ 3.535335] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_a is not found!
[ 3.535351] rkvdec2_init:1250: No niu aclk reset resource define
[ 3.535365] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_h is not found!
[ 3.535376] rkvdec2_init:1253: No niu hclk reset resource define
[ 3.535453] mpp_rkvdec2 fdc48100.rkvdec-core: no regulator, devfreq is disabled
[ 3.535550] mpp_rkvdec2 fdc48100.rkvdec-core: core_mask=00020002
[ 3.535582] mpp_rkvdec2 fdc48100.rkvdec-core: attach ccu as core 1
[ 3.535903] mpp_rkvdec2 fdc48100.rkvdec-core: sram_start 0x00000000ff079000
[ 3.535919] mpp_rkvdec2 fdc48100.rkvdec-core: rcb_iova 0x00000000ffe00000
[ 3.535932] mpp_rkvdec2 fdc48100.rkvdec-core: sram_size 487424
[ 3.535943] mpp_rkvdec2 fdc48100.rkvdec-core: rcb_size 1048576
[ 3.535958] mpp_rkvdec2 fdc48100.rkvdec-core: min_width 512
[ 3.535973] mpp_rkvdec2 fdc48100.rkvdec-core: rcb_info_count 20
[ 3.535985] mpp_rkvdec2 fdc48100.rkvdec-core: [136, 24576]
[ 3.535997] mpp_rkvdec2 fdc48100.rkvdec-core: [137, 49152]
[ 3.536009] mpp_rkvdec2 fdc48100.rkvdec-core: [141, 90112]
[ 3.536021] mpp_rkvdec2 fdc48100.rkvdec-core: [140, 49152]
[ 3.536033] mpp_rkvdec2 fdc48100.rkvdec-core: [139, 180224]
[ 3.536045] mpp_rkvdec2 fdc48100.rkvdec-core: [133, 49152]
[ 3.536057] mpp_rkvdec2 fdc48100.rkvdec-core: [134, 8192]
[ 3.536069] mpp_rkvdec2 fdc48100.rkvdec-core: [135, 4352]
[ 3.536081] mpp_rkvdec2 fdc48100.rkvdec-core: [138, 13056]
[ 3.536093] mpp_rkvdec2 fdc48100.rkvdec-core: [142, 291584]
[ 3.536160] mpp_rkvdec2 fdc48100.rkvdec-core: probing finish
[ 3.536483] mpp_rkvenc2 fdbd0000.rkvenc-core: Adding to iommu group 10
[ 3.536808] mpp_rkvenc2 fdbd0000.rkvenc-core: probing start
[ 3.537126] mpp_rkvenc2 fdbd0000.rkvenc-core: no pvtpll
[ 3.537678] mpp_rkvenc2 fdbd0000.rkvenc-core: bin=0
[ 3.537929] mpp_rkvenc2 fdbd0000.rkvenc-core: leakage=11
[ 3.537989] mpp_rkvenc2 fdbd0000.rkvenc-core: leakage-volt-sel=0
[ 3.539113] mpp_rkvenc2 fdbd0000.rkvenc-core: avs=0
[ 3.539148] mpp_rkvenc2 fdbd0000.rkvenc-core: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0 h_table=0
[ 3.539457] mpp_rkvenc2 fdbd0000.rkvenc-core: attach ccu as core 0
[ 3.539523] mpp_rkvenc2 fdbd0000.rkvenc-core: probing finish
[ 3.539850] mpp_rkvenc2 fdbe0000.rkvenc-core: Adding to iommu group 11
[ 3.540208] mpp_rkvenc2 fdbe0000.rkvenc-core: probing start
[ 3.540507] mpp_rkvenc2 fdbe0000.rkvenc-core: no pvtpll
[ 3.540973] mpp_rkvenc2 fdbe0000.rkvenc-core: bin=0
[ 3.541172] mpp_rkvenc2 fdbe0000.rkvenc-core: leakage=11
[ 3.541204] mpp_rkvenc2 fdbe0000.rkvenc-core: leakage-volt-sel=0
[ 3.542497] mpp_rkvenc2 fdbe0000.rkvenc-core: avs=0
[ 3.542529] mpp_rkvenc2 fdbe0000.rkvenc-core: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0 h_table=0
[ 3.542802] mpp_rkvenc2 fdbe0000.rkvenc-core: attach ccu as core 1
[ 3.542860] mpp_rkvenc2 fdbe0000.rkvenc-core: probing finish
[ 3.543177] mpp_av1dec fdc70000.av1d: Adding to iommu group 14
[ 3.543669] mpp_av1dec fdc70000.av1d: probing start
[ 3.544051] mpp_av1dec fdc70000.av1d: probing finish
[ 3.544435] rockchip-vop2 fdd90000.vop: Adding to iommu group 17
[ 3.546119] rockchip-vop2 fdd90000.vop: [drm:vop2_bind] vp0 assign plane mask: Cluster0 | Cluster1 | Esmart0[0x7], primary plane phy id: Cluster0[0]
[ 3.546156] rockchip-vop2 fdd90000.vop: [drm:vop2_bind] vp1 assign plane mask: Esmart1 | Cluster2 | Esmart2[0x148], primary plane phy id: Cluster2[6]
[ 3.546181] rockchip-vop2 fdd90000.vop: [drm:vop2_bind] vp2 assign plane mask: Cluster3 | Esmart3[0x280], primary plane phy id: Esmart3[9]
[ 3.546204] rockchip-vop2 fdd90000.vop: [drm:vop2_bind] vp3 assign plane mask: [0x0], primary plane phy id: INVALID[-1]
[ 3.546500] rockchip-vop2 fdd90000.vop: [drm:vop2_bind] Esmart0-win0 as cursor plane for vp0
[ 3.546672] rockchip-vop2 fdd90000.vop: [drm:vop2_bind] Esmart1-win0 as cursor plane for vp1
[ 3.546836] rockchip-vop2 fdd90000.vop: [drm:vop2_bind] Cluster3-win0 as cursor plane for vp2
[ 3.573332] <<GTP-ERR>>[_do_i2c_write:434] I2c transfer error! (-6)
[ 3.573349] <<GTP-ERR>>[gt1x_init:2344] Reset guitar failed!
[ 3.573358] <<GTP-INF>>[gt1x_reset_guitar:807] GTP RESET!
[ 3.578428] rockchip-vop2 fdd90000.vop: no pvtpll
[ 3.578449] rockchip-vop2 fdd90000.vop: bin=0
[ 3.578681] rockchip-vop2 fdd90000.vop: leakage=27
[ 3.578703] rockchip-vop2 fdd90000.vop: leakage-volt-sel=0
[ 3.579437] rockchip-vop2 fdd90000.vop: avs=0
[ 3.579572] rockchip-vop2 fdd90000.vop: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0 h_table=0
[ 3.579966] rockchip-vop2 fdd90000.vop: Supported VOP aclk dvfs, normal mode:500000000, reset mode:0, advanced mode:750000000
[ 3.580012] rockchip-drm display-subsystem: bound fdd90000.vop (ops 0xffffffc00938dc10)
[ 3.581409] dwhdmi-rockchip fde80000.hdmi: registered ddc I2C bus driver
[ 3.582045] rockchip-drm display-subsystem: bound fde80000.hdmi (ops 0xffffffc0093a55b0)
[ 3.583231] dwhdmi-rockchip fdea0000.hdmi: registered ddc I2C bus driver
[ 3.584186] rockchip-drm display-subsystem: bound fdea0000.hdmi (ops 0xffffffc0093a55b0)
[ 3.584263] rockchip-drm display-subsystem: bound fde30000.dsi (ops 0xffffffc0093a7fb8)
[ 3.584859] rockchip-drm display-subsystem: bound fde50000.dp (ops 0xffffffc0093a8530)
[ 3.587472] dw-hdmi-qp-hdcp dw-hdmi-qp-hdcp.9.auto: dw_hdcp_qp_hdcp_probe success
[ 3.588059] dw-hdmi-qp-hdcp dw-hdmi-qp-hdcp.12.auto: dw_hdcp_qp_hdcp_probe success
[ 3.588647] [drm] Initialized rockchip 4.0.0 20140818 for display-subsystem on minor 0
[ 3.588725] rockchip-drm display-subsystem: route-dsi1: failed to get logo,offset
[ 3.629834] rk-pcie fe170000.pcie: can't get current limit.
[ 3.630405] rk-pcie fe170000.pcie: host bridge /pcie@fe170000 ranges:
[ 3.630446] rk-pcie fe170000.pcie: IO 0x00f2100000..0x00f21fffff -> 0x00f2100000
[ 3.630474] rk-pcie fe170000.pcie: MEM 0x00f2200000..0x00f2ffffff -> 0x00f2200000
[ 3.630495] rk-pcie fe170000.pcie: MEM 0x0980000000..0x09bfffffff -> 0x0980000000
[ 3.630560] rk-pcie fe170000.pcie: iATU unroll: enabled
[ 3.630574] rk-pcie fe170000.pcie: iATU regions: 8 ob, 8 ib, align 64K, limit 8G
[ 3.643406] <<GTP-ERR>>[_do_i2c_write:434] I2c transfer error! (-6)
[ 3.643436] <<GTP-ERR>>[gt1x_init:2344] Reset guitar failed!
[ 3.643449] <<GTP-ERR>>[gt1x_init:2370] Init failed, use default setting
[ 3.643779] <<GTP-ERR>>[_do_i2c_read:392] I2c Transfer error! (-6)
[ 3.643803] <<GTP-ERR>>[gt1x_get_chip_type:915] I2c communication error.
[ 3.643816] <<GTP-ERR>>[gt1x_init:2380] Get chip type failed!
[ 3.644146] <<GTP-ERR>>[_do_i2c_read:392] I2c Transfer error! (-6)
[ 3.644171] <<GTP-ERR>>[gt1x_read_version:864] Read version failed!
[ 3.690906] Console: switching to colour frame buffer device 240x67
[ 3.707604] rockchip-drm display-subsystem: [drm] fb0: rockchipdrmfb frame buffer device
[ 3.707984] rockchip-drm display-subsystem: [drm] run display error_event monitor
[ 3.709149] panthor fb000000.gpu: [drm] clock rate = 198000000
[ 3.711355] panthor fb000000.gpu: EM: created perf domain
[ 3.711952] panthor fb000000.gpu: [drm] mali-g610 id 0xa867 major 0x0 minor 0x0 status 0x5
[ 3.711976] panthor fb000000.gpu: [drm] Features: L2:0x7120306 Tiler:0x809 Mem:0x301 MMU:0x2830 AS:0xff
[ 3.711993] panthor fb000000.gpu: [drm] shader_present=0x50005 l2_present=0x1 tiler_present=0x1
[ 3.713028] rk-pcie fe180000.pcie: can't get current limit.
[ 3.713520] rk-pcie fe180000.pcie: host bridge /pcie@fe180000 ranges:
[ 3.713560] rk-pcie fe180000.pcie: IO 0x00f3100000..0x00f31fffff -> 0x00f3100000
[ 3.713587] rk-pcie fe180000.pcie: MEM 0x00f3200000..0x00f3ffffff -> 0x00f3200000
[ 3.713608] rk-pcie fe180000.pcie: MEM 0x09c0000000..0x09ffffffff -> 0x09c0000000
[ 3.713675] rk-pcie fe180000.pcie: iATU unroll: enabled
[ 3.713688] rk-pcie fe180000.pcie: iATU regions: 8 ob, 8 ib, align 64K, limit 8G
[ 3.714474] panthor fb000000.gpu: [drm] Firmware protected mode entry not be supported, ignoring
[ 3.714934] panthor fb000000.gpu: [drm] CSF FW v1.5.0, Features 0x0 Instrumentation features 0x71
[ 3.715806] [drm] Initialized panthor 1.0.0 20230801 for fb000000.gpu on minor 1
[ 3.718716] dwmmc_rockchip fe2c0000.mmc: No normal pinctrl state
[ 3.718740] dwmmc_rockchip fe2c0000.mmc: No idle pinctrl state
[ 3.718818] dwmmc_rockchip fe2c0000.mmc: IDMAC supports 32-bit address mode.
[ 3.718861] dwmmc_rockchip fe2c0000.mmc: Using internal DMA controller.
[ 3.718877] dwmmc_rockchip fe2c0000.mmc: Version ID is 270a
[ 3.718925] dwmmc_rockchip fe2c0000.mmc: DW MMC controller at irq 141,32 bit host data width,256 deep fifo
[ 3.722421] input: realtek,rt5616-codec Headphone Jack as /devices/platform/rt5616-sound/sound/card1/input3
[ 3.725532] debugfs: File 'Capture' in directory 'dapm' already present!
[ 3.729917] rkcif rkcif-mipi-lvds2: clear unready subdev num: 1
[ 3.730795] rkcif-mipi-lvds2: rkcif_update_sensor_info: stream[0] get remote terminal sensor failed!
[ 3.730824] rkcif-mipi-lvds2: Async subdev notifier completed
[ 3.730848] rkcif-mipi-lvds2: There is not terminal subdev, not synchronized with ISP
[ 3.730944] rkcif-mipi-lvds2: There is not terminal subdev, not synchronized with ISP
[ 3.731412] clk: Disabling unused clocks
[ 3.732530] rockchip-pm rockchip-suspend: not set pwm-regulator-config
[ 3.733008] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 3.733056] rockchip-suspend not set sleep-mode-config for mem-lite
[ 3.733069] rockchip-suspend not set wakeup-config for mem-lite
[ 3.733083] rockchip-suspend not set sleep-mode-config for mem-ultra
[ 3.733093] rockchip-suspend not set wakeup-config for mem-ultra
[ 3.734478] rkisp rkisp0-vir0: clear unready subdev num: 1
[ 3.734772] rkisp0-vir0: Async subdev notifier completed
[ 3.734798] ALSA device list:
[ 3.734808] #0: rockchip,hdmiin
[ 3.734821] #1: realtek,rt5616-codec
[ 3.734830] #2: rockchip,hdmi0
[ 3.734839] #3: rockchip,dp0
[ 3.734848] #4: rockchip,hdmi1
[ 3.749928] <<GTP-ERR>>[_do_i2c_read:392] I2c Transfer error! (-6)
[ 3.749957] <<GTP-ERR>>[gt1x_read_version:864] Read version failed!
[ 3.783081] rk-pcie fe190000.pcie: PCIe Link up, LTSSM is 0x130011
[ 3.783112] rk-pcie fe190000.pcie: PCIe Gen.2 x1 link up
[ 3.783258] rk-pcie fe190000.pcie: PCI host bridge to bus 0004:40
[ 3.783275] pci_bus 0004:40: root bus resource [bus 40-4f]
[ 3.783293] pci_bus 0004:40: root bus resource [io 0x100000-0x1fffff] (bus address [0xf4100000-0xf41fffff])
[ 3.783308] pci_bus 0004:40: root bus resource [mem 0xf4200000-0xf4ffffff]
[ 3.783321] pci_bus 0004:40: root bus resource [mem 0xa00000000-0xa3fffffff pref]
[ 3.783359] pci 0004:40:00.0: [1d87:3588] type 01 class 0x060400
[ 3.783388] pci 0004:40:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[ 3.783452] pci 0004:40:00.0: supports D1 D2
[ 3.783464] pci 0004:40:00.0: PME# supported from D0 D1 D3hot
[ 3.797857] pci 0004:40:00.0: Primary bus is hard wired to 0
[ 3.797877] pci 0004:40:00.0: bridge configuration invalid ([bus 01-ff]), reconfiguring
[ 3.798068] pci 0004:41:00.0: [10ec:8125] type 00 class 0x020000
[ 3.798142] pci 0004:41:00.0: reg 0x10: [io 0x0000-0x00ff]
[ 3.798228] pci 0004:41:00.0: reg 0x18: [mem 0x00000000-0x0000ffff 64bit]
[ 3.798287] pci 0004:41:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit]
[ 3.798726] pci 0004:41:00.0: supports D1 D2
[ 3.798738] pci 0004:41:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 3.806460] pci_bus 0004:41: busn_res: [bus 41-4f] end is updated to 41
[ 3.806510] pci 0004:40:00.0: BAR 8: assigned [mem 0xf4200000-0xf42fffff]
[ 3.806531] pci 0004:40:00.0: BAR 6: assigned [mem 0xf4300000-0xf430ffff pref]
[ 3.806547] pci 0004:40:00.0: BAR 7: assigned [io 0x100000-0x100fff]
[ 3.806566] pci 0004:41:00.0: BAR 2: assigned [mem 0xf4200000-0xf420ffff 64bit]
[ 3.806617] pci 0004:41:00.0: BAR 4: assigned [mem 0xf4210000-0xf4213fff 64bit]
[ 3.806666] pci 0004:41:00.0: BAR 0: assigned [io 0x100000-0x1000ff]
[ 3.806691] pci 0004:40:00.0: PCI bridge to [bus 41]
[ 3.806704] pci 0004:40:00.0: bridge window [io 0x100000-0x100fff]
[ 3.806718] pci 0004:40:00.0: bridge window [mem 0xf4200000-0xf42fffff]
[ 3.808951] pcieport 0004:40:00.0: PME: Signaling with IRQ 152
[ 3.856808] <<GTP-ERR>>[_do_i2c_read:392] I2c Transfer error! (-6)
[ 3.856840] <<GTP-ERR>>[gt1x_read_version:864] Read version failed!
[ 3.886306] rk-pcie fe170000.pcie: PCIe Link up, LTSSM is 0x130011
[ 3.886363] rk-pcie fe170000.pcie: PCIe Gen.2 x1 link up
[ 3.886668] rk-pcie fe170000.pcie: PCI host bridge to bus 0002:20
[ 3.886711] pci_bus 0002:20: root bus resource [bus 20-2f]
[ 3.886751] pci_bus 0002:20: root bus resource [io 0x200000-0x2fffff] (bus address [0xf2100000-0xf21fffff])
[ 3.886786] pci_bus 0002:20: root bus resource [mem 0xf2200000-0xf2ffffff]
[ 3.886819] pci_bus 0002:20: root bus resource [mem 0x980000000-0x9bfffffff pref]
[ 3.886895] pci 0002:20:00.0: [1d87:3588] type 01 class 0x060400
[ 3.886962] pci 0002:20:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[ 3.887097] pci 0002:20:00.0: supports D1 D2
[ 3.887128] pci 0002:20:00.0: PME# supported from D0 D1 D3hot
[ 3.913412] pci 0002:20:00.0: Primary bus is hard wired to 0
[ 3.913463] pci 0002:20:00.0: bridge configuration invalid ([bus 01-ff]), reconfiguring
[ 3.913882] pci 0002:21:00.0: [10ec:8125] type 00 class 0x020000
[ 3.914003] pci 0002:21:00.0: reg 0x10: [io 0x0000-0x00ff]
[ 3.914134] pci 0002:21:00.0: reg 0x18: [mem 0x00000000-0x0000ffff 64bit]
[ 3.914230] pci 0002:21:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit]
[ 3.914854] pci 0002:21:00.0: supports D1 D2
[ 3.914887] pci 0002:21:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 3.923212] pci_bus 0002:21: busn_res: [bus 21-2f] end is updated to 21
[ 3.923303] pci 0002:20:00.0: BAR 8: assigned [mem 0xf2200000-0xf22fffff]
[ 3.923347] pci 0002:20:00.0: BAR 6: assigned [mem 0xf2300000-0xf230ffff pref]
[ 3.923387] pci 0002:20:00.0: BAR 7: assigned [io 0x200000-0x200fff]
[ 3.923433] pci 0002:21:00.0: BAR 2: assigned [mem 0xf2200000-0xf220ffff 64bit]
[ 3.923522] pci 0002:21:00.0: BAR 4: assigned [mem 0xf2210000-0xf2213fff 64bit]
[ 3.923607] pci 0002:21:00.0: BAR 0: assigned [io 0x200000-0x2000ff]
[ 3.923659] pci 0002:20:00.0: PCI bridge to [bus 21]
[ 3.923691] pci 0002:20:00.0: bridge window [io 0x200000-0x200fff]
[ 3.923726] pci 0002:20:00.0: bridge window [mem 0xf2200000-0xf22fffff]
[ 3.929186] pcieport 0002:20:00.0: PME: Signaling with IRQ 162
[ 3.963196] <<GTP-INF>>[gt1x_read_version:883] IC VERSION:GT_000000(Patch)_0000(Mask)_00(SensorID)
[ 3.963267] <<GTP-INF>>[gt1x_init_panel:608] Config group0 used, length:239
[ 3.963698] <<GTP-ERR>>[_do_i2c_read:392] I2c Transfer error! (-6)
[ 3.963741] <<GTP-ERR>>[gt1x_init_panel:642] Failed to read CONFIG data, sensor_id 0
[ 3.963770] <<GTP-ERR>>[gt1x_init:2392] Init panel failed.
[ 3.964388] <<GTP-ERR>>[gt1x_ts_probe:573] GTP init failed!!!
[ 3.964431] Goodix-TS-GT1X: probe of 4-0014 failed with error -2147483644
[ 3.969818] rk-pcie fe180000.pcie: PCIe Link up, LTSSM is 0x30011
[ 3.969878] rk-pcie fe180000.pcie: PCIe Gen.1 x1 link up
[ 3.970177] Freeing unused kernel memory: 6400K
[ 3.970207] rk-pcie fe180000.pcie: PCI host bridge to bus 0003:30
[ 3.970258] pci_bus 0003:30: root bus resource [bus 30-3f]
[ 3.970300] pci_bus 0003:30: root bus resource [io 0x300000-0x3fffff] (bus address [0xf3100000-0xf31fffff])
[ 3.970336] pci_bus 0003:30: root bus resource [mem 0xf3200000-0xf3ffffff]
[ 3.970370] pci_bus 0003:30: root bus resource [mem 0x9c0000000-0x9ffffffff pref]
[ 3.970434] Run /init as init process
[ 3.970452] pci 0003:30:00.0: [1d87:3588] type 01 class 0x060400
[ 3.970515] pci 0003:30:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[ 3.970660] pci 0003:30:00.0: supports D1 D2
[ 3.970690] pci 0003:30:00.0: PME# supported from D0 D1 D3hot
Loading, please wait...
[ 3.997973] pci 0003:30:00.0: Primary bus is hard wired to 0
[ 3.998041] pci 0003:30:00.0: bridge configuration invalid ([bus 01-ff]), reconfiguring
[ 3.998461] pci 0003:31:00.0: [10ec:c822] type 00 class 0x028000
[ 3.998601] pci 0003:31:00.0: reg 0x10: [io 0x0000-0x00ff]
[ 3.998756] pci 0003:31:00.0: reg 0x18: [mem 0x00000000-0x0000ffff 64bit]
[ 3.999433] pci 0003:31:00.0: supports D1 D2
[ 3.999464] pci 0003:31:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 4.009992] pci_bus 0003:31: busn_res: [bus 31-3f] end is updated to 31
[ 4.010101] pci 0003:30:00.0: BAR 8: assigned [mem 0xf3200000-0xf32fffff]
[ 4.010146] pci 0003:30:00.0: BAR 6: assigned [mem 0xf3300000-0xf330ffff pref]
[ 4.010186] pci 0003:30:00.0: BAR 7: assigned [io 0x300000-0x300fff]
[ 4.010231] pci 0003:31:00.0: BAR 2: assigned [mem 0xf3200000-0xf320ffff 64bit]
[ 4.010331] pci 0003:31:00.0: BAR 0: assigned [io 0x300000-0x3000ff]
[ 4.010386] pci 0003:30:00.0: PCI bridge to [bus 31]
[ 4.010419] pci 0003:30:00.0: bridge window [io 0x300000-0x300fff]
[ 4.010455] pci 0003:30:00.0: bridge window [mem 0xf3200000-0xf32fffff]
[ 4.015988] pcieport 0003:30:00.0: PME: Signaling with IRQ 172
[ 4.049668] usb 1-1: new low-speed USB device number 2 using xhci-hcd
Starting systemd-udevd version 255.4-1ubuntu8.4
[ 4.194875] usb 1-1: New USB device found, idVendor=1a2c, idProduct=4d7e, bcdDevice= 1.10
[ 4.194907] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4.194929] usb 1-1: Product: USB Keyboard
[ 4.194939] usb 1-1: Manufacturer: SEMICO
[ 4.220459] input: SEMICO USB Keyboard as /devices/platform/usbdrd3_1/fc400000.usb/xhci-hcd.3.auto/usb1/1-1/1-1:1.0/0003:1A2C:4D7E.0001/input/input4
[ 4.256626] xhci-hcd xhci-hcd.14.auto: xHCI Host Controller
[ 4.256668] xhci-hcd xhci-hcd.14.auto: new USB bus registered, assigned bus number 7
[ 4.256779] xhci-hcd xhci-hcd.14.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000808002010010
[ 4.256814] xhci-hcd xhci-hcd.14.auto: irq 102, io mem 0xfc000000
[ 4.256913] xhci-hcd xhci-hcd.14.auto: xHCI Host Controller
[ 4.256926] xhci-hcd xhci-hcd.14.auto: new USB bus registered, assigned bus number 8
[ 4.256937] xhci-hcd xhci-hcd.14.auto: Host supports USB 3.0 SuperSpeed
[ 4.257041] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[ 4.257052] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.257059] usb usb7: Product: xHCI Host Controller
[ 4.257067] usb usb7: Manufacturer: Linux 6.1.118 xhci-hcd
[ 4.257074] usb usb7: SerialNumber: xhci-hcd.14.auto
[ 4.257465] hub 7-0:1.0: USB hub found
[ 4.257493] hub 7-0:1.0: 1 port detected
[ 4.257759] usb usb8: We don't know the algorithms for LPM for this host, disabling LPM.
[ 4.257836] usb usb8: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.01
[ 4.257846] usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.257854] usb usb8: Product: xHCI Host Controller
[ 4.257861] usb usb8: Manufacturer: Linux 6.1.118 xhci-hcd
[ 4.257868] usb usb8: SerialNumber: xhci-hcd.14.auto
[ 4.258333] hub 8-0:1.0: USB hub found
[ 4.258358] hub 8-0:1.0: 1 port detected
[ 4.280374] hid-generic 0003:1A2C:4D7E.0001: input,hidraw0: USB HID v1.10 Keyboard [SEMICO USB Keyboard] on usb-xhci-hcd.3.auto-1/input0
[ 4.289095] input: SEMICO USB Keyboard Consumer Control as /devices/platform/usbdrd3_1/fc400000.usb/xhci-hcd.3.auto/usb1/1-1/1-1:1.1/0003:1A2C:4D7E.0002/input/input5
[ 4.343284] input: SEMICO USB Keyboard System Control as /devices/platform/usbdrd3_1/fc400000.usb/xhci-hcd.3.auto/usb1/1-1/1-1:1.1/0003:1A2C:4D7E.0002/input/input6
[ 4.343636] input: SEMICO USB Keyboard as /devices/platform/usbdrd3_1/fc400000.usb/xhci-hcd.3.auto/usb1/1-1/1-1:1.1/0003:1A2C:4D7E.0002/input/input8
[ 4.344062] hid-generic 0003:1A2C:4D7E.0002: input,hiddev96,hidraw1: USB HID v1.10 Keyboard [SEMICO USB Keyboard] on usb-xhci-hcd.3.auto-1/input1
[ 4.462956] usb 4-1: new full-speed USB device number 2 using ohci-platform
[ 4.506389] usb 7-1: new high-speed USB device number 2 using xhci-hcd
[ 4.647841] usb 7-1: New USB device found, idVendor=14cd, idProduct=8601, bcdDevice= 0.00
[ 4.647875] usb 7-1: New USB device strings: Mfr=1, Product=3, SerialNumber=0
[ 4.647890] usb 7-1: Product: USB 2.0 Hub
[ 4.647902] usb 7-1: Manufacturer: USB Device
[ 4.672752] usb 4-1: New USB device found, idVendor=0bda, idProduct=c822, bcdDevice= 0.00
[ 4.672782] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4.672797] usb 4-1: Product: Bluetooth Radio
[ 4.672810] usb 4-1: Manufacturer: Realtek
[ 4.672822] usb 4-1: SerialNumber: 00e04c000001
[ 4.673202] Freeing drm_logo memory: 3000K
[ 4.705486] hub 7-1:1.0: USB hub found
[ 4.705675] hub 7-1:1.0: 4 ports detected
[ 4.986462] usb 7-1.1: new full-speed USB device number 3 using xhci-hcd
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... [ 5.081911] usb 7-1.1: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=24.11
[ 5.081975] usb 7-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5.082010] usb 7-1.1: Product: USB Receiver
[ 5.082040] usb 7-1.1: Manufacturer: Logitech
Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
[ 5.191713] input: Logitech USB Receiver as /devices/platform/usbdrd3_0/fc000000.usb/xhci-hcd.14.auto/usb7/7-1/7-1.1/7-1.1:1.0/0003:046D:C52B.0003/input/input9
done.
[ 5.248569] hid-generic 0003:046D:C52B.0003: input,hidraw2: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-xhci-hcd.14.auto-1.1/input0
[ 5.256400] input: Logitech USB Receiver Mouse as /devices/platform/usbdrd3_0/fc000000.usb/xhci-hcd.14.auto/usb7/7-1/7-1.1/7-1.1:1.1/0003:046D:C52B.0004/input/input10
[ 5.258096] input: Logitech USB Receiver Consumer Control as /devices/platform/usbdrd3_0/fc000000.usb/xhci-hcd.14.auto/usb7/7-1/7-1.1/7-1.1:1.1/0003:046D:C52B.0004/input/input11
[ 5.272143] EXT4-fs (mmcblk2p8): mounted filesystem with ordered data mode. Quota mode: none.
Begin: Will now check userdata file system ... fsck from util-linux 2.39.3
[ 5.317509] input: Logitech USB Receiver System Control as /devices/platform/usbdrd3_0/fc000000.usb/xhci-hcd.14.auto/usb7/7-1/7-1.1/7-1.1:1.1/0003:046D:C52B.0004/input/input12
[ 5.318914] hid-generic 0003:046D:C52B.0004: input,hiddev97,hidraw3: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-xhci-hcd.14.auto-1.1/input1
[ 5.325331] hid-generic 0003:046D:C52B.0005: hiddev98,hidraw4: USB HID v1.11 Device [Logitech USB Receiver] on usb-xhci-hcd.14.auto-1.1/input2
[/usr/sbin/fsck.ext4 (1) -- /dev/mmcblk2p9] fsck.ext4 -a -C0 /dev/mmcblk2p9
userdata: recovering journal
userdata: clean, 611/11558400 files, 804932/59167739 blocks
done.
[ 5.450410] EXT4-fs (mmcblk2p9): mounted filesystem with ordered data mode. Quota mode: none.
[ 5.457357] EXT4-fs (mmcblk2p9): re-mounted. Quota mode: none.
[ 5.464565] overlayfs: "xino" feature enabled using 32 upper inode bits.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... [ 5.484930] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_cancel_cpu_limit_freq freq qos nod add
done.
[ 5.510811] rk-pcie fe150000.pcie: PCIe Link Fail, LTSSM is 0x1, hw_retries=0
[ 5.510849] rk-pcie fe150000.pcie: failed to initialize host
[ 5.536418] usb 7-1.4: new high-speed USB device number 4 using xhci-hcd
[ 5.628589] usb 7-1.4: New USB device found, idVendor=0781, idProduct=5590, bcdDevice= 1.00
[ 5.628644] usb 7-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5.628668] usb 7-1.4: Product: Ultra
[ 5.628688] usb 7-1.4: Manufacturer: SanDisk
[ 5.628708] usb 7-1.4: SerialNumber: 4C530001070919110411
[ 5.630723] usb-storage 7-1.4:1.0: USB Mass Storage device detected
[ 5.631771] scsi host0: usb-storage 7-1.4:1.0
[ 5.693156] systemd[1]: systemd 255.4-1ubuntu8.10 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[ 5.693206] systemd[1]: Detected architecture arm64.
Welcome to Ubuntu 24.04.3 LTS!
[ 5.695931] systemd[1]: Hostname set to <NanoPC-T6>.
[ 5.851476] systemd[1]: Configuration file /run/systemd/system/netplan-ovs-cleanup.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
[ 5.983737] systemd[1]: Configuration file /usr/lib/systemd/system/rkaiq_3A.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.
[ 6.000920] systemd[1]: /etc/systemd/system/rc-local.service:11: Support for option SysVStartPriority= has been removed and it is ignored
[ 6.019367] systemd[1]: Queued start job for default target graphical.target.
[ 6.028665] systemd[1]: Unnecessary job was removed for sys-subsystem-net-devices-eth1.device - /sys/subsystem/net/devices/eth1.
[ 6.029716] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe.
[ OK ] Created slice system-modprobe.slice - Slice /system/modprobe.
[ 6.030350] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty.
[ OK ] Created slice system-serial\x2dget…slice - Slice /system/serial-getty.
[ 6.030681] systemd[1]: Created slice user.slice - User and Session Slice.
[ OK ] Created slice user.slice - User and Session Slice.
[ 6.030812] systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch.
[ OK ] Started systemd-ask-password-conso…equests to Console Directory Watch.
[ 6.030907] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch.
[ OK ] Started systemd-ask-password-wall.…d Requests to Wall Directory Watch.
[ 6.031190] systemd[1]: Set up automount proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point.
[ OK ] Set up automount proc-sys-fs-binfm…ormats File System Automount Point.
[ 6.031260] systemd[1]: Expecting device dev-ttyFIQ0.device - /dev/ttyFIQ0...
Expecting device dev-ttyFIQ0.device - /dev/ttyFIQ0...
[ 6.031310] systemd[1]: Reached target cryptsetup.target - Local Encrypted Volumes.
[ OK ] Reached target cryptsetup.target - Local Encrypted Volumes.
[ 6.031361] systemd[1]: Reached target integritysetup.target - Local Integrity Protected Volumes.
[ OK ] Reached target integritysetup.targ… Local Integrity Protected Volumes.
[ 6.031414] systemd[1]: Reached target nss-user-lookup.target - User and Group Name Lookups.
[ OK ] Reached target nss-user-lookup.target - User and Group Name Lookups.
[ 6.031458] systemd[1]: Reached target remote-fs.target - Remote File Systems.
[ OK ] Reached target remote-fs.target - Remote File Systems.
[ 6.031498] systemd[1]: Reached target slices.target - Slice Units.
[ OK ] Reached target slices.target - Slice Units.
[ 6.031544] systemd[1]: Reached target swap.target - Swaps.
[ OK ] Reached target swap.target - Swaps.
[ 6.031602] systemd[1]: Reached target veritysetup.target - Local Verity Protected Volumes.
[ OK ] Reached target veritysetup.target - Local Verity Protected Volumes.
[ 6.031835] systemd[1]: Listening on syslog.socket - Syslog Socket.
[ OK ] Listening on syslog.socket - Syslog Socket.
[ 6.031953] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe.
[ OK ] Listening on systemd-initctl.socke…- initctl Compatibility Named Pipe.
[ 6.032126] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log).
[ OK ] Listening on systemd-journald-dev-…socket - Journal Socket (/dev/log).
[ 6.032317] systemd[1]: Listening on systemd-journald.socket - Journal Socket.
[ OK ] Listening on systemd-journald.socket - Journal Socket.
[ 6.032390] systemd[1]: systemd-pcrextend.socket - TPM2 PCR Extension (Varlink) was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
[ OK ] Listening on systemd-udevd-control.socket - udev Control Socket.
[ 6.032604] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket.
[ OK ] Listening on systemd-udevd-kernel.socket - udev Kernel Socket.
[ 6.032758] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket.
Mounting dev-hugepages.mount - Huge Pages File System...
[ 6.034291] systemd[1]: Mounting dev-hugepages.mount - Huge Pages File System...
Mounting dev-mqueue.mount - POSIX Message Queue File System...
[ 6.035288] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System...
Mounting sys-kernel-debug.mount - Kernel Debug File System...
[ 6.036168] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System...
Mounting sys-kernel-tracing.mount - Kernel Trace File System...
[ 6.037243] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System...
Starting systemd-journald.service - Journal Service...
[ 6.039270] systemd[1]: Starting systemd-journald.service - Journal Service...
Starting keyboard-setup.service - Set the console keyboard layout...
[ 6.041387] systemd[1]: Starting keyboard-setup.service - Set the console keyboard layout...
Starting kmod-static-nodes.service…eate List of Static Device Nodes...
[ 6.042742] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes...
Starting [email protected] - Load Kernel Module configfs...
[ 6.043932] systemd[1]: Starting [email protected] - Load Kernel Module configfs...
Starting modprobe@dm_mod.service - Load Kernel Module dm_mod...
[ 6.045113] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module dm_mod...
Starting [email protected] - Load Kernel Module drm...
[ 6.051778] systemd[1]: Starting [email protected] - Load Kernel Module drm...
Starting modprobe@efi_pstore.servi… - Load Kernel Module efi_pstore...
[ 6.055054] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore...
Starting [email protected] - Load Kernel Module fuse...
[ 6.056464] systemd[1]: Starting [email protected] - Load Kernel Module fuse...
Starting [email protected] - Load Kernel Module loop...
[ 6.059428] systemd[1]: Starting [email protected] - Load Kernel Module loop...
Starting rkaiq_3A.service - Enable Rockchip camera engine rkaiq...
[ 6.062721] systemd[1]: Starting rkaiq_3A.service - Enable Rockchip camera engine rkaiq...
Starting systemd-modules-load.service - Load Kernel Modules...
[ 6.064972] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules...
Starting systemd-remount-fs.servic…unt Root and Kernel File Systems...
[ 6.065058] systemd[1]: systemd-pcrmachine.service - TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
Starting systemd-udev-trigger.service - Coldplug All udev Devices...
[ 6.066280] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
[ OK ] Mounted dev-hugepages.mount - Huge Pages File System.
[ 6.066567] systemd[1]: systemd-tpm2-setup-early.service - TPM2 SRK Setup (Early) was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
[ OK ] Mounted dev-mqueue.mount - POSIX Message Queue File System.
[ 6.068813] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices...
[ OK ] Mounted sys-kernel-debug.mount - Kernel Debug File System.
[ 6.072261] systemd[1]: Mounted dev-hugepages.mount - Huge Pages File System.
[ OK ] Mounted sys-kernel-tracing.mount - Kernel Trace File System.
[ 6.072722] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System.
[ OK ] Finished kmod-static-nodes.service…Create List of Static Device Nodes.
[ 6.073110] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System.
[ OK ] Finished [email protected] - Load Kernel Module configfs.
[ 6.073468] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System.
[ OK ] Finished modprobe@dm_mod.service - Load Kernel Module dm_mod.
[ 6.074168] systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes.
[ OK ] Finished [email protected] - Load Kernel Module drm.
[ 6.075243] systemd[1]: [email protected]: Deactivated successfully.
[ OK ] Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore.
[ 6.075675] systemd[1]: Finished [email protected] - Load Kernel Module configfs.
[ OK ] Finished [email protected] - Load Kernel Module fuse.
[ 6.076748] systemd[1]: modprobe@dm_mod.service: Deactivated successfully.
[ OK ] Finished [email protected] - Load Kernel Module loop.
[ 6.077170] systemd[1]: Finished modprobe@dm_mod.service - Load Kernel Module dm_mod.
[ OK ] Finished systemd-remount-fs.servic…mount Root and Kernel File Systems.
[ 6.078153] systemd[1]: [email protected]: Deactivated successfully.
Mounting sys-fs-fuse-connections.mount - FUSE Control File System...
[ 6.078572] systemd[1]: Finished [email protected] - Load Kernel Module drm.
Mounting sys-kernel-config.mount - Kernel Configuration File System...
[ 6.079488] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully.
Starting systemd-pstore.service - …form Persistent Storage Archival...
[ 6.079920] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore.
Starting systemd-random-seed.service - Load/Save OS Random Seed...
[ 6.080837] systemd[1]: [email protected]: Deactivated successfully.
Starting systemd-tmpfiles-setup-de… Device Nodes in /dev gracefully...
[ 6.081259] systemd[1]: Finished [email protected] - Load Kernel Module fuse.
[ OK ] Started rkaiq_3A.service - Enable Rockchip camera engine rkaiq.
[ 6.082141] systemd[1]: [email protected]: Deactivated successfully.
[ OK ] Mounted sys-fs-fuse-connections.mount - FUSE Control File System.
[ 6.082548] systemd[1]: Finished [email protected] - Load Kernel Module loop.
[ OK ] Mounted sys-kernel-config.mount - Kernel Configuration File System.
[ 6.083561] systemd[1]: Finished systemd-remount-fs.service - Remount Root and Kernel File Systems.
[ 6.084894] systemd-journald[309]: Collecting audit messages is disabled.
[ 6.086661] systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control File System...
[ 6.088625] systemd[1]: Mounting sys-kernel-config.mount - Kernel Configuration File System...
[ 6.093207] systemd[1]: systemd-hwdb-update.service - Rebuild Hardware Database was skipped because of an unmet condition check (ConditionNeedsUpdate=/etc).
[ 6.095698] systemd[1]: Starting systemd-pstore.service - Platform Persistent Storage Archival...
[ 6.097013] systemd[1]: Starting systemd-random-seed.service - Load/Save OS Random Seed...
[ 6.097128] systemd[1]: systemd-repart.service - Repartition Root Disk was skipped because no trigger condition checks were met.
[ 6.098326] systemd[1]: Starting systemd-tmpfiles-setup-dev-early.service - Create Static Device Nodes in /dev gracefully...
[ 6.098473] systemd[1]: systemd-tpm2-setup.service - TPM2 SRK Setup was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
[ 6.101882] systemd[1]: Started rkaiq_3A.service - Enable Rockchip camera engine rkaiq.
[ 6.103224] r8125: loading out-of-tree module taints kernel.
[ 6.104407] systemd[1]: Mounted sys-fs-fuse-connections.mount - FUSE Control File System.
[ 6.104848] r8125 2.5Gigabit Ethernet driver 9.010.01-NAPI loaded
[ 6.104858] systemd[1]: Mounted sys-kernel-config.mount - Kernel Configuration File System.
[ 6.104921] r8125 0004:41:00.0: enabling device (0000 -> 0003)
[ 6.122249] r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[ 6.124268] r8125 Copyright (C) 2022 Realtek NIC software team <[email protected]>
[ 6.124268] This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>.
[ OK ] Finished systemd-pstore.service - …atform Persistent Storage Archival.
[ 6.124268] This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>.
[ OK ] Finished systemd-random-seed.service - Load/Save OS Random Seed.
[ 6.124370] r8125 2.5Gigabit Ethernet driver 9.010.01-NAPI loaded
[ 6.124401] r8125 0002:21:00.0: enabling device (0000 -> 0003)
[ 6.133890] systemd[1]: Finished systemd-pstore.service - Platform Persistent Storage Archival.
[ 6.134915] systemd[1]: Finished systemd-random-seed.service - Load/Save OS Random Seed.
[ 6.142990] r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[ 6.145008] r8125 Copyright (C) 2022 Realtek NIC software team <[email protected]>
[ 6.145008] This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>.
[ 6.145008] This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>.
[ OK ] Finished systemd-modules-load.service - Load Kernel Modules.
[ 6.146542] systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules.
[ 6.149130] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables...
Starting systemd-sysctl.service - Apply Kernel Variables...
[ 6.152748] systemd[1]: Finished systemd-tmpfiles-setup-dev-early.service - Create Static Device Nodes in /dev gracefully.
[ OK ] Finished systemd-tmpfiles-setup-de…ic Device Nodes in /dev gracefully.
[ 6.153432] systemd[1]: systemd-sysusers.service - Create System Users was skipped because no trigger condition checks were met.
[ 6.155495] systemd[1]: Starting systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in /dev...
Starting systemd-tmpfiles-setup-de…eate Static Device Nodes in /dev...
[ 6.171800] systemd[1]: rkaiq_3A.service: Deactivated successfully.
[ 6.174559] systemd[1]: Finished keyboard-setup.service - Set the console keyboard layout.
[ OK ] Finished keyboard-setup.service - Set the console keyboard layout.
[ OK ] Finished systemd-sysctl.service - Apply Kernel Variables.
[ OK ] Finished systemd-tmpfiles-setup-de…Create Static Device Nodes in /dev.
[ OK ] Reached target local-fs-pre.target…Preparation for Local File Systems.
[ OK ] Reached target local-fs.target - Local File Systems.
[ OK ] Listening on systemd-sysext.socket…tension Image Management (Varlink).
Starting console-setup.service - Set console font and keymap...
Starting systemd-binfmt.service - Set Up Additional Binary Formats...
Starting systemd-udevd.service - R…ager for Device Events and Files...
[ OK ] Started systemd-journald.service - Journal Service.
[ OK ] Finished console-setup.service - Set console font and keymap.
Mounting proc-sys-fs-binfmt_misc.m…cutable File Formats File System...
Starting systemd-journal-flush.ser…sh Journal to Persistent Storage...
[ OK ] Mounted proc-sys-fs-binfmt_misc.mo…xecutable File Formats File System.
[ OK ] Finished systemd-binfmt.service - Set Up Additional Binary Formats.
[ OK ] Started systemd-udevd.service - Ru…anager for Device Events and Files.
[ OK ] Finished systemd-journal-flush.ser…lush Journal to Persistent Storage.
Starting systemd-tmpfiles-setup.se…e Volatile Files and Directories...
[ OK ] Finished systemd-udev-trigger.service - Coldplug All udev Devices.
[ OK ] Finished systemd-tmpfiles-setup.se…ate Volatile Files and Directories.
[ OK ] Found device dev-ttyFIQ0.device - /dev/ttyFIQ0.
Starting ifupdown-pre.service - He…synchronize boot up for ifupdown...
Starting systemd-resolved.service - Network Name Resolution...
Starting systemd-timesyncd.service - Network Time Synchronization...
Starting systemd-update-utmp.servi…ord System Boot/Shutdown in UTMP...
[ OK ] Finished ifupdown-pre.service - He…o synchronize boot up for ifupdown.
[ OK ] Finished systemd-update-utmp.servi…ecord System Boot/Shutdown in UTMP.
Starting networking.service - Raise network interfaces...
[ OK ] Started systemd-timesyncd.service - Network Time Synchronization.
[ OK ] Reached target time-set.target - System Time Set.
[ 6.493146] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdab0000-0xfdabffff]
[ 6.493162] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdac0000-0xfdacffff]
[ 6.493199] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdad0000-0xfdadffff]
[ 6.495859] debugfs: Directory 'fdab0000.npu-rknpu' with parent 'vdd_npu_s0' already present!
[ 6.509022] debugfs: Directory 'fdab0000.npu-rknpu' with parent 'vdd_npu_s0' already present!
Starting modprobe@dm_mod.service - Load Kernel Module dm_mod...
Starting [email protected] - Load Kernel Module loop...
Starting rkaiq_3A.service - Enable Rockchip camera engine rkaiq...
[ OK ] Started systemd-resolved.service - Network Name Resolution.
[ OK ] Finished [email protected] - Load Kernel Module loop.
[ OK ] Finished modprobe@dm_mod.service - Load Kernel Module dm_mod.
[ OK ] Finished networking.service - Raise network interfaces.
[ OK ] Reached target nss-lookup.target - Host and Network Name Lookups.
[ OK ] Reached target sysinit.target - System Initialization.
[ OK ] Started whoopsie.path - Start whoo…cation of the /var/crash directory.
[ OK ] Started anacron.timer - Trigger anacron every hour.
[ OK ] Started apt-daily.timer - Daily apt download activities.
[ OK ] Started apt-daily-upgrade.timer - …y apt upgrade and clean activities.
[ OK ] Started dpkg-db-backup.timer - Daily dpkg database backup timer.
[ OK ] Started e2scrub_all.timer - Period…Metadata Check for All Filesystems.
[ OK ] Started fstrim.timer - Discard unused filesystem blocks once a week.
[ OK ] Started logrotate.timer - Daily rotation of log files.
[ OK ] Started man-db.timer - Daily man-db regeneration.
[ OK ] Started motd-news.timer - Message of the Day.
[ OK ] Started systemd-tmpfiles-clean.tim…y Cleanup of Temporary Directories.
[ OK ] Reached target paths.target - Path Units.
[ OK ] Listening on avahi-daemon.socket -…DNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on dbus.socket - D-Bus System Message Bus Socket.
[ OK ] Listening on ssh.socket - OpenBSD Secure Shell server socket.
[ OK ] Reached target sockets.target - Socket Units.
[ OK ] Reached target basic.target - Basic System.
Starting accounts-daemon.service - Accounts Service...
[ OK ] Started anacron.service - Run anacron jobs.
Starting avahi-daemon.service - Avahi mDNS/DNS-SD Stack...
Starting brcm_patchram_plus.service - brcm_patchram_plus...
[ OK ] Started cron.service - Regular background program processing daemon.
Starting dbus.service - D-Bus System Message Bus...
[ OK ] Started dmesg.service - Save initial kernel messages after boot.
Starting e2scrub_reap.service - Re…ne ext4 Metadata Check Snapshots...
Starting friendlyelec_leds.service - Init Onboard LEDs...
Starting gnome-remote-desktop.service - GNOME Remote Desktop...
Starting loadcpufreq.service - LSB…needed to enable cpufreq scaling...
Starting polkit.service - Authorization Manager...
Starting power-profiles-daemon.service - Power Profiles daemon...
Starting rsyslog.service - System Logging Service...
Starting switcheroo-control.servic…Switcheroo Control Proxy service...
[ 6.811043] rk-crypto fe370000.crypto: invalid resource
Starting systemd-logind.service - User Login Management...
Starting udisks2.service - Disk Manager...
[ OK ] Started dbus.service - D-Bus System Message Bus.
[ OK ] Started rkaiq_3A.service - Enable Rockchip camera engine rkaiq.
[ OK ] Finished brcm_patchram_plus.service - brcm_patchram_plus.
[ OK ] Finished e2scrub_reap.service - Re…line ext4 Metadata Check Snapshots.
[ OK ] Finished friendlyelec_leds.service - Init Onboard LEDs.
[ OK ] Started switcheroo-control.service - Switcheroo Control Proxy service.
[ OK ] Started rsyslog.service - System Logging Service.
[ OK ] Started loadcpufreq.service - LSB:…s needed to enable cpufreq scaling.
[ OK ] Started systemd-logind.service - User Login Management.
[ OK ] Started avahi-daemon.service - Avahi mDNS/DNS-SD Stack.
[ OK ] Started polkit.service - Authorization Manager.
[ OK ] Started accounts-daemon.service - Accounts Service.
[ OK ] Started power-profiles-daemon.service - Power Profiles daemon.
[ OK ] Started gnome-remote-desktop.service - GNOME Remote Desktop.
[ OK ] Created slice system-systemd\x2dba… - Slice /system/systemd-backlight.
Starting ModemManager.service - Modem Manager...
Starting NetworkManager.service - Network Manager...
Starting alsa-restore.service - Save/Restore Sound Card State...
Starting cpufrequtils.service - LSB: set CPUFreq kernel parameters...
Starting friendlyelec_firstuse.service - Init board...
Starting systemd-backlight@backlig…tness of backlight:pwm-backlight...
Starting wpa_supplicant.service - WPA supplicant...
[ OK ] Finished friendlyelec_firstuse.service - Init board.
[ OK ] Finished systemd-backlight@backlig…ghtness of backlight:pwm-backlight.
[ OK ] Finished alsa-restore.service - Save/Restore Sound Card State.
[ OK ] Started udisks2.service - Disk Manager.
[ OK ] Started wpa_supplicant.service - WPA supplicant.
[ OK ] Reached target sound.target - Sound Card.
[ OK ] Listening on systemd-rfkill.socket…ll Switch Status /dev/rfkill Watch.
Starting bluetooth.service - Bluetooth service...
Starting rc-local.service - /etc/rc.local...
Starting systemd-rfkill.service - Load/Save RF Kill Switch Status...
[ OK ] Started rc-local.service - /etc/rc.local.
[ OK ] Started cpufrequtils.service - LSB: set CPUFreq kernel parameters.
[ OK ] Started systemd-rfkill.service - Load/Save RF Kill Switch Status.
[ OK ] Started bluetooth.service - Bluetooth service.
[ OK ] Reached target bluetooth.target - Bluetooth Support.
Starting systemd-hostnamed.service - Hostname Service...
[ OK ] Started ModemManager.service - Modem Manager.
[ OK ] Started systemd-hostnamed.service - Hostname Service.
Starting NetworkManager-dispatcher…anager Script Dispatcher Service...
[ OK ] Started NetworkManager-dispatcher.… Manager Script Dispatcher Service.
[ OK ] Started NetworkManager.service - Network Manager.
[ OK ] Reached target network.target - Network.
[ OK ] Started update-notifier-download.t…hat failed at package install time.
[ OK ] Started update-notifier-motd.timer… a new version of Ubuntu available.
[ OK ] Reached target timers.target - Timer Units.
[ OK ] Started lcd2usb.service - lcd2usb.
Starting setup-eth-smp.service - Sets network devices IRQ and RPS...
Starting systemd-user-sessions.service - Permit User Sessions...
[ OK ] Finished systemd-user-sessions.service - Permit User Sessions.
Starting gdm.service - GNOME Display Manager...
[ OK ] Started [email protected] - Serial Getty on ttyFIQ0.
[ OK ] Reached target getty.target - Login Prompts.
Starting setvtrgb.service - Set console scheme...
[ OK ] Finished setvtrgb.service - Set console scheme.
[ OK ] Created slice system-getty.slice - Slice /system/getty.
[ OK ] Finished setup-eth-smp.service - Sets network devices IRQ and RPS.
[ OK ] Reached target multi-user.target - Multi-User System.
[ OK ] Started gdm.service - GNOME Display Manager.
[ OK ] Reached target graphical.target - Graphical Interface.
Starting systemd-update-utmp-runle…- Record Runlevel Change in UTMP...
[ OK ] Finished systemd-update-utmp-runle…e - Record Runlevel Change in UTMP.
Ubuntu 24.04.3 LTS NanoPC-T6 ttyFIQ0
NanoPC-T6 login:
debain系统默认账号密码如下:
普通用户:
用户名: pi
密码: pi
Root用户:
默认没有设置root密码,可通过sudo passwd root命令配置root密码
3.2.3 GPU内核日志
通过串口我们来查看panthor驱动是否生效:
pi@NanoPC-T6:~$ dmesg | grep gpu
[ 3.239978] vdd_gpu_s0: supplied by vcc5v0_sys
[ 3.240076] vdd_gpu_s0: No configuration
[ 3.240881] vdd_gpu_s0: 550 <--> 950 mV at 750 mV at 6500 mA, enabled
[ 3.708844] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up gpu-supply from device tree
[ 3.708884] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up gpu-supply property in node /power-management@fd8d8000/power-controller failed
[ 3.709149] panthor fb000000.gpu: [drm] clock rate = 198000000
[ 3.709214] panthor fb000000.gpu: Looking up mali-supply from device tree
[ 3.710396] panthor fb000000.gpu: Looking up sram-supply from device tree
[ 3.710409] panthor fb000000.gpu: Looking up sram-supply property in node /gpu@fb000000 failed
[ 3.711139] panthor fb000000.gpu: EM: OPP:400000 is inefficient
[ 3.711150] panthor fb000000.gpu: EM: OPP:300000 is inefficient
[ 3.711355] panthor fb000000.gpu: EM: created perf domain
[ 3.711952] panthor fb000000.gpu: [drm] mali-g610 id 0xa867 major 0x0 minor 0x0 status 0x5
[ 3.711976] panthor fb000000.gpu: [drm] Features: L2:0x7120306 Tiler:0x809 Mem:0x301 MMU:0x2830 AS:0xff
[ 3.711993] panthor fb000000.gpu: [drm] shader_present=0x50005 l2_present=0x1 tiler_present=0x1
[ 3.714474] panthor fb000000.gpu: [drm] Firmware protected mode entry not be supported, ignoring
[ 3.714934] panthor fb000000.gpu: [drm] CSF FW v1.5.0, Features 0x0 Instrumentation features 0x71
[ 3.715806] [drm] Initialized panthor 1.0.0 20230801 for fb000000.gpu on minor 1
可以看到GPU驱动已经从ARM Mali GPU官方驱动(《Rockchip RK3588 - OpenCL环境搭建(官方GPU驱动)》)替换成了panthor。
3.2.4 查看系统
查看系统:
pi@NanoPC-T6:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
更多有关ubuntu系统设置可以参考《七、debain系统设置》。
3.2.5 桌面崩溃处理
将开发板连接显示器,我这里看到的桌面是崩溃的, 出现错误Oh no! Something has gone wrong. A problem has occurred and the system can’t recover,我们执行如下命令;
pi@NanoPC-T6:~$ sudo journalctl --boot
......
Jul 02 14:04:39 NanoPC-T6 gnome-shell[1469]: [MALI-HOOK] WARN: Native display(0x5598399380) ignored!
Jul 02 14:04:39 NanoPC-T6 gnome-shell[1469]: Failed creating base context during opening of kernel driver.
Jul 02 14:04:39 NanoPC-T6 gnome-shell[1469]: Kernel module may not have been loaded
Jul 02 14:04:39 NanoPC-T6 gnome-shell[1469]: Failed to setup: Unable to initialize the Clutter backend: no available drivers found.
Jul 02 14:04:39 NanoPC-T6 gnome-shell[1469]: arm_release_ver: g13p0-01eac0, rk_so_ver: 11
Jul 02 14:04:39 NanoPC-T6 systemd[983]: [email protected]: Failed with result 'protocol'.
Jul 02 14:04:39 NanoPC-T6 systemd[983]: Failed to start [email protected] - GNOME Shell on X11.
.....
从上面的错误信息,大概可以推断出是由于我们更换了内核GPU驱动造成的;
Nov 13 11:44:39 NanoPC-T6 org.gnome.Shell.desktop[1485]: Failed creating base context during opening of kernel driver.
这个错误意味着GNOME Shell在尝试初始化时无法成功打开GPU驱动。
我们执行如下命令:
pi@NanoPC-T6:~$ sudo mkdir /userdata
pi@NanoPC-T6:~$ sudo mv /etc/ld.so.conf.d/00-aarch64-mali.conf /userdata
pi@NanoPC-T6:~$ sudo ldconfig
pi@NanoPC-T6:~$ sudo reboot
重启系统后,我们就可以看到登陆界面了,登陆界面右下角可以选择窗口管理系统的类型;
Ubuntu:使用Wayland窗口管理系统;Ubuntu on Xorg:使用X11窗口管理系统;
为什么这么做呢?由于ubuntu系统使用的默认用户空间图形库是由ARM Mali GPU官方提供的,但是我们将内核GPU驱动从ARM Mali GPU官方驱动换成了开源的Panthor驱动,由于二者不匹配,造成了桌面崩溃。
而上面的命令会将用户空间的图形库从Mali切换为开源实现Mesa,配合我们移植的开源Panthor GPU驱动,桌面就恢复正常了,这个我们后面会深入讲解。
3.2.6 配置root登陆
pi@NanoPC-T6:~$ sudo passwd root
# 设置密码
pi@NanoPC-T6:~$ sudo vim /etc/ssh/sshd_config
# 追加,允许root登陆以及上传文件
Subsystem sftp internal-sftp
PermitRootLogin yes
PasswordAuthentication yes
pi@NanoPC-T6:~$ sudo systemctl restart ssh
3.2.7 locale设置
如果shell终端中文乱码;
# 查看可用的locale
localectl list-locales | grep -E "(zh_CN|en_US)"
# 设置系统locale为英文UTF-8(推荐用于服务器)
localectl set-locale LANG=en_US.UTF-8
# 或者设置为中文UTF-8
localectl set-locale LANG=zh_CN.UTF-8
# 重启系统或重新登录
reboot
3.3 单独烧录内核
在某些情况下,我们可能对内核源码做了修改,或者仅仅修改了设备树,如果按照前面的内核编译步骤,重新烧录一遍非常的耗时时间,那么有没有简单的方法呢?当然有。
3.3.1 编译内核
首先,我们进行内核的编译:
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi6-images -j$(nproc)
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# ll kernel.img
-rw-r--r-- 1 root root 36374548 11月 9 12:15 kernel.img
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# ll resource.img
-rw-r--r-- 1 root root 8283136 11月 9 12:07 resource.img
编译完会在./kernel-rk3588目录下生成kernel.img、resource.img文件 。
接着我们将这两个文件拷贝到ubuntu-noble-desktop-arm64目录下;
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp kernel.img ../ubuntu-noble-desktop-arm64
root@ubuntu:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/kernel-rk3588# cp resource.img ../ubuntu-noble-desktop-arm64
3.3.2 dd烧录
进入开发板系统,我们单独烧录resource.img、kernel.img到开发板,可以按照如下步骤;
pi@NanoPC-T6:/userdata$ sudo scp -r [email protected]:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64/kernel.img .
pi@NanoPC-T6:/userdata$ sudo dd if=kernel.img of=/dev/mmcblk2p5 bs=1M
pi@NanoPC-T6:/userdata$ sudo scp -r [email protected]:/work/sambashare/rk3588/friendly/sd-fuse_rk3588/ubuntu-noble-desktop-arm64/resource.img .
pi@NanoPC-T6:/userdata$ sudo dd if=resource.img of=/dev/mmcblk2p4 bs=1M
其中:
192.168.2.103是宿主机ubuntu系统的ip地址;resource分区的序号为4,对应的设备节点为/dev/mmcblk2p4;kernel分区的序号为5,对应的设备节点为/dev/mmcblk2p5。
四、Mesa 25.0.7安装
4.1 查看OpenGL支持
实际上,ubuntu 24.04系统默认安装了25.0.7,已经支持了GL、EGL、GLESv2、GLX、GLU。
4.1.1 默认依赖包
可以查看系统默认安装的依赖包;
pi@NanoPC-T6:~$ dpkg -l | grep -i mesa
ii libegl-mesa0:arm64 25.0.7-0ubuntu0.24.04.1 arm64 free implementation of the EGL API -- Mesa vendor library
ii libgl1-mesa-dri:arm64 25.0.7-0ubuntu0.24.04.1 arm64 free implementation of the OpenGL API -- DRI modules
ii libglu1-mesa:arm64 9.0.2-1.1build1 arm64 Mesa OpenGL utility library (GLU)
ii libglx-mesa0:arm64 25.0.7-0ubuntu0.24.04.1 arm64 free implementation of the OpenGL API -- GLX vendor library
ii mesa-libgallium:arm64 25.0.7-0ubuntu0.24.04.1 arm64 shared infrastructure for Mesa drivers
ii mesa-va-drivers:arm64 25.0.7-0ubuntu0.24.04.1 arm64 Mesa VA-API video acceleration drivers
ii mesa-vdpau-drivers:arm64 25.0.7-0ubuntu0.24.04.1 arm64 Mesa VDPAU video acceleration drivers
ii mesa-vulkan-drivers:arm64 25.0.7-0ubuntu0.24.04.1 arm64 Mesa Vulkan graphics drivers
pi@NanoPC-T6:~$ dpkg -l | grep GL
ii gir1.2-glib-2.0:arm64 2.80.0-6ubuntu3.4 arm64 Introspection data for GLib, GObject, Gio and GModule
ii gir1.2-packagekitglib-1.0 1.2.8-2ubuntu1.2 arm64 GObject introspection data for the PackageKit GLib library
ii glib-networking:arm64 2.80.0-1build1 arm64 network-related giomodules for GLib
ii glib-networking-common 2.80.0-1build1 all network-related giomodules for GLib - data files
ii glib-networking-services 2.80.0-1build1 arm64 network-related giomodules for GLib - D-Bus services
ii glmark2-data 2023.01+dfsg-1build2 all OpenGL (ES) 2.0 benchmark suite -- data files
ii glmark2-es2-wayland 2023.01+dfsg-1build2 arm64 OpenGL 2.0 benchmark suite
ii gstreamer1.0-gl:arm64 1.24.2-1ubuntu0.2 arm64 GStreamer plugins for GL
ii libavahi-glib1:arm64 0.8-13ubuntu6 arm64 Avahi GLib integration library
ii libegl-mesa0:arm64 25.0.7-0ubuntu0.24.04.1 arm64 free implementation of the EGL API -- Mesa vendor library
ii libegl1:arm64 1.7.0-1build1 arm64 Vendor neutral GL dispatch library -- EGL support
ii libepoxy0:arm64 1.5.10-1build1 arm64 OpenGL function pointer management library
ii libgeocode-glib-2-0:arm64 3.26.3-6build3 arm64 geocoding and reverse geocoding GLib library using Nominatim
ii libgl1:arm64 1.7.0-1build1 arm64 Vendor neutral GL dispatch library -- legacy GL support
ii libgl1-mesa-dri:arm64 25.0.7-0ubuntu0.24.04.1 arm64 free implementation of the OpenGL API -- DRI modules
ii libgl2ps1.4 1.4.2+dfsg1-2build1 arm64 Lib providing high quality vector output for OpenGL application
ii libgles2:arm64 1.7.0-1build1 arm64 Vendor neutral GL dispatch library -- GLESv2 support
ii libglew2.2:arm64 2.2.0-4build1 arm64 OpenGL Extension Wrangler - runtime environment
ii libglib-perl:arm64 3:1.329.3-3build3 arm64 interface to the GLib and GObject libraries
ii libglib2.0-0t64:arm64 2.80.0-6ubuntu3.4 arm64 GLib library of C routines
ii libglib2.0-bin 2.80.0-6ubuntu3.4 arm64 Programs for the GLib library
ii libglib2.0-data 2.80.0-6ubuntu3.4 all Common files for GLib library
ii libglu1-mesa:arm64 9.0.2-1.1build1 arm64 Mesa OpenGL utility library (GLU)
ii libglvnd0:arm64 1.7.0-1build1 arm64 Vendor neutral GL dispatch library
ii libglx-mesa0:arm64 25.0.7-0ubuntu0.24.04.1 arm64 free implementation of the OpenGL API -- GLX vendor library
ii libglx0:arm64 1.7.0-1build1 arm64 Vendor neutral GL dispatch library -- GLX support
ii libgstreamer-gl1.0-0:arm64 1.24.2-1ubuntu0.2 arm64 GStreamer GL libraries
ii libgusb2:arm64 0.4.8-1build2 arm64 GLib wrapper around libusb1
ii libjson-glib-1.0-0:arm64 1.8.0-2build2 arm64 GLib JSON manipulation library
ii libjson-glib-1.0-common 1.8.0-2build2 all GLib JSON manipulation library (common files)
ii libopengl0:arm64 1.7.0-1build1 arm64 Vendor neutral GL dispatch library -- OpenGL support
ii libpackagekit-glib2-18:arm64 1.2.8-2ubuntu1.2 arm64 Library for accessing PackageKit using GLib
ii libpoppler-glib8t64:arm64 24.02.0-1ubuntu9.5 arm64 PDF rendering library (GLib-based shared library)
ii libqt5opengl5t64:arm64 5.15.13+dfsg-1ubuntu1 arm64 Qt 5 OpenGL module
ii libsnapd-glib-2-1:arm64 1.64-0ubuntu5 arm64 GLib snapd library
ii libwayland-egl1:arm64 1.22.0-2.1build1 arm64 wayland compositor infrastructure - EGL library
4.1.2 查看安装的库
同时可以在/usr下查找到相关动态库:
pi@NanoPC-T6:~$ find /usr | grep lib.*GL.*.so | xargs ls -l | sort # 下面我手动分类排了一下序
# 现代OpenGL分发库
lrwxrwxrwx 1 root root 18 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libOpenGL.so.0 -> libOpenGL.so.0.0.0
-rw-r--r-- 1 root root 395368 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libOpenGL.so.0.0.0 # libopengl0安装
# 传统OpenGL库
-rw-r--r-- 1 root root 985200 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGL.so.1.7.0 # libgl1安装
lrwxrwxrwx 1 root root 14 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGL.so.1 -> libGL.so.1.7.0
# EGL库(窗口系统抽象)
# 基础EGL实现
lrwxrwxrwx 1 root root 15 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libEGL.so.1 -> libEGL.so.1.1.0
-rw-r--r-- 1 root root 133560 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libEGL.so.1.1.0 # libegl1安装
# ARM Mali GPU的专有EGL实现
lrwxrwxrwx 1 root root 11 Aug 23 2024 /usr/lib/aarch64-linux-gnu/mali/libEGL.so -> libEGL.so.1
-rwxr-xr-x 1 root root 69752 Sep 3 2024 /usr/lib/aarch64-linux-gnu/mali/libEGL.so.1
# Mesa的EGL实现
lrwxrwxrwx 1 root root 20 May 23 15:16 /usr/lib/aarch64-linux-gnu/libEGL_mesa.so.0 -> libEGL_mesa.so.0.0.0
-rw-r--r-- 1 root root 398888 May 23 15:16 /usr/lib/aarch64-linux-gnu/libEGL_mesa.so.0.0.0 # libegl-mesa0安装
# OpenGL ES 库(嵌入式版本) GLESv2实现
lrwxrwxrwx 1 root root 18 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2 -> libGLESv2.so.2.1.0
-rw-r--r-- 1 root root 198760 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2.1.0 # libgles2安装
# ARM Mali GPU的专有GLESv2实现
lrwxrwxrwx 1 root root 14 Aug 23 2024 /usr/lib/aarch64-linux-gnu/mali/libGLESv2.so -> libGLESv2.so.2
-rwxr-xr-x 1 root root 69752 Sep 3 2024 /usr/lib/aarch64-linux-gnu/mali/libGLESv2.so.2
# ARM Mali GPU的专有GLESv1实现
-rwxr-xr-x 1 root root 69752 Sep 3 2024 /usr/lib/aarch64-linux-gnu/mali/libGLESv1_CM.so.1
lrwxrwxrwx 1 root root 17 Aug 23 2024 /usr/lib/aarch64-linux-gnu/mali/libGLESv1_CM.so -> libGLESv1_CM.so.1
# GLX(X11 OpenGL 扩展)
lrwxrwxrwx 1 root root 15 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGLX.so.0 -> libGLX.so.0.0.0
-rw-r--r-- 1 root root 199032 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGLX.so.0.0.0 # libglx0安装
# Mesa的GLX实现
lrwxrwxrwx 1 root root 20 May 23 15:16 /usr/lib/aarch64-linux-gnu/libGLX_mesa.so.0 -> libGLX_mesa.so.0.0.0
lrwxrwxrwx 1 root root 16 May 23 15:16 /usr/lib/aarch64-linux-gnu/libGLX_indirect.so.0 -> libGLX_mesa.so.0
-rw-r--r-- 1 root root 594200 May 23 15:16 /usr/lib/aarch64-linux-gnu/libGLX_mesa.so.0.0.0 # libglx-mesa0安装
# GLU
lrwxrwxrwx 1 root root 15 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGLU.so.1 -> libGLU.so.1.3.1
-rw-r--r-- 1 root root 330256 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGLU.so.1.3.1 # libglu1-mesa安装
# QT
lrwxrwxrwx 1 root root 23 Mar 28 2024 /usr/lib/aarch64-linux-gnu/libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.15.13
lrwxrwxrwx 1 root root 23 Mar 28 2024 /usr/lib/aarch64-linux-gnu/libQt5OpenGL.so.5.15 -> libQt5OpenGL.so.5.15.13
-rw-r--r-- 1 root root 399296 Mar 28 2024 /usr/lib/aarch64-linux-gnu/libQt5OpenGL.so.5.15.13 # libqt5opengl5t64安装
# 其它
-rw-r--r-- 1 root root 1575160 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGLdispatch.so.0.0.0
lrwxrwxrwx 1 root root 22 Apr 8 2024 /usr/lib/aarch64-linux-gnu/libGLdispatch.so.0 -> libGLdispatch.so.0.0.0 # libglvnd0安装
lrwxrwxrwx 1 root root 16 Apr 18 2024 /usr/lib/aarch64-linux-gnu/libGLEW.so.2.2 -> libGLEW.so.2.2.0
-rw-r--r-- 1 root root 788456 Apr 18 2024 /usr/lib/aarch64-linux-gnu/libGLEW.so.2.2.0 # libglew2.2安装
lrwxrwxrwx 1 root root 42 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkDomainsChemistryOpenGL2-9.1.so.1 -> libvtkDomainsChemistryOpenGL2-9.1.so.9.1.0
-rw-r--r-- 1 root root 68784 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkDomainsChemistryOpenGL2-9.1.so.9.1.0 # libvtk9.1t64安装
lrwxrwxrwx 1 root root 32 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkIOExportGL2PS-9.1.so.1 -> libvtkIOExportGL2PS-9.1.so.9.1.0
-rw-r--r-- 1 root root 68712 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkIOExportGL2PS-9.1.so.9.1.0 # libvtk9.1t64安装
lrwxrwxrwx 1 root root 35 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkRenderingOpenGL2-9.1.so.1 -> libvtkRenderingOpenGL2-9.1.so.9.1.0
-rw-r--r-- 1 root root 2377760 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkRenderingOpenGL2-9.1.so.9.1.0 #libvtk9.1t64安装
lrwxrwxrwx 1 root root 40 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkRenderingGL2PSOpenGL2-9.1.so.1 -> libvtkRenderingGL2PSOpenGL2-9.1.so.9.1.0
-rw-r--r-- 1 root root 68760 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkRenderingGL2PSOpenGL2-9.1.so.9.1.0 #libvtk9.1t64安装
lrwxrwxrwx 1 root root 41 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkRenderingVolumeOpenGL2-9.1.so.1 -> libvtkRenderingVolumeOpenGL2-9.1.so.9.1.0
-rw-r--r-- 1 root root 597304 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkRenderingVolumeOpenGL2-9.1.so.9.1.0 #libvtk9.1t64安装
lrwxrwxrwx 1 root root 42 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkRenderingContextOpenGL2-9.1.so.1 -> libvtkRenderingContextOpenGL2-9.1.so.9.1.0
-rw-r--r-- 1 root root 201696 Apr 1 2024 /usr/lib/aarch64-linux-gnu/libvtkRenderingContextOpenGL2-9.1.so.9.1.0 #libvtk9.1t64安装
注:如果想知道哪个库是由哪个包安装,执行如下命令即可:dpkg-query -S library.so。
这些库是Linux系统图形渲染栈的核心组件,覆盖了从硬件驱动到上层应用框架的全链路,主要用于实现OpenGL/OpenGL ES/EGL等图形API,以及支持3D渲染、窗口管理和硬件加速;
4.1.3 核心OpenGL库与调度库(libglvnd系列)
这些库是现代Linux图形栈的基础调度层,负责OpenGL函数的分发和多供应商库共存(比如Mesa vs Mali);
libOpenGL.so.0:OpenGL 4.5+的现代核心库(属于libglvnd0包),提供OpenGL核心功能(如shader、纹理、缓冲区),是GL Vendor Neutral Dispatch (libglvnd)的一部分;libGL.so.1:兼容旧版OpenGL(如1.x/2.x)的库(libgl1包),为旧应用提供向下兼容,实际调用libOpenGL和libGLdispatch实现;libGLdispatch.so.0:函数分发核心(libglvnd0包),负责将OpenGL(ES)/EGL/GLX函数调用转发至对应的实现,确保多供应商兼容性;比如程序代码里写了一行glDrawArrays(...),在编译时,编译器只知道有这么一个函数名,但并不知道这个函数的具体实现(机器代码)在哪里,而libGLdispatch就是用来解决这个问题的;
4.1.4 OpenGL ES库
OpenGL ES是OpenGL的简化版,专为嵌入式设备(如手机、开发板)设计,分为两个主要版本:
libGLESv2.so.2:OpenGL ES 2.0/3.x的核心库(libgles2包),支持可编程管线(shader),是现代嵌入式3D渲染的标准。/mali/libGLESv2.so.2:ARM Mali GPU的硬件加速OpenGLES 2.0/3.x实现,针对Mali架构优化,提供硬件加速的顶点/片段着色器、纹理处理;mali/libGLESv1_CM.so.1:ARM Mali GPU的硬件加速OpenGL ES 1.x实现,仅支持旧的固定功能渲染(如固定光照、纹理),现在很少用,但为兼容旧应用保留。
4.1.5 EGL库和GLX库
EGL(跨平台窗口接口)是OpenGL ES/OpenVG与窗口系统的桥梁,负责创建图形上下文、管理帧缓冲区,支持跨平台(X11、Wayland、fbdev);
libEGL.so.1:EGL的标准接口(libegl1包),系统默认的EGL入口,通常指向Mesa的实现或兼容层;libEGL_mesa.so.0:Mesa项目提供的EGL实现(libegl-mesa0包),当无硬件驱动时,用CPU模拟渲染(性能差,但兼容所有硬件);/mali/libEGL.so.1:ARM Mali GPU的硬件加速EGL实现,针对该GPU优化,直接调用硬件指令,性能远高于软件实现;
GLX 库:X Window系统的OpenGL扩展;
libGLX.so.0:GLX的标准接口(libglx0包),X11下OpenGL的入口;libGLX_mesa.so.0:Mesa提供的GLX实现(libglx-mesa0包),支持直接渲染(DRI)(绕过X服务器,直接访问GPU)或间接渲染(通过X服务器转发指令);libGLX_indirect.so.0:兼容旧版间接渲染的符号链接(指向libGLX_mesa.so.0),用于支持依赖间接渲染的旧应用。
注意:对于EGL,Mesa和ARM均有实现,但是对于GLX只有Mesa实现。
看了上面的解释,可能大家对EGL和GLX的概念的还有点模糊,在说清楚这俩之前,得先铺垫一个前提:
OpenGL/OpenGL ES本身不负责把图像显示到屏幕上,它们只负责在“虚拟的图形上下文”里计算顶点、纹理、颜色,生成像素数据。但这些像素要显示到屏幕的窗口/屏幕上,必须通过一个中间翻译官,把OpenGL的结果交给操作系统的窗口管理系统(比如Windows的Win32、Linux的X11/Wayland、嵌入式的fbdev)。
GLX和EGL就是这个“翻译官”,但它们对接的屏幕管理系统不一样,核心差异;
| 维度 | GLX | EGL |
|---|---|---|
| 对接的窗口管理系统 | 只能X11 | 跨X11、Wayland、fbdev、Android等所有系统 |
| 服务的图形API | 主要桌面OpenGL(1.x-4.x) | 主要OpenGL ES(嵌入式3D)、OpenVG(2D) |
| 适用场景 | Linux桌面(X11) | 嵌入式、移动、新Linux系统(Wayland) |
| 资源占用 | 重(适配X11的复杂窗口) | 轻(专为嵌入式设计) |
| API前缀 | glX... | egl... |
| 主要用途 | 在Linux桌面系统(X11)上创建和管理OpenGL上下文 | 在多种平台(尤嵌入式、移动、新Linux系统(Wayland))上创建和管理OpenGL ES上下文 |
场景对比:
| 场景 | 用GLX还是EGL? | 为什么? |
|---|---|---|
| Ubuntu桌面版(X11)跑程序 | GLX | X11是桌面窗口系统,GLX是它的专属OpenGL接口,负责把齿轮渲染到X11窗口里 |
| Ubuntu桌面版(Wayland)跑程序 | EGL | Wayland是X11的替代者,不支持GLX,只能用EGL对接OpenGL/OpenGL ES |
4.1.6 硬件厂商库(Mali驱动)
/usr/lib/aarch64-linux-gnu/mali/下的库是ARM Mali GPU的专用驱动;
pi@NanoPC-T6:/userdata$ ll /usr/lib/aarch64-linux-gnu/mali/
lrwxrwxrwx 1 root root 11 Aug 23 2024 libEGL.so -> libEGL.so.1*
-rwxr-xr-x 1 root root 69752 Sep 3 2024 libEGL.so.1*
lrwxrwxrwx 1 root root 17 Aug 23 2024 libGLESv1_CM.so -> libGLESv1_CM.so.1*
-rwxr-xr-x 1 root root 69752 Sep 3 2024 libGLESv1_CM.so.1*
lrwxrwxrwx 1 root root 14 Aug 23 2024 libGLESv2.so -> libGLESv2.so.2*
-rwxr-xr-x 1 root root 69752 Sep 3 2024 libGLESv2.so.2*
lrwxrwxrwx 1 root root 18 Aug 23 2024 libMaliOpenCL.so -> libMaliOpenCL.so.1*
-rwxr-xr-x 1 root root 69752 Sep 3 2024 libMaliOpenCL.so.1*
lrwxrwxrwx 1 root root 11 Aug 23 2024 libgbm.so -> libgbm.so.1*
-rwxr-xr-x 1 root root 69752 Sep 3 2024 libgbm.so.1*
-rw-r--r-- 1 root root 3532 Sep 3 2024 libmali-hook-injector.a
lrwxrwxrwx 1 root root 17 Aug 23 2024 libmali-hook.so -> libmali-hook.so.1*
lrwxrwxrwx 1 root root 21 Aug 23 2024 libmali-hook.so.1 -> libmali-hook.so.1.9.0*
-rwxr-xr-x 1 root root 81456 Sep 3 2024 libmali-hook.so.1.9.0*
-rw-r--r-- 1 root root 138 Jan 2 2025 libmali.dsc
lrwxrwxrwx 1 root root 12 Aug 23 2024 libmali.so -> libmali.so.1*
lrwxrwxrwx 1 root root 16 Aug 23 2024 libmali.so.1 -> libmali.so.1.9.0*
-rwxr-xr-x 1 root root 43584320 Dec 31 2024 libmali.so.1.9.0*
lrwxrwxrwx 1 root root 27 Sep 4 2024 libwayland-client.so.0 -> libwayland-client.so.0.23.0*
-rwxr-xr-x 1 root root 68648 Oct 11 2024 libwayland-client.so.0.23.0*
lrwxrwxrwx 1 root root 19 Aug 23 2024 libwayland-egl.so -> libwayland-egl.so.1*
-rwxr-xr-x 1 root root 69752 Sep 3 2024 libwayland-egl.so.1*
lrwxrwxrwx 1 root root 27 Sep 4 2024 libwayland-server.so.0 -> libwayland-server.so.0.23.0*
-rwxr-xr-x 1 root root 134376 Oct 11 2024 libwayland-server.so.0.23.0*
提供硬件加速的EGL/GLES实现,直接与GPU硬件交互,性能远优于Mesa。例如:
/mali/libEGL.so.1:Mali的EGL硬件实现;/mali/libGLESv2.so.2:Mali的GLES 2.0硬件实现;/mali/libGLESv1_CM.so.1:Mali的GLES 1.x硬件实现;/mali/libMaliOpenCL.so.1:Mali的OpenCL硬件实现。
4.1.7 同一接口的不同实现
同一图形API(如EGL/GLES)可能有多个供应商的实现(比如Mesa vs Mali),但接口名一致(遵循标准),方便应用无缝切换。例如:libEGL.so.1有两个版本:
- 系统默认的
/usr/lib/aarch64-linux-gnu/libEGL.so.1(Mesa的实现); Mali的/usr/lib/aarch64-linux-gnu/mali/libEGL.so.1(硬件加速实现)。
在Linux系统中,/etc/ld.so.conf.d/ 目录用于存放动态链接库(Dynamic Linker)的配置文件,这些文件通常用来指定额外的动态链接库搜索路径。
我们烧录的ubuntu系统默认指定了查找/usr/lib/aarch64-linux-gnu/mali目录的硬件厂商库;
pi@NanoPC-T6:/userdata$ cat /userdata/00-aarch64-mali.conf
/usr/lib/aarch64-linux-gnu/mali
注意:这个文件在前面我们已经从/etc/ld.so.conf.d/00-aarch64-mali.conf移动到/userdata目录了。
接着在查找/usr/lib/aarch64-linux-gnu目录的Mesa软件库;
pi@NanoPC-T6:/userdata$ cat /etc/ld.so.conf.d/aarch64-linux-gnu.conf
# Multiarch support
/usr/local/lib/aarch64-linux-gnu
/lib/aarch64-linux-gnu
/usr/lib/aarch64-linux-gnu
此外,我们也可以通过libGLdispatch或环境变量(如LIBGL_DRIVERS_PATH)指定使用哪一个库。
由于我们更换了内核GPU驱动为Panthor开源驱动,那么/usr/lib/aarch64-linux-gnu/mali这些库就不能再使用了,我们需要移除/etc/ld.so.conf.d/00-aarch64-mali.conf文件。
4.1.8 Wayland切换到X11
ubuntu 24.04默认使用的是Wayland窗口管理系统,我们首先要切换到X11;
- 退出当前会话:首先,点击屏幕右上角的用户菜单,选择 注销 或 退出,以退出当前的会话。
- 切换到
X11会话:回到登录界面,在登录屏幕上(即输入用户名和密码的界面),在你的用户名下面,会看到一个齿轮图标(设置图标),它通常显示在密码框的下方,或者位于用户名选择框的右下角;- 选择
X11:点击齿轮图标,在弹出的选项中选择Ubuntu on Xorg,明确指定使用X11(Xorg)作为显示服务器。 - 选择完
Ubuntu on Xorg后,输入你的密码并登录。
- 选择
登录成功后,你可以通过以下命令确认当前是否在使用 X11:
echo $XDG_SESSION_TYPE
如果显示 x11,则表示你已经成功切换到 X11。
如果显示wayland,说明仍然是Wayland。
4.1.9 mesa-utils
首先我们需要先安装mesa-utils,mesa-utils是一个Linux上的实用工具包,用于与mesa图形库(用于支持OpenGL)进行交互和诊断,用于查看图形驱动的信息、测试OpenGL的功能和性能以及检查3D加速是否正常工作;
pi@NanoPC-T6:~$ sudo apt install mesa-utils
以下是mesa-utils的一些常见用途:
glxinfo:该工具提供了有关系统上安装的OpenGL实现的详细信息。您可以使用glxinfo命令查看OpenGL版本、支持的扩展、渲染器信息等。例如,运行glxinfo | grep "OpenGL version"可以查看系统上安装的OpenGL版本;eglinfo:专门用于诊断EGL的支持情况,包括EGL版本、可用显示设备、支持的图形API(如OpenGL ES)、硬件加速状态等;glxgears: 这是一个简单的测试工具,用于检测系统对OpenGL的支持情况。它会显示一个旋转的齿轮动画,并报告每秒渲染的帧数;glxheads: 这个工具可以列出当前系统中可用的X11窗口和OpenGL上下文,并提供有关它们的详细信息;
注意:mesa-utils并不是开发mesa应用程序所必需的,而是一个用于调试和测试的辅助工具集。
4.1.10 glxinfo和eglinfo
4.1.10.1 glxinfo
glxinfo是X11窗口管理系统下的OpenGL/GLX诊断工具,专门用于查询GLX的配置和OpenGL渲染能力。它是X11生态中OpenGL环境的体检表”,但仅适用于X11系统(因此对于ubuntu 24.04我们需要将窗口管理系统从wayland切换到X11)。
1)X11窗口管理系统,打开终端运行glxinfo -B命令查看GPU驱动(注意使用pi用户,和桌面登陆的用户保持一致);
pi@NanoPC-T6:~$ export DISPLAY=:0.0; glxinfo -B
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa (0xffffffff)
Device: Mali-G610 (Panfrost) (0xffffffff)
Version: 25.0.7
Accelerated: yes
Video memory: 15951MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 3.1
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Mesa # OpenGL供应商
OpenGL renderer string: Mali-G610 (Panfrost) # OpenGL渲染器
OpenGL core profile version string: 3.1 Mesa 25.0.7-0ubuntu0.24.04.1 # OpenGL版本
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL version string: 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
可以看到Device: Mali-G610 (Panfrost) (0xffffffff)、OpenGL version string: 3.1 Mesa 25.0.7-0ubuntu0.24.04.1。
查看glxinfo运行时需要依赖哪些共享库;
pi@NanoPC-T6:~$ ldd /usr/bin/glxinfo
linux-vdso.so.1 (0x0000007f82991000)
libGL.so.1 => /lib/aarch64-linux-gnu/libGL.so.1 (0x0000007f827f0000)
libX11.so.6 => /lib/aarch64-linux-gnu/libX11.so.6 (0x0000007f82690000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f824d0000)
/lib/ld-linux-aarch64.so.1 (0x0000007f82954000)
libGLdispatch.so.0 => /lib/aarch64-linux-gnu/libGLdispatch.so.0 (0x0000007f82340000)
libGLX.so.0 => /lib/aarch64-linux-gnu/libGLX.so.0 (0x0000007f822e0000)
libxcb.so.1 => /lib/aarch64-linux-gnu/libxcb.so.1 (0x0000007f82290000)
libXau.so.6 => /lib/aarch64-linux-gnu/libXau.so.6 (0x0000007f82260000)
libXdmcp.so.6 => /lib/aarch64-linux-gnu/libXdmcp.so.6 (0x0000007f82230000)
libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000007f821f0000)
libmd.so.0 => /lib/aarch64-linux-gnu/libmd.so.0 (0x0000007f821c0000)
2)如果Wayland窗口管理系统,进入桌面,在桌面系统打开终端直接运行glxinfo(注意使用pi用户,和桌面登陆的用户保持一致):
pi@NanoPC-T6:~/Desktop$ glxinfo -B
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa (0xffffffff)
Device: Mali-G610 (Panfrost) (0xffffffff)
Version: 25.0.7
Accelerated: yes
Video memory: 15951MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 3.1
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Mesa # OpenGL供应商
OpenGL renderer string: Mali-G610 (Panfrost) # OpenGL渲染器
OpenGL core profile version string: 3.1 Mesa 25.0.7-0ubuntu0.24.04.1 # OpenGL版本
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL version string: 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
4.1.10.2 eglinfo
eglinfo的作用就是列出系统中EGL的所有能力,包括:
EGL本身的版本和供应商(比如Mali vs Mesa);- 可用的显示设备(
Displays,比如Wayland的wayland-0、嵌入式的fbdev、X11的:0); - 支持的图形
API(比如OpenGL ES 3.2、OpenVG 1.1); EGL的配置选项(Configs,比如颜色深度、Alpha通道、是否硬件加速);- 设备的渲染能力(比如是否支持纹理压缩、多采样抗锯齿)。
X11/Wayland窗体管理系统下,进入桌面系统,打开终端接着我们运行eglinfo命令;
pi@NanoPC-T6:~$ eglinfo -B
GBM platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: Mali-G610 (Panfrost)
OpenGL core profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL core profile shading language version: 1.40
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: Mali-G610 (Panfrost)
OpenGL compatibility profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL compatibility profile shading language version: 1.40
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: Mali-G610 (Panfrost)
OpenGL ES profile version: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.10
Wayland platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: Mali-G610 (Panfrost)
OpenGL core profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL core profile shading language version: 1.40
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: Mali-G610 (Panfrost)
OpenGL compatibility profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL compatibility profile shading language version: 1.40
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: Mali-G610 (Panfrost)
OpenGL ES profile version: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.10
X11 platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: Mali-G610 (Panfrost)
OpenGL core profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL core profile shading language version: 1.40
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: Mali-G610 (Panfrost)
OpenGL compatibility profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL compatibility profile shading language version: 1.40
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: Mali-G610 (Panfrost)
OpenGL ES profile version: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.10
Surfaceless platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: Mali-G610 (Panfrost)
OpenGL core profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL core profile shading language version: 1.40
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: Mali-G610 (Panfrost)
OpenGL compatibility profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL compatibility profile shading language version: 1.40
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: Mali-G610 (Panfrost)
OpenGL ES profile version: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.10
Device platform:
Device #0:
Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: Mali-G610 (Panfrost)
OpenGL core profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL core profile shading language version: 1.40
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: Mali-G610 (Panfrost)
OpenGL compatibility profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL compatibility profile shading language version: 1.40
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: Mali-G610 (Panfrost)
OpenGL ES profile version: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.10
Device #1:
Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: Mali-G610 (Panfrost)
OpenGL core profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL core profile shading language version: 1.40
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: Mali-G610 (Panfrost)
OpenGL compatibility profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL compatibility profile shading language version: 1.40
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: Mali-G610 (Panfrost)
OpenGL ES profile version: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.10
Device #2:
Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: Mali-G610 (Panfrost)
OpenGL core profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL core profile shading language version: 1.40
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: Mali-G610 (Panfrost)
OpenGL compatibility profile version: 3.1 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL compatibility profile shading language version: 1.40
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: Mali-G610 (Panfrost)
OpenGL ES profile version: OpenGL ES 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.10
Device #3:
Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: llvmpipe (LLVM 19.1.1, 128 bits)
OpenGL core profile version: 4.5 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL core profile shading language version: 4.50
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: llvmpipe (LLVM 19.1.1, 128 bits)
OpenGL compatibility profile version: 4.5 (Compatibility Profile) Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL compatibility profile shading language version: 4.50
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: llvmpipe (LLVM 19.1.1, 128 bits)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 25.0.7-0ubuntu0.24.04.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20
输出中的GBM platform、X11 platform等是EGL对接的显示系统类型,对应不同的使用场景:
GBM platform:(Generic Buffer Manager)是一个为嵌入式设备和Linux系统提供的接口,用于与图形硬件(例如GPU)直接交互;Wayland platform:设备支持在Wayland会话中进行图形渲染。Wayland是现代Linux桌面环境的显示服务器协议,它比X11更轻量、效率更高。在Wayland环境下,图形硬件的驱动和渲染会有所不同,通常使用EGL而不是传统的GLX;X11 platform:对接X11窗口管理系统(传统Linux桌面,如ubuntu 20.04及更早的桌面);Surfaceless platform:是一个用于没有窗口系统的环境(例如某些嵌入式系统或直接与硬件交互的场景);Device platform:直接对接GPU设备节点(如/dev/dri/card0),绕过窗口系统(嵌入式裸屏场景常用)。
此外OpenGL compatibility profile renderer: Mali-G610 (Panfrost)::明确识别到了硬件GPU(Mali G610),且用Panfrost驱动进行硬件加速(不是软件渲染——软件渲染的话renderer会是LLVMpipe或Softpipe)。
输出末尾的Device #0、#1、#2对应系统中的多个GPU设备节点(如/dev/dri/card0、/dev/dri/card1)。Mali G610是3核心GPU,系统会识别为多个逻辑设备,但本质是同一块物理GPU。Device #3:显示了一个名为 llvmpipe 的渲染器,这是一个软件渲染器(基于LLVM的软件实现),在没有硬件加速时用于渲染。它支持OpenGL 4.5,并且是软件渲染,这意味着它不使用GPU加速,而是使用CPU来模拟图形渲染。
查看eglinfo运行时需要依赖哪些共享库;
pi@NanoPC-T6:~$ ldd /usr/bin/eglinfo
linux-vdso.so.1 (0x0000007fb46be000)
libEGL.so.1 => /lib/aarch64-linux-gnu/libEGL.so.1 (0x0000007fb45d0000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fb4410000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb4681000)
libGLdispatch.so.0 => /lib/aarch64-linux-gnu/libGLdispatch.so.0 (0x0000007fb4280000)
可以看到此时使用的是Mesa库,
如果前面的操作没有移除/etc/ld.so.conf.d/00-aarch64-mali.conf文件,运行eglinfo命令会出现如下错误:
pi@NanoPC-T6:/userdata$ eglinfo -B
GBM platform:
arm_release_ver: g13p0-01eac0, rk_so_ver: 11
Failed creating base context during opening of kernel driver.
Kernel module may not have been loaded
Segmentation fault
查看eglinfo运行时需要依赖哪些共享库;
pi@NanoPC-T6:/userdata$ ldd /usr/bin/eglinfo
linux-vdso.so.1 (0x0000007f94dc3000)
libEGL.so.1 => /usr/lib/aarch64-linux-gnu/mali/libEGL.so.1 (0x0000007f94cf0000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f94b30000)
/lib/ld-linux-aarch64.so.1 (0x0000007f94d86000)
libmali-hook.so.1 => /usr/lib/aarch64-linux-gnu/mali/libmali-hook.so.1 (0x0000007f94b00000)
libmali.so.1 => /usr/lib/aarch64-linux-gnu/mali/libmali.so.1 (0x0000007f8e160000)
libdrm.so.2 => /usr/lib/aarch64-linux-gnu/mali/../libdrm.so.2 (0x0000007f8e120000)
libwayland-client.so.0 => /usr/lib/aarch64-linux-gnu/mali/libwayland-client.so.0 (0x0000007f8e0f0000)
libwayland-server.so.0 => /usr/lib/aarch64-linux-gnu/mali/libwayland-server.so.0 (0x0000007f8e0b0000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f8e080000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f8e050000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f8ddc0000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f8dd10000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f8dcd0000)
libffi.so.8 => /lib/aarch64-linux-gnu/libffi.so.8 (0x0000007f8dca0000)
可以看到使用的是/mali/下的库,由于我们在制作内核的时候将内核GPU驱动从ARM Mali GPU官方驱动换成了开源的Panthor驱动,因此出现了内核驱动错误。
4.1.10.3 差别
eglinfo与glxinfo的关键区别:
| 工具 | 针对的接口 | 支持的窗口系统 | 适用场景 | 核心功能 |
|---|---|---|---|---|
glxinfo |
GLX | 仅X11 | Linux桌面(X11) | 查询X11下的OpenGL/GLX信息 |
eglinfo |
EGL | Wayland/fbdev/X11/Android | 嵌入式、移动、新Linux系统(Wayland) | 查询所有平台的EGL/OpenGL ES信息 |
4.2 查看OpenCL支持
ubuntu系统默认并没有支持OpenGL;
pi@NanoPC-T6:~$ find /usr | grep lib.*CL.*.so | xargs ls -l | sort
-rw-r--r-- 1 root root 67592 Jun 3 18:25 /usr/lib/aarch64-linux-gnu/samba/libLIBWBCLIENT-OLD-samba4.so.0
lrwxrwxrwx 1 root root 14 Apr 18 2024 /usr/share/man/man7/libOpenCL.so.7.gz -> libOpenCL.7.gz
# ARM Mali GPU的专有OpenCL实现
lrwxrwxrwx 1 root root 18 Aug 23 2024 /usr/lib/aarch64-linux-gnu/mali/libMaliOpenCL.so -> libMaliOpenCL.so.1
-rwxr-xr-x 1 root root 69752 Sep 3 2024 /usr/lib/aarch64-linux-gnu/mali/libMaliOpenCL.so.1
# 以下均是ocl-icd-libopencl1包安装
lrwxrwxrwx 1 root root 18 Apr 18 2024 /usr/lib/aarch64-linux-gnu/libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rw-r--r-- 1 root root 134584 Apr 18 2024 /usr/lib/aarch64-linux-gnu/libOpenCL.so.1.0.0
ocl-icd-libopencl1是OpenCL ICD Loader的包,用于在Linux系统中加载OpenCL平台。而libMaliOpenCL.so.1是OpenCL ICD驱动程序(OpenCL官方实现)。
我们可以查看/etc/OpenCL/vendors/目录获取当前系统中可用的OpenCL平台;
pi@NanoPC-T6:~$ ll /etc/OpenCL/vendors/
-rw-r--r-- 1 root root 19 May 13 2024 mali.icd
pi@NanoPC-T6:~$ cat /etc/OpenCL/vendors/mali.icd
libMaliOpenCL.so.1
通过如下clinfo命令查看是否已经安装OpenCL实现;
pi@NanoPC-T6:~$ sudo apt install clinfo
pi@NanoPC-T6:~$ clinfo
Number of platforms 0
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.3.2
ICD loader Profile OpenCL 3.0
系统已经安装了OpenCL ICD Loader 2.3.2版本,并支持OpenCL 3.0规范,但并没有检测到任何可用的OpenCL 平台(比如CPU或GPU上的OpenCL支持)
4.3 安装依赖
4.3.1 安装mesa依赖
root@NanoPC-T6:~# apt update
root@NanoPC-T6:~# apt build-dep mesa
4.3.2 升级cmake 3.28.3
安装cmake:
# 查看所有可用的 cmake 包版本
root@NanoPC-T6:~# apt list -a cmake
Listing... Done
cmake/noble,noble 3.28.3-1build7 arm64
root@NanoPC-T6:~# apt install cmake
root@NanoPC-T6:~# cmake --version
cmake version 3.28.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
4.3.3 安装rust 1.91.0
运行命令下载rustup工具并安装最新的稳定版rust:
root@NanoPC-T6:/userdata# export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
root@NanoPC-T6:/userdata# export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
root@NanoPC-T6:/userdata# wget https://cdn.jsdelivr.net/gh/rust-lang-nursery/rustup.rs/rustup-init.sh --no-check-certificate
root@NanoPC-T6:/userdata# sh rustup-init.sh
rustup 是一个Rust版本管理和相关工具的命令行工具,包括编译器,包管理工具, 在安装的时候,会让你选择安装路径,我们输入 1 (默认安装)回车
接下来,运行以下命令将rust工具链目录添加到PATH环境变量中:
root@NanoPC-T6:/userdata# source $HOME/.cargo/env
通过请求版本验证rust安装:
root@NanoPC-T6:/userdata# rustc --version
rustc 1.91.0 (f8297e351 2025-10-28)
root@NanoPC-T6:/userdata# cargo -V
cargo 1.91.0 (ea2d97820 2025-10-10)
4.3.4 安装llvm 20和clang 20
我们在执行apt build-dep mesa 的时候已经安装了llvm和clang, 查看已经安装的包:
root@NanoPC-T6:/userdata# dpkg -l | grep llvm
ii libllvm18:arm64 1:18.1.3-1ubuntu1 arm64 Modular compiler and toolchain technologies, runtime library
ii libllvm19:arm64 1:19.1.1-1ubuntu1~24.04.2 arm64 Modular compiler and toolchain technologies, runtime library
ii libllvm20:arm64 1:20.1.2-0ubuntu1~24.04.2 arm64 Modular compiler and toolchain technologies, runtime library
ii libllvmspirvlib-20-dev:arm64 20.1.0-1~ubuntu1~24.04.1 arm64 bi-directional translator for LLVM/SPIRV -- development files
ii libllvmspirvlib20.1:arm64 20.1.0-1~ubuntu1~24.04.1 arm64 bi-directional translator for LLVM/SPIRV -- shared library
ii llvm-20 1:20.1.2-0ubuntu1~24.04.2 arm64 Modular compiler and toolchain technologies
ii llvm-20-dev 1:20.1.2-0ubuntu1~24.04.2 arm64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-20-linker-tools 1:20.1.2-0ubuntu1~24.04.2 arm64 Modular compiler and toolchain technologies - Plugins
ii llvm-20-runtime 1:20.1.2-0ubuntu1~24.04.2 arm64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-20-tools 1:20.1.2-0ubuntu1~24.04.2 arm64 Modular compiler and toolchain technologies, tools
ii llvm-spirv-20 20.1.0-1~ubuntu1~24.04.1 arm64 bi-directional translator for LLVM/SPIRV:
root@NanoPC-T6:/userdata# dpkg -l | grep clang
ii libclang-20-dev 1:20.1.2-0ubuntu1~24.04.2 arm64 Clang library - Development package
ii libclang-common-20-dev:arm64 1:20.1.2-0ubuntu1~24.04.2 arm64 Clang library - Common development package
ii libclang-cpp20 1:20.1.2-0ubuntu1~24.04.2 arm64 C++ interface to the Clang library
ii libclang-cpp20-dev 1:20.1.2-0ubuntu1~24.04.2 arm64 C++ interface to the Clang library
ii libclang1-20 1:20.1.2-0ubuntu1~24.04.2 arm64 C interface to the Clang library
检查llvm:
root@NanoPC-T6:/userdata# llvm-config
-bash: llvm-config: command not found
但是我们的确安装了llvm;
root@NanoPC-T6:/userdata# ll /usr/lib/llvm-*
/usr/lib/llvm-18:
drwxr-xr-x 2 root root 4096 Nov 13 14:37 lib/
/usr/lib/llvm-20:
drwxr-xr-x 2 root root 4096 Nov 13 14:38 bin/
drwxr-xr-x 4 root root 4096 Nov 13 14:38 build/
lrwxrwxrwx 1 root root 14 Aug 14 14:59 cmake -> lib/cmake/llvm/
drwxr-xr-x 5 root root 4096 Nov 13 14:38 include/
drwxr-xr-x 4 root root 20480 Nov 13 14:38 lib/
drwxr-xr-x 5 root root 4096 Nov 13 14:38 share/
手动创建软链接:
root@NanoPC-T6:/userdata# ln -s /usr/lib/llvm-20/bin/llvm-config /usr/local/bin/llvm-config
root@NanoPC-T6:/userdata# llvm-config --version
20.1.2
root@NanoPC-T6:/userdata# llvm-config --libdir
/usr/lib/llvm-20/lib
此外,我们可以到《https://ubuntu.pkgs.org/》下载deb包安装,同时在该网站可以看到每个包安装了哪些文件。
4.4 编译安装Mesa
编译mesa流程来自官网:Compilation and Installation Using Meson。
4.4.1 下载
这里我们下载ubuntu 24.04系统自带的的mesa版本,即25.0.7;
root@NanoPC-T6:/userdata# wget https://archive.mesa3d.org/mesa-25.0.7.tar.xz
root@NanoPC-T6:/userdata# tar -xvf mesa-25.0.7.tar.xz
root@NanoPC-T6:/userdata# cd mesa-25.0.7
4.4.2 配置
这里我们执行如下命令在build目录中进行meson初始化和配置,这里我们主要的目的是只编译gallium-rusticl。它将读取项目源代码,并生成构建文件;
root@NanoPC-T6:/userdata/mesa-25.0.7# meson setup build -Dopengl=false -Dshared-glapi=disabled -Dgles1=disabled -Dgles2=disabled -Degl=disabled -Dplatforms= -Dvulkan-drivers=panfrost -Dgallium-drivers=panfrost -Dgallium-rusticl=true -Dprefix=/usr --buildtype=release
The Meson build system
Version: 1.5.1
Source dir: /userdata/mesa-25.0.7
Build dir: /userdata/mesa-25.0.7/build
Build type: native build
Project name: mesa
Project version: 25.0.7
......
mesa 25.0.7
Directories
prefix : /usr
libdir : lib/aarch64-linux-gnu
includedir : include
Common C and C++ arguments
c_cpp_args : -mtls-dialect=desc
OpenGL
OpenGL : NO
ES1 : NO
ES2 : NO
Shared glapi : NO
GLVND : NO
DRI
Platform : drm
Driver dir : /usr/lib/aarch64-linux-gnu/dri
GLX
Enabled : NO
Provider : None
EGL
Enabled : NO
GBM
Enabled : NO
Vulkan
Drivers : panfrost
Platforms :
ICD dir : share/vulkan/icd.d
Intel Ray tracing : NO
Video
Codecs : av1dec av1enc vp9dec
APIs : vulkan
LLVM
Enabled : YES
Version : 20.1.2
Gallium
Enabled : YES
Drivers : panfrost
Platforms :
Frontends : mesa rusticl
Off-screen rendering (OSMesa): NO
HUD lm-sensors : YES
Perfetto
Enabled : NO
Teflon (TensorFlow Lite delegate)
Enabled : NO
User defined options
buildtype : release
prefix : /usr
egl : disabled
gallium-drivers : panfrost
gallium-rusticl : true
gles1 : disabled
gles2 : disabled
opengl : false
platforms :
shared-glapi : disabled
vulkan-drivers : panfrost
Found ninja-1.11.1 at /usr/bin/ninja
其中:
-Dopengl=false:Build support for desktop OpenGL,用于编译安装libGL相关库;-Dshared-glapi=disabled:Whether to build a shared or static glapi. Defaults to disabled on Windows, enabled elsewhere;用于编译安装libglapi相关库;-Dgles1=disabled:禁用OpenGL ES 1.x,用于编译安装libGLESv1相关库;-Dgles2=disabled:禁用OpenGL ES 2.x和3.x,用于编译安装libGLESv2相关库;-Degl=disabled:禁用EGL,用于编译安装libEGL相关库;-Dglx=disabled:禁用GLX,用于编译安装libGLX相关库;-Dplatforms=:支持显示平台,可选项auto,x11,wayland,haiku,android,windows,macos;-Dvulkan-drivers=panfrost:List of vulkan drivers to build. If this is set to auto all drivers applicable to the target OS/architecture will be built,用于编译安装libvulkan相关库;可选项auto,amd,broadcom,freedreno,intel,intel_hasvk,panfrost,swrast,virtio,imagination-experimental,microsoft-experimental,nouveau,asahi,gfxstream,all;-Dgallium-drivers=panfrost:List of gallium drivers to build. If this is set to auto all drivers applicable to the target OS/architecture will be built;可选项auto,radeonsi,r300,r600,nouveau,freedreno,swrast,v3d,vc4,etnaviv,tegra,i915,svga,virgl,panfrost,iris,lima,zink,d3d12,asahi,crocus,all,softpipe,llvmpipe;-Dgallium-rusticl=true:mesa gallium rusticl OpenCL ICD驱动程序实现库(OpenCL开源实现),编译安装libRusticlOpenCL相关库;-Dprefix=/usr:安装路径;--buildtype=release: 此开关可确保构建过程完全优化,并禁用调试断言,否则在某些情况下库的运行速度会大幅降低。如果没有此开关,构建文件的大小可能会达到2 GB左右。
ubuntu 24.04系统默认安装了mesa 25.0.7,已经支持了GL、EGL、GLESv2、GLX、GLU,那么我们就不用在编译安装这些了。更多配置选项可以参考当前目录下meson_options.txt文件。
此外我们在进行编译安装的时候,最好是安装到一个独立的目录,而不是系统默认的 /usr 或 /usr/local,这样即使新版本有问题,你只需要取消环境变量就能立刻回到系统稳定状态。在终端中运行程序时,通过环境变量LD_LIBRARY_PATH指定库路径。
4.5.3 编译
root@NanoPC-T6:/userdata/mesa-25.0.7# ninja -C build -j6
4.5.4 安装
root@NanoPC-T6:/userdata/mesa-25.0.7# ninja -C build install
ninja: Entering directory `build'
......
[5/6] Installing files.
Installing src/panfrost/vulkan/libvulkan_panfrost.so to /usr/lib/aarch64-linux-gnu
Installing src/panfrost/vulkan/panfrost_icd.aarch64.json to /usr/share/vulkan/icd.d
Installing src/gallium/targets/rusticl/libRusticlOpenCL.so.1.0.0 to /usr/lib/aarch64-linux-gnu
Installing /userdata/mesa-25.0.7/src/util/00-mesa-defaults.conf to /usr/share/drirc.d
Installing /userdata/mesa-25.0.7/build/src/gallium/targets/rusticl/rusticl.icd to /etc/OpenCL/vendors
Installing symlink pointing to libRusticlOpenCL.so.1.0.0 to /usr/lib/aarch64-linux-gnu/libRusticlOpenCL.so.1
Installing symlink pointing to libRusticlOpenCL.so.1 to /usr/lib/aarch64-linux-gnu/libRusticlOpenCL.so
root@NanoPC-T6:/userdata/mesa-25.0.7# ldconfig
会将OpenCL库安装到/usr/lib/aarch64-linux-gnu目录;
root@NanoPC-T6:/userdata/mesa-25.0.7# find /usr | grep lib.*CL.*.so | xargs ls -l | sort
-rw-r--r-- 1 root root 67592 Jun 3 18:25 /usr/lib/aarch64-linux-gnu/samba/libLIBWBCLIENT-OLD-samba4.so.0
lrwxrwxrwx 1 root root 18 Apr 18 2024 /usr/lib/aarch64-linux-gnu/libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rw-r--r-- 1 root root 134584 Apr 18 2024 /usr/lib/aarch64-linux-gnu/libOpenCL.so.1.0.0
# ARM Mali GPU的专有OpenCL实现
lrwxrwxrwx 1 root root 18 Aug 23 2024 /usr/lib/aarch64-linux-gnu/mali/libMaliOpenCL.so -> libMaliOpenCL.so.1
-rwxr-xr-x 1 root root 69752 Sep 3 2024 /usr/lib/aarch64-linux-gnu/mali/libMaliOpenCL.so.1
lrwxrwxrwx 1 root root 14 Apr 18 2024 /usr/share/man/man7/libOpenCL.so.7.gz -> libOpenCL.7.gz
# 编译安装的mesa gallium rusticl OpenCL
lrwxrwxrwx 1 root root 21 Nov 13 15:20 /usr/lib/aarch64-linux-gnu/libRusticlOpenCL.so -> libRusticlOpenCL.so.1
lrwxrwxrwx 1 root root 25 Nov 13 15:20 /usr/lib/aarch64-linux-gnu/libRusticlOpenCL.so.1 -> libRusticlOpenCL.so.1.0.0
-rwxr-xr-x 1 root root 22844808 Nov 13 15:20 /usr/lib/aarch64-linux-gnu/libRusticlOpenCL.so.1.0.0
我们可以查看/etc/OpenCL/vendors/目录获取当前系统中可用的OpenCL平台;
root@NanoPC-T6:/userdata/mesa-25.0.7# ls -l /etc/OpenCL/vendors/
-rw-r--r-- 1 root root 19 May 13 2024 mali.icd
-rw-r--r-- 1 root root 22 Nov 10 16:35 rusticl.icd
root@NanoPC-T6:/userdata/mesa-25.0.7# cat /etc/OpenCL/vendors/rusticl.icd
libRusticlOpenCL.so.1
4.5 OpenGL测试
如果需要编写OpenGL程序,首先需要安装GL、EGL、GLES、GLES2、GLES3头文件;
root@NanoPC-T6:/userdata/mesa-25.0.7# apt install libgl-dev libegl-dev libgles-dev x11proto-dev
root@NanoPC-T6:/userdata/mesa-25.0.7# cd /usr/include
root@NanoPC-T6:/usr/include# ls GL EGL GLES GLES2 GLES3
EGL:
egl.h eglext.h eglextchromium.h eglmesaext.h eglplatform.h
GL:
gl.h glcorearb.h glext.h glx.h glxext.h glxint.h glxmd.h glxproto.h glxtokens.h internal
GLES:
egl.h gl.h glext.h glplatform.h
GLES2:
gl2.h gl2ext.h gl2platform.h
GLES3:
gl3.h gl31.h gl32.h gl3ext.h gl3platform.h
4.5.1 screenfetch
X11窗口管理系统,进入桌面,打开终端运行screenfetch命令进行测试:
pi@NanoPC-T6:/userdata$ sudo apt install screenfetch
pi@NanoPC-T6:/userdata$ screenfetch
4.5.2 glmark2
X11窗口管理系统,进入桌面,打开终端运行glmark2命令进行测试;
pi@NanoPC-T6:/userdata$ sudo apt install glmark2
pi@NanoPC-T6:/userdata$ glmark2
或者X11窗口管理系统,MobaXterm连接运行如下命令(注意使用pi用户,和桌面登陆的用户保持一致):
pi@NanoPC-T6:/userdata$ export DISPLAY=:0.0;glmark2
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: Mali-G610 (Panfrost)
GL_VERSION: 3.1 Mesa 25.0.7-0ubuntu0.24.04.1
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
Surface Size: 800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 1244 FrameTime: 0.804 ms
[build] use-vbo=true: FPS: 1266 FrameTime: 0.790 ms
[texture] texture-filter=nearest: FPS: 1259 FrameTime: 0.795 ms
[texture] texture-filter=linear: FPS: 1266 FrameTime: 0.790 ms
[texture] texture-filter=mipmap: FPS: 1254 FrameTime: 0.798 ms
[shading] shading=gouraud: FPS: 1162 FrameTime: 0.861 ms
[shading] shading=blinn-phong-inf: FPS: 1165 FrameTime: 0.859 ms
[shading] shading=phong: FPS: 1122 FrameTime: 0.891 ms
[shading] shading=cel: FPS: 1134 FrameTime: 0.882 ms
[bump] bump-render=high-poly: FPS: 857 FrameTime: 1.168 ms
[bump] bump-render=normals: FPS: 1384 FrameTime: 0.723 ms
[bump] bump-render=height: FPS: 1398 FrameTime: 0.716 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 1229 FrameTime: 0.814 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 773 FrameTime: 1.295 ms
[pulsar] light=false:quads=5:texture=false: FPS: 1224 FrameTime: 0.817 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 404 FrameTime: 2.478 ms
[desktop] effect=shadow:windows=4: FPS: 1031 FrameTime: 0.971 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 505 FrameTime: 1.981 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 502 FrameTime: 1.995 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 538 FrameTime: 1.859 ms
[ideas] speed=duration: FPS: 995 FrameTime: 1.005 ms
[jellyfish] <default>: FPS: 1058 FrameTime: 0.946 ms
[terrain] <default>: FPS: 99 FrameTime: 10.192 ms
[shadow] <default>: FPS: 876 FrameTime: 1.142 ms
[refract] <default>: FPS: 238 FrameTime: 4.218 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 1206 FrameTime: 0.830 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 1159 FrameTime: 0.863 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 1203 FrameTime: 0.832 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 1183 FrameTime: 0.845 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 1169 FrameTime: 0.856 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 1188 FrameTime: 0.842 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 1194 FrameTime: 0.838 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 1164 FrameTime: 0.859 ms
=======================================================
glmark2 Score: 1012
=======================================================
如果是在Wayland窗口管理系统,进入桌面运行glmark2是无法使用GPU加速的,这是因为GLX无法对接Wayland窗口管理系统。
4.5.3 demo
参考《OpenGL测试》中的demo。
4.6 OpenCL测试
4.6.1 clinfo
这里通过RUSTICL_ENABLE启动CL,具体可以参考https://docs.mesa3d.org/rusticl.html:
pi@NanoPC-T6:/userdata$ RUSTICL_ENABLE=panfrost clinfo
Number of platforms 1
Platform Name rusticl # 平台名称
Platform Vendor Mesa/X.org # 平台供应商
Platform Version OpenCL 3.0 # 平台版本
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_khr_byte_addressable_store cl_khr_create_command_queue cl_khr_expect_assume cl_khr_extended_versioning cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_il_program cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_integer_dot_product cl_khr_spirv_no_integer_wrap_decoration cl_khr_suggested_local_work_size cl_khr_3d_image_writes cl_khr_depth_images
Platform Extensions with Version cl_khr_icd 0x400000 (1.0.0)
cl_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_create_command_queue 0x400000 (1.0.0)
cl_khr_expect_assume 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
cl_khr_global_int32_base_atomics 0x400000 (1.0.0)
cl_khr_global_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_il_program 0x400000 (1.0.0)
cl_khr_local_int32_base_atomics 0x400000 (1.0.0)
cl_khr_local_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_integer_dot_product 0x800000 (2.0.0)
cl_khr_spirv_no_integer_wrap_decoration 0x400000 (1.0.0)
cl_khr_suggested_local_work_size 0x400000 (1.0.0)
cl_khr_3d_image_writes 0x400000 (1.0.0)
cl_khr_depth_images 0x400000 (1.0.0)
Platform Numeric Version 0xc00000 (3.0.0)
Platform Extensions function suffix MESA
Platform Host timer resolution 1ns
Platform Name rusticl
Number of devices 1
Device Name Mali-G610 (Panfrost) # 设备名称
Device Vendor Arm # 设备供应商
Device Vendor ID 0
Device Version OpenCL 3.0 # 设备版本
Device Numeric Version 0xc00000 (3.0.0)
Driver Version 25.0.7
Device OpenCL C Version OpenCL C 1.2 # 设备支持的 OpenCL C 版本
Device OpenCL C Numeric Version 0x402000 (1.2.0)
Device OpenCL C all versions OpenCL C 0xc00000 (3.0.0)
OpenCL C 0x402000 (1.2.0)
OpenCL C 0x401000 (1.1.0)
OpenCL C 0x400000 (1.0.0)
Device OpenCL C features __opencl_c_integer_dot_product_input_4x8bit 0x800000 (2.0.0)
__opencl_c_integer_dot_product_input_4x8bit_packed 0x800000 (2.0.0)
__opencl_c_int64 0x400000 (1.0.0)
__opencl_c_images 0x400000 (1.0.0)
__opencl_c_read_write_images 0x400000 (1.0.0)
__opencl_c_3d_image_writes 0x400000 (1.0.0)
Latest conformance test passed v0000-01-01-00
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 4
Max clock frequency 800MHz
Device Partition (core)
Max number of sub-devices 0
Supported partition types None
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
Preferred work group size multiple (device) 16
Preferred work group size multiple (kernel) 16
Max sub-groups per work group 0
Preferred / native vector sizes
char 1 / 1
short 1 / 1
int 1 / 1
long 1 / 1
half 0 / 0 (n/a)
float 1 / 1
double 0 / 0 (n/a)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals No
Infinity and NANs Yes
Round to nearest Yes
Round to zero No
Round to infinity No
IEEE754-2008 fused multiply-add No
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Double-precision Floating-point support (n/a)
Address bits 64, Little-Endian
Global memory size 12544702464 (11.68GiB)
Error Correction support No
Max memory allocation 2147483648 (2GiB)
Unified memory for Host and Device Yes
Shared Virtual Memory (SVM) capabilities (core)
Coarse-grained buffer sharing No
Fine-grained buffer sharing No
Fine-grained system sharing No
Atomics No
Minimum alignment for any data type 128 bytes
Alignment of base address 4096 bits (512 bytes)
Preferred alignment for atomics
SVM 0 bytes
Global 0 bytes
Local 0 bytes
Atomic memory capabilities relaxed, work-group scope
Atomic fence capabilities relaxed, acquire/release, work-group scope
Max size for global variable 0
Preferred total size of global vars 0
Global Memory cache type None
Image support Yes
Max number of samplers per kernel 32
Max size for 1D images from buffer 65536 pixels
Max 1D or 2D image array size 2048 images
Base address alignment for 2D image buffers 0 bytes
Pitch alignment for 2D image buffers 0 pixels
Max 2D image size 32768x32768 pixels
Max 3D image size 32768x32768x32768 pixels
Max number of read image args 128
Max number of write image args 64
Max number of read/write image args 64
Pipe support No
Max number of pipe args 0
Max active pipe reservations 0
Max pipe packet size 0
Local memory type Global
Local memory size 32768 (32KiB)
Max number of constant args 16
Max constant buffer size 67108864 (64MiB)
Generic address space support No
Max size of kernel argument 4096 (4KiB)
Queue properties (on host)
Out-of-order execution Yes
Profiling Yes
Device enqueue capabilities (n/a)
Queue properties (on device)
Out-of-order execution No
Profiling No
Preferred size 0
Max size 0
Max queues on device 0
Max events on device 0
Prefer user sync for interop Yes
Profiling timer resolution 0ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Non-uniform work-groups No
Work-group collective functions No
Sub-group independent forward progress No
IL version SPIR-V_1.0 SPIR-V_1.1 SPIR-V_1.2 SPIR-V_1.3 SPIR-V_1.4
ILs with version SPIR-V 0x400000 (1.0.0)
SPIR-V 0x401000 (1.1.0)
SPIR-V 0x402000 (1.2.0)
SPIR-V 0x403000 (1.3.0)
SPIR-V 0x404000 (1.4.0)
printf() buffer size 1048576 (1024KiB)
Built-in kernels (n/a)
Built-in kernels with version (n/a)
Device Extensions cl_khr_byte_addressable_store cl_khr_create_command_queue cl_khr_expect_assume cl_khr_extended_versioning cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_il_program cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_integer_dot_product cl_khr_spirv_no_integer_wrap_decoration cl_khr_suggested_local_work_size cl_khr_3d_image_writes cl_khr_depth_images
Device Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_create_command_queue 0x400000 (1.0.0)
cl_khr_expect_assume 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
cl_khr_global_int32_base_atomics 0x400000 (1.0.0)
cl_khr_global_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_il_program 0x400000 (1.0.0)
cl_khr_local_int32_base_atomics 0x400000 (1.0.0)
cl_khr_local_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_integer_dot_product 0x800000 (2.0.0)
cl_khr_spirv_no_integer_wrap_decoration 0x400000 (1.0.0)
cl_khr_suggested_local_work_size 0x400000 (1.0.0)
cl_khr_3d_image_writes 0x400000 (1.0.0)
cl_khr_depth_images 0x400000 (1.0.0)
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) rusticl
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [MESA]
clCreateContext(NULL, ...) [default] Success [MESA]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name rusticl
Device Name Mali-G610 (Panfrost)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name rusticl
Device Name Mali-G610 (Panfrost)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name rusticl
Device Name Mali-G610 (Panfrost)
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.3.2
ICD loader Profile OpenCL 3.0
可以看出系统已经安装了mesa gallium rusticl OpenCL ICD驱动程序,并且mesa gallium rusticl OpenCL ICD驱动程序识别到了Mali-G610 (Panfrost)设备。
rusticl 是Mesa实现的OpenCL平台,支持OpenCL 3.0规范,并且能够在Mali-G610(Panfrost驱动)上运行。
4.6.2 clpeak测试
clpeak用于测量OpenCL设备峰值能力的合成基准测试工具。它只测量使用矢量操作可以实现的峰值指标,并不代表真实世界的使用情况,具体参考《OpenCL测试》中的。
4.6.3 opencv-ocl-demo
这里以opencv-ocl-demo项目为例,安装OpenCV环境,并编译程序。
4.6.3.1 安装opencv 4.9
参考《opencv安装及配置》安装opencv 4.9版本。
首先安装依赖项:
root@NanoPC-T6:/userdata# apt install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libatlas-base-dev gfortran libgtk2.0-dev libjpeg-dev libpng-dev ffmpeg
打开浏览器下载安装包:
https://codeload.github.com/opencv/opencv/zip/refs/tags/4.9.0
解压,并配置:
root@NanoPC-T6:/userdata# unzip opencv-4.9.0.zip
root@NanoPC-T6:/userdata# cd opencv-4.9.0/
root@NanoPC-T6:/userdata# mkdir build
root@NanoPC-T6:/userdata# cd build
root@NanoPC-T6:/userdata/build# cmake .. -DWITH_CAMV4L2=ON
编译安装:
root@NanoPC-T6:/userdata/build# make -j7 # 执行make开始编译,这个时间比较长,耐心等待。
root@NanoPC-T6:/userdata/build# make install # 安装
默认安装到/usr/local路径下;比如:
/usr/local/include/opencv4:头文件安装目录;/usr/local/lib:库文件安装目录;
root@NanoPC-T6:/userdata/opencv-4.9.0/build# ls /usr/local/lib/
aarch64-linux-gnu libopencv_features2d.so.4.9.0 libopencv_imgcodecs.so.4.9.0 libopencv_photo.so.4.9.0
cmake libopencv_features2d.so.409 libopencv_imgcodecs.so.409 libopencv_photo.so.409
libopencv_calib3d.so libopencv_flann.so libopencv_imgproc.so libopencv_stitching.so
libopencv_calib3d.so.4.9.0 libopencv_flann.so.4.9.0 libopencv_imgproc.so.4.9.0 libopencv_stitching.so.4.9.0
libopencv_calib3d.so.409 libopencv_flann.so.409 libopencv_imgproc.so.409 libopencv_stitching.so.409
libopencv_core.so libopencv_gapi.so libopencv_ml.so libopencv_video.so
libopencv_core.so.4.9.0 libopencv_gapi.so.4.9.0 libopencv_ml.so.4.9.0 libopencv_video.so.4.9.0
libopencv_core.so.409 libopencv_gapi.so.409 libopencv_ml.so.409 libopencv_video.so.409
libopencv_dnn.so libopencv_highgui.so libopencv_objdetect.so libopencv_videoio.so
libopencv_dnn.so.4.9.0 libopencv_highgui.so.4.9.0 libopencv_objdetect.so.4.9.0 libopencv_videoio.so.4.9.0
libopencv_dnn.so.409 libopencv_highgui.so.409 libopencv_objdetect.so.409 libopencv_videoio.so.409
libopencv_features2d.so libopencv_imgcodecs.so libopencv_photo.so python3.12
root@NanoPC-T6:/userdata/opencv-4.9.0/build# ls /usr/local/include/opencv4/opencv2/
calib3d cvconfig.h features2d.hpp gapi.hpp imgcodecs.hpp ml.hpp opencv_modules.hpp stitching.hpp videoio.hpp
calib3d.hpp dnn flann highgui imgproc objdetect photo video
core dnn.hpp flann.hpp highgui.hpp imgproc.hpp objdetect.hpp photo.hpp video.hpp
core.hpp features2d gapi imgcodecs ml opencv.hpp stitching videoio
我们可以在/usr/local/include/opencv4/opencv2/cvconfig.h查看当前可以的后端(例如HAVE_MSMF、HAVE_VFW、HAVE_LIBV4L等)。
配置动态链接库,编辑/etc/ld.so.conf.d/libc.conf,文末加入/usr/local/lib,执行/sbin/ldconfig -v生效;
root@NanoPC-T6:/userdata/opencv-4.9.0/build# vim /etc/ld.so.conf.d/libc.conf
/usr/local/lib
root@NanoPC-T6:/userdata/opencv-4.9.0/build# ldconfig -v
4.6.3.2 安装OpenCL头文件
编写OpenCL程序,首先需要安装OpenCL头文件;
root@NanoPC-T6:/userdata# apt install opencl-headers
root@NanoPC-T6:/userdata# ll /usr/include/CL
-rw-r--r-- 1 root root 81631 Dec 12 2023 cl.h
-rw-r--r-- 1 root root 786 Dec 6 2023 cl2.hpp
-rw-r--r-- 1 root root 8057 Dec 12 2023 cl_d3d10.h
-rw-r--r-- 1 root root 8095 Dec 12 2023 cl_d3d11.h
-rw-r--r-- 1 root root 12246 Dec 12 2023 cl_dx9_media_sharing.h
-rw-r--r-- 1 root root 959 Dec 12 2023 cl_dx9_media_sharing_intel.h
-rw-r--r-- 1 root root 5672 Dec 12 2023 cl_egl.h
-rw-r--r-- 1 root root 128337 Jan 2 2024 cl_ext.h
-rw-r--r-- 1 root root 902 Dec 12 2023 cl_ext_intel.h
-rw-r--r-- 1 root root 33387 Dec 12 2023 cl_function_types.h
-rw-r--r-- 1 root root 12040 Dec 12 2023 cl_gl.h
-rw-r--r-- 1 root root 905 Dec 12 2023 cl_gl_ext.h
-rw-r--r-- 1 root root 10430 Dec 12 2023 cl_half.h
-rw-r--r-- 1 root root 11505 Dec 12 2023 cl_icd.h
-rw-r--r-- 1 root root 3544 Dec 12 2023 cl_layer.h
-rw-r--r-- 1 root root 43430 Dec 12 2023 cl_platform.h
-rw-r--r-- 1 root root 7090 Dec 12 2023 cl_va_api_media_sharing_intel.h
-rw-r--r-- 1 root root 3125 Dec 12 2023 cl_version.h
-rw-r--r-- 1 root root 970 Dec 12 2023 opencl.h
-rw-r--r-- 1 root root 396729 Dec 6 2023 opencl.hpp
创建/usr/lib/aarch64-linux-gnu/libOpenCL.so到libOpenCL.so.1的链接文件:
root@NanoPC-T6:/userdata/opencl-project/opencv-ocl-demo# ln -s /usr/lib/aarch64-linux-gnu/libOpenCL.so.1 /usr/lib/aarch64-linux-gnu/libOpenCL.so
查看库文件:
root@NanoPC-T6:/userdata/opencl-project/opencv-ocl-demo# ll /usr/lib/aarch64-linux-gnu/*OpenCL*
lrwxrwxrwx 1 root root 41 Nov 14 15:41 /usr/lib/aarch64-linux-gnu/libOpenCL.so -> /usr/lib/aarch64-linux-gnu/libOpenCL.so.1
# ocl-icd-libopencl1包安装(Generic OpenCL ICD Loader)
lrwxrwxrwx 1 root root 18 Apr 18 2024 /usr/lib/aarch64-linux-gnu/libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rw-r--r-- 1 root root 134584 Apr 18 2024 /usr/lib/aarch64-linux-gnu/libOpenCL.so.1.0.0
# mesa gallium rusticl OpenCL ICD驱动程序实现库(OpenCL开源实现)
lrwxrwxrwx 1 root root 21 Nov 13 15:20 /usr/lib/aarch64-linux-gnu/libRusticlOpenCL.so -> libRusticlOpenCL.so.1*
lrwxrwxrwx 1 root root 25 Nov 13 15:20 /usr/lib/aarch64-linux-gnu/libRusticlOpenCL.so.1 -> libRusticlOpenCL.so.1.0.0*
-rwxr-xr-x 1 root root 22844808 Nov 13 15:20 /usr/lib/aarch64-linux-gnu/libRusticlOpenCL.so.1.0.0*
4.6.3.3 opencv-ocl-demo
参考《opencv-ocl-demo》,创建opencv-ocl-demo项目。
配置并构建项目:
root@NanoPC-T6:/userdata/opencl-project/opencv-ocl-demo# rm -rf build
root@NanoPC-T6:/userdata/opencl-project/opencv-ocl-demo# cmake -S . -B build
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr/local (found version "4.9.0")
-- OpenCV library status:
-- config: /usr/local/lib/cmake/opencv4
-- version: 4.9.0
-- libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
-- include path: /usr/local/include/opencv4
-- Configuring done (0.9s)
-- Generating done (0.0s)
-- Build files have been written to: /userdata/opencl-project/opencv-ocl-demo/build
root@NanoPC-T6:/userdata/opencl-project/opencv-ocl-demo# cmake --build build
[ 50%] Building CXX object CMakeFiles/opencv_example.dir/main.cpp.o
[100%] Linking CXX executable opencv_example
[100%] Built target opencv_example
在开发板其中一个USB接口上接入USB摄像头,运行如下命令;在运行命令时我们设置了 RUSTICL_ENABLE=panfrost 环境变量,使用Rusticl OpenCL实现,并且专门启用Panfrost驱动作为OpenCL 后端;
root@NanoPC-T6:/userdata/opencl-project/opencv-ocl-demo# RUSTICL_ENABLE=panfrost ./build/opencv_example
mpp[42562]: kmpp_obj: kmpp_objdef_get invalid param def 0x7f87c72f10 name 0x7f87bdb860 objs (nil)
mpp[42562]: kmpp_frame: kmpp_frame_init KMPP_OBJ_NAME init failed
Platform Name:rusticl
Device name:Mali-G610 (Panfrost)
Use the OpenCL Deivice?1
GPU Time Cost:0.0248998s
GPU Time Cost:0.000130953s
GPU Time Cost:0.000140869s
GPU Time Cost:0.000284947s
GPU Time Cost:0.000288154s
......
并且显示图像:
五、ArmSoM-Sige7 GPU驱动移植
5.1 准备工作
我们在《Rockchip RK3588 - Rockchip Linux SDK编译》介绍了如何编译适用于ArmSoM-Sige7开发板的固件。编译使用的SDK源码如下:
root@ubuntu:/work/sambashare/rk3588/armsom# git clone --depth=1 https://github.com/ArmSoM/armsom-rk3588-bsp.git
由于该SDK使用的Linux kernel版本是5.10版本,在这个版本如果去移植Panthor驱动,会存在各种问题。
原因呢?也很好理解,Panthor驱动是在linux 6.10版本才合并进来的,其适配的linux版本远远高于5.10版本,因此如何移植到Linux kernel 5.10中编译会出现各种错误。
将当前目录下的kernel命名为kernel-5.10:
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# mv kernel kernel-5.10
5.1.1 下载内核
为此呢,这里我们去下载6.1版本的内核;
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# git clone --depth=1 https://github.com/armbian/linux-rockchip.git
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# mv linux-rockchip kernel-6.1
我们来看一下rk-6.1-rkr5.1分支的代码是否已经移植了Panthor源码,我们切换到目录drivers/gpu/drm目录查看是否存在子目录panthor,可以看到已经有了;

5.1.2 创建链接
创建符号链接:
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# ln -s kernel-6.1 kernel
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# ll
drwxr-xr-x 10 root root 4096 6月 9 2024 app/
drwxr-xr-x 17 root root 4096 11月 5 21:43 buildroot/
lrwxrwxrwx 1 root root 39 6月 9 2024 build.sh -> device/rockchip/common/scripts/build.sh*
lrwxrwxrwx 1 root root 22 6月 10 2024 common -> device/rockchip/common/
drwxr-xr-x 9 root root 4096 11月 6 21:59 debian/
drwxr-xr-x 3 root root 4096 6月 9 2024 device/
drwxr-xr-x 6 root root 4096 6月 9 2024 docs/
drwxr-xr-x 28 root root 4096 7月 7 2024 external/
drwxr-xr-x 8 root root 4096 1月 20 2025 .git/
-rwxr-xr-x 1 root root 27 6月 24 2024 http_server.sh*
lrwxrwxrwx 1 root root 10 11月 6 22:29 kernel -> kernel-6.1
drwxr-xr-x 27 root root 4096 11月 6 22:03 kernel-5.10/
drwxr-xr-x 28 root root 4096 11月 9 15:15 linux-rockchip/
lrwxrwxrwx 1 root root 31 6月 9 2024 Makefile -> device/rockchip/common/Makefile
drwxr-xr-x 6 root root 4096 11月 6 23:24 output/
drwxr-xr-x 3 root root 4096 6月 9 2024 prebuilts/
lrwxrwxrwx 1 root root 32 6月 10 2024 README.md -> device/rockchip/common/README.md
drwxr-xr-x 9 root root 4096 7月 19 2024 rkbin/
lrwxrwxrwx 1 root root 41 6月 9 2024 rkflash.sh -> device/rockchip/common/scripts/rkflash.sh*
drwxr-xr-x 2 root root 4096 6月 24 2024 rootfs/
-rw-r--r-- 1 root root 33555 1月 2 2025 test.log
drwxr-xr-x 5 root root 4096 6月 9 2024 tools/
drwxr-xr-x 25 root root 4096 11月 6 21:59 u-boot/
drwxr-xr-x 5 root root 4096 6月 9 2024 uefi/
drwxr-xr-x 9 root root 4096 6月 9 2024 yocto/
5.1.3 内核配置
ArmSoM-Sige7开发板内核编译使用的板级配置是rockchip_linux_defconfig,该文件位于arch/arm64/configs目录下;
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel# ll arch/arm64/configs/rockchip_linux_defconfig
-rw-r--r-- 1 root root 17781 11月 9 15:15 arch/arm64/configs/rockchip_linux_defconfig
此外还有一个芯片特定配置rk3588_linux.config;
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel# cat arch/arm64/configs/rk3588_linux.config
# CONFIG_BCMDHD_SDIO=y is not set
CONFIG_BCMDHD_PCIE=y
CONFIG_MALI_CSF_SUPPORT=y
5.2 编译安装
5.2.1 板级配置和设备树
修改rockchip_rk3588_sige7_defconfig文件:
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# vim ./device/rockchip/.chips/rk3588/rockchip_rk3588_sige7_defconfig
RK_YOCTO_CFG="rockchip-rk3588-evb"
#RK_KERNEL_VERSION="5.10"
RK_KERNEL_VERSION="6.1"
RK_KERNEL_DTS_NAME="rk3588-armsom-sige7"
RK_USE_FIT_IMG=y
RK_PACKAGE_FILE_CUSTOM=y
设备树位于:
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# ll kernel-6.1/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
-rwxr-xr-x 1 root root 18379 11月 9 15:15 kernel-6.1/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
5.2.2 清理
首先执行清理工作:
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# ./build.sh cleanall
Log saved at /work/sambashare/rk3588/armsom/armsom-rk3588-bsp/output/sessions/2025-11-06_21-58-28
make: Entering directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel-5.10'
CLEAN certs
CLEAN drivers/firmware/efi/libstub
CLEAN drivers/misc/lkdtm
CLEAN drivers/scsi
CLEAN drivers/tty/vt
CLEAN fs/unicode
CLEAN kernel
CLEAN lib
......
CLEAN scripts/kconfig
CLEAN include/config include/generated spl tpl
CLEAN .config .config.old include/autoconf.mk include/autoconf.mk.dep include/config.h
make: Leaving directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/u-boot'
Running build.sh - cleanall succeeded.
5.2.3 编译内核
执行如下命令编译内核:
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# ./build.sh kernel
WARN: /work/sambashare/rk3588/armsom/armsom-rk3588-bsp/output/defconfig not exists
Pick a defconfig:
1. rockchip_defconfig
2. rockchip_rk3588_evb1_lp4_v10_defconfig
3. rockchip_rk3588_evb7_v11_defconfig
4. rockchip_rk3588_sige7_defconfig
5. rockchip_rk3588s_evb1_lp4x_v10_defconfig
Which would you like? [1]: 4
输出详情如下:
点击查看代码
Switching to defconfig: /work/sambashare/rk3588/armsom/armsom-rk3588-bsp/device/rockchip/.chip/rockchip_rk3588_sige7_defconfig
make: Entering directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/device/rockchip/common'
......
make[1]: Leaving directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/device/rockchip/common/kconfig'
#
# configuration written to /work/sambashare/rk3588/armsom/armsom-rk3588-bsp/output/.config
#
make: Leaving directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/device/rockchip/common'
==========================================
Final configs
==========================================
RK_BOOT_FIT_ITS=boot.its
RK_BOOT_IMG=boot.img
RK_BUILDROOT_CFG=rockchip_rk3588
RK_CHIP=rk3588
RK_CHIP_FAMILY=rk3588
RK_DEBIAN_ARCH=arm64
RK_DEBIAN_ARM64=y
RK_DEBIAN_VERSION=bullseye
RK_DEFCONFIG=/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/device/rockchip/.chips/rk3588/rockchip_rk3588_sige7_defconfig
RK_EXTRA_PARTITION_NUM=2
RK_EXTRA_PARTITION_STR=oem:oem:/oem:ext4:defaults:normal:auto:@userdata:userdata:/userdata:ext4:defaults:normal:auto:@@@
RK_KERNEL_ARCH=arm64
RK_KERNEL_ARM64=y
RK_KERNEL_CFG=rockchip_linux_defconfig
RK_KERNEL_CFG_FRAGMENTS=rk3588_linux.config
RK_KERNEL_DTB=kernel/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dtb
RK_KERNEL_DTS=kernel/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
RK_KERNEL_IMG=kernel/arch/arm64/boot/Image
RK_KERNEL_KBUILD_ARCH=host
RK_KERNEL_KBUILD_HOST=y
RK_KERNEL_VERSION=6.1
RK_KERNEL_VERSION_REAL=6.1
RK_MISC=y
RK_MISC_BLANK=y
RK_PACKAGE_FILE=package-file
RK_PACKAGE_FILE_CUSTOM=y
RK_PARAMETER=parameter.txt
RK_PCBA_CFG=rockchip_rk3588_pcba
RK_RECOVERY_CFG=rockchip_rk3588_recovery
RK_RECOVERY_FIT_ITS=boot4recovery.its
RK_ROOTFS_IRQBALANCE=y
RK_ROOTFS_OVERLAY_DIRS=y
RK_ROOTFS_SYSTEM=buildroot
RK_ROOTFS_SYSTEM_BUILDROOT=y
RK_ROOTFS_TYPE=ext4
RK_ROOTFS_UDEV_RULES=y
RK_SAVE_TRACKED=y
RK_SESSION=2025-11-09_15-17-30
RK_UBOOT_ARCH=arm64
RK_UBOOT_ARM64=y
RK_UBOOT_CFG=rk3588
RK_UPDATE=y
RK_USB_ADBD=y
RK_USB_ADBD_BASH=y
RK_USB_ADBD_TCP_PORT=5555
RK_USE_FIT_IMG=y
RK_WIFIBT_CHIP=ALL_AP
RK_YOCTO_CFG=rockchip-rk3588-evb
RK_YOCTO_CHROMIUM=y
RK_YOCTO_DISPLAY_PLATFORM=wayland
RK_YOCTO_DISPLAY_PLATFORM_WAYLAND=y
RK_YOCTO_USBMOUNT=y
Toolchain for kernel:
/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
==========================================
Start building kernel
==========================================
+ make -C /work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel/ -j7 CROSS_COMPILE=/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 rockchip_linux_defconfig rk3588_linux.config
make: Entering directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel-6.1'
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
Using .config as base
Merging ./arch/arm64/configs/rk3588_linux.config
Value of CONFIG_BCMDHD_PCIE is redefined by fragment ./arch/arm64/configs/rk3588_linux.config:
Previous value: # CONFIG_BCMDHD_PCIE is not set
New value: CONFIG_BCMDHD_PCIE=y
Value of CONFIG_MALI_CSF_SUPPORT is redefined by fragment ./arch/arm64/configs/rk3588_linux.config:
Previous value: # CONFIG_MALI_CSF_SUPPORT is not set
New value: CONFIG_MALI_CSF_SUPPORT=y
#
# merged configuration written to .config (needs make)
#
.config:7862:warning: override: BCMDHD_PCIE changes choice state
#
# configuration written to .config
#
make: Leaving directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel-6.1'
+ make -C /work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel/ -j7 CROSS_COMPILE=/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 rk3588-armsom-sige7.img
make: Entering directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel-6.1'
SYNC include/config/auto.conf.cmd
UPD include/config/kernel.release
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
WRAP arch/arm64/include/generated/uapi/asm/errno.h
WRAP arch/arm64/include/generated/uapi/asm/ioctl.h
......
LD [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmdhd.ko
LD vmlinux
NM System.map
SORTTAB vmlinux
OBJCOPY arch/arm64/boot/Image
LZ4C arch/arm64/boot/Image.lz4
Image: resource.img (with rk3588-armsom-sige7.dtb logo.bmp logo_kernel.bmp) is ready
Image: boot.img (with Image resource.img) is ready
Image: zboot.img (with Image.lz4 resource.img) is ready
make: Leaving directory '/work/sambashare/rk3588/armsom/armsom-rk3588-bsp/kernel-6.1'
+ /work/sambashare/rk3588/armsom/armsom-rk3588-bsp/device/rockchip/common/scripts/mk-fitimage.sh kernel/boot.img boot.its k ernel/arch/arm64/boot/Image
FIT description: U-Boot FIT source file for arm
Created: Sun Nov 9 15:25:11 2025
Image 0 (fdt)
Description: unavailable
Created: Sun Nov 9 15:25:11 2025
Type: Flat Device Tree
Compression: uncompressed
Data Size: 272425 Bytes = 266.04 KiB = 0.26 MiB
Architecture: AArch64
Load Address: 0xffffff00
Hash algo: sha256
Hash value: ec2780e746c5b0b61f6be6b89762af73fee13afaba8eabe309b99cba28441cf2
Image 1 (kernel)
Description: unavailable
Created: Sun Nov 9 15:25:11 2025
Type: Kernel Image
Compression: uncompressed
Data Size: 40155648 Bytes = 39214.50 KiB = 38.30 MiB
Architecture: AArch64
OS: Linux
Load Address: 0xffffff01
Entry Point: 0xffffff01
Hash algo: sha256
Hash value: 6dfb51c1362f7be153f6c1a67b59079b8d4758415e89ffa1770d4482d9653e24
Image 2 (resource)
Description: unavailable
Created: Sun Nov 9 15:25:11 2025
Type: Multi-File Image
Compression: uncompressed
Data Size: 310784 Bytes = 303.50 KiB = 0.30 MiB
Hash algo: sha256
Hash value: a89f740eb0140b3dadac4c6f53e9117c9d2bee9e7957899e03589da2b6512883
Default Configuration: 'conf'
Configuration 0 (conf)
Description: unavailable
Kernel: kernel
FDT: fdt
Not Found io-domains in kernel/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
Running 10-kernel.sh - build_kernel succeeded.
编译生成boot.img;
root@ubuntu:/work/sambashare/rk3588/armsom/armsom-rk3588-bsp# ll kernel/boot.img
-rw-r--r-- 1 root root 40742400 11月 9 15:25 kernel/boot.img
5.3 烧录测试
关于ArmSoM-Sige7开发板的固件烧录可以参考《4.2 Linux刷机》,而有关Mesa安装以及测试参考NanopC T6开发板部分,这里不做重复介绍了。
六、Panthor驱动源码分析
6.1 驱动入口
驱动入口文件在drivers/gpu/drm/panthor/panthor_drv.c,在该文件我们可以看到支持的GPU型号;
static const struct of_device_id dt_match[] = {
{ .compatible = "rockchip,rk3588-mali" },
{ .compatible = "arm,mali-valhall-csf" },
{}
};
MODULE_DEVICE_TABLE(of, dt_match);
static DEFINE_RUNTIME_DEV_PM_OPS(panthor_pm_ops,
panthor_device_suspend,
panthor_device_resume,
NULL);
static struct platform_driver panthor_driver = {
.probe = panthor_probe,
.remove_new = panthor_remove,
.driver = {
.name = "panthor",
.pm = &panthor_pm_ops,
.of_match_table = dt_match,
},
};
6.2 gpu设备节点
在arch/arm64/boot/dts/rockchip/rk3588s.dtsi中我们可以定位到gpu设备节点;
gpu: gpu@fb000000 {
compatible = "rockchip,rk3588-mali", "arm,mali-valhall-csf";
reg = <0x0 0xfb000000 0x0 0x200000>;
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "job", "mmu", "gpu";
clock-names = "core", "coregroup", "stacks";
clocks = <&cru CLK_GPU>, <&cru CLK_GPU_COREGROUP>,
<&cru CLK_GPU_STACKS>;
assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
assigned-clock-rates = <200000000>;
power-domains = <&power RK3588_PD_GPU>;
operating-points-v2 = <&gpu_opp_table>;
#cooling-cells = <2>;
dynamic-power-coefficient = <2982>;
status = "disabled";
};
在arch/arm64/boot/dts/rockchip/rk3588-nanopi6-common.dtsi中可以定位到:
&gpu {
mali-supply = <&vdd_gpu_s0>;
mem-supply = <&vdd_gpu_mem_s0>;
upthreshold = <60>;
downdifferential = <30>;
status = "okay";
};
其中:
compatible:说明了设备兼容的驱动名称,即"rockchip,rk3588-mali";可以看到rockchip,rk3588-mali是和panfrost驱动相匹配的,因此会执行驱动的.probe函数,这里就不深入研究了;reg:指定了寄存器的基地址和大小,即基地址0xfb000000,大小为0x200000;interrupts和interrupt-names:分别指定了该设备所使用的中断号和中断的名称;clocks:指定了使用哪个时钟控制器(CRU)提供GPU时钟;power-domains:用于指定设备所属的电源域,即RK3588_PD_GPU;mali-supply:指定了GPU设备使用的电源管脚;status:指定GPU设备的状态("okay" 表示设备正常工作)。
参考文章:
[1] Rockchip RK3399 - Mali-T860 GPU驱动 (mesa+Panfrost)
[3] ARM Mali GPU Upstream software, aka Lima/Panfrost
[4] https://github.com/jacobchencc/panthor
[5] https://github.com/jacobchencc/panthor-linux6.12
[6] Firefly Kernel 6.1 SDK supports Panthor & Panfrost + MESA 25.0.7. Support OpenGL and Vulkan

浙公网安备 33010602011771号