Firefly开源社区

标题: 0.8.8RKNPU驱动更新到0.96版本报错 [打印本页]

作者: wx__hIg5R5    时间: 2024-9-11 09:53
标题: 0.8.8RKNPU驱动更新到0.96版本报错
按照网站https://wiki.t-firefly.com/zh_CN ... /linux_compile.html的步骤,在不对rknpu文件夹进行替换前,是可以正常编译出自己的镜像的,说明编译的软件环境没有问题。


按照瑞芯微官方的文档


我做了两次尝试:(1)只对firefly提供的Linux SDK的rknpu进行替换,即只替换 kernel/driver/rknpu文件


(2)将瑞芯微官方5.10.198kernel 替换 SDK下的kernel文件,也报错
processing option: extboot
============Start building kernel============
TARGET_ARCH          =arm64
TARGET_KERNEL_CONFIG =rockchip_linux_defconfig
TARGET_KERNEL_DTS    =roc-rk3588s-pc-mipi101-M101014-BE45-A1
TARGET_KERNEL_CONFIG_FRAGMENT =rk3588_linux.config firefly-linux.config
==========================================
/home/px/proj/rk3588_sdk
#
# 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:7203:warning: override: BCMDHD_PCIE changes choice state
#
# configuration written to .config
#
scripts/kconfig/Makefile:93: *** No configuration exists for this target on this architecture.  Stop.
Makefile:639: recipe for target 'firefly-linux.config' failed
make[1]: *** [firefly-linux.config] Error 2
Makefile:357: recipe for target '__build_one_by_one' failed
make: *** [__build_one_by_one] Error 2
ERROR: Running build_extboot failed!
ERROR: exit code 2 from line 784:
    make ARCH=$RK_ARCH $RK_KERNEL_DEFCONFIG $RK_KERNEL_DEFCONFIG_FRAGMENT

请问要怎样才能成功将0.8.8的NPU驱动更新到0.96
tchip_askquestions

报错log.txt

1.5 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1


作者: lanzj    时间: 2024-9-11 10:38
第一种内核版本问题,将报错的函数改成vma->vm_flags |= VM_MIXEDMAP和vma->vm_flags &= ~VM_PFNMAP的形式,而不是vm_flags_set 或者vm_flags_clear
作者: wx__hIg5R5    时间: 2024-9-11 16:04
本帖最后由 wx__hIg5R5 于 2024-9-11 22:05 编辑
lanzj 发表于 2024-9-11 10:38
第一种内核版本问题,将报错的函数改成vma->vm_flags |= VM_MIXEDMAP和vma->vm_flags &= ~VM_PFNMAP的形式 ...

哥,太强了。我解决了。
进入rknpu目录下的rknpu_gem.c
把vm_flags_set()和vm_flags_clear()的函数注释掉
//vm_flags_set(vma, VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP | VM_IO);
//vm_flags_clear(vma, VM_PFNMAP);

vm_flags_set()函数用这句代替:vma->vm_flags |= VM_MIXEDMAP;
vm_flags_clear()函数用这句代替:vma->vm_flags &= ~VM_PFNMAP;





欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1