|
发表于 2021-8-31 22:38:46
14979 浏览 2 回复
编译nxp官方yocto在imx6q开发板运行, gpu不能正常工作
我在使用imx-yocto-L4.14.98_2.0.0_ga构建系统时遇到了问题, 我的硬件平台使用的是topeet imx6q开发板,
yocto执行配置是MACHINE=imx6qsabresd DISTRO=fsl-imx-wayland source fsl-setup-release.sh -b build_wayland,
构建目标为fsl-image-gui
=========================================================================================
构建完成后,系统在板子上可以正常,但是使用根目录下unit_tests/GPU中的脚本测试gpu时,出现了错误
执行guninfo.sh时出现下面错误提示
---- Running < gpuinfo.sh > test ----
GPU Info
cat: /sys/kernel/debug/gc/info: No such file or directory
cat: /sys/kernel/debug/gc/meminfo: No such file or directory
CMA memory info
cat: /sys/kernel/debug/gc/allocators/cma/cmausage: No such file or directory
cat: /sys/kernel/debug/gc/idle: No such file or directory
cat: /sys/kernel/debug/gc/clients: No such file or directory
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
cat: /sys/kernel/debug/gc/idle: No such file or directory
Idle percentage:%
执行gpu.sh出现下面错误提示
[ 1] Failed to open device: No such file or directory, Try again...
[ 2] Failed to open device: No such file or directory, Try again...
[ 3] Failed to open device: No such file or directory, Try again...
[ 4] Failed to open device: No such file or directory, Try again...
[ 5] _OpenDevice(1228): FATAL: Failed to open device, errno=No such file or directory.
=========================================================================================
同时,我进一步阅读了yocto中构建内核的菜单linux-imx_4.14.98.bb源码,当没指定MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT="1"时,
内核构建会依赖于kernel-module-imx-gpu-viv菜单,该菜单中指定从内核的imx_4.9.88_2.0.0_ga分支中找到gpu驱动,并把他编译成内核的模块
kernel-module-imx-gpu-viv菜单部分源码如下:
SRCBRANCH = "imx_4.9.88_2.0.0_ga"
LOCALVERSION = "-${SRCBRANCH}"
KERNEL_SRC ?= "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https"
SRC_URI = " \
${KERNEL_SRC};branch=${SRCBRANCH};subpath=drivers/mxc/gpu-viv;destsuffix=git/src \
file://Add-makefile.patch \
"
SRCREV = "5e23f9d6114784d77fd4ed5848953356c3575532"
S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE += "CONFIG_MXC_GPU_VIV=m"
KERNEL_MODULE_AUTOLOAD = "galcore"
COMPATIBLE_MACHINE = "(imx)"
galcore.ko存放在/lib/modules/4.14.98-imx_4.14.98_2.0.0_ga+g5d6cbeafb80c/extra/目标下,在系统启动时,驱动galcore.ko已经被自动被加载到内核。
遗憾的是,装载该驱动后,gpu仍然不能工作!请问你还有其他方法帮助我解决这个问题吗?非常感谢!
|
|
|
|
|
|
|
|
楼主|
发表于 2021-9-7 12:16:36
不是内核版本的问题,我单独下载了linux-imx_4.14.98版本内核,使用arm-linux-gcc进行交叉编译,通过make menuconfig配置将gpu驱动编译进内核。编译好的镜像烧写进去后,/dev/galcare节点没有被创建,gpu驱动也不能正常工作。 |
|
|
|
|
|
|
登录或注册
扫一扫关注迅为公众号
|