Skip to content

Commit 3ab5e2b

Browse files
author
mofeng-git
committed
fix: 修复 OEC TURBO 硬件编解码权限问题
1 parent 65874c6 commit 3ab5e2b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build/functions/devices.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,17 @@ config_oec_turbo_files() {
384384
echo "信息:配置 VPU 硬件编码支持..."
385385
run_in_chroot "sed -i 's/--h264-hwenc=disabled/--h264-hwenc=rkmpp/g' /etc/kvmd/override.yaml"
386386

387+
run_in_chroot "cat > /etc/udev/rules.d/99-kvmd-hw-access.rules <<'EOF'
388+
SUBSYSTEM=="dma_heap", KERNEL=="system-uncached", GROUP="render", MODE="0660"
389+
KERNEL=="mpp_service", GROUP="render", MODE="0660"
390+
EOF"
391+
392+
387393
# 配置 rc.local 自启脚本,添加设备权限设置
388394
echo "信息:配置 rc.local 自启脚本..."
389395
run_in_chroot "cat > /etc/rc.local << 'EOF'
390396
#!/bin/bash
391-
chmod 777 /dev/mpp_service /dev/rga
397+
usermod -aG render,video kvmd
392398
exit 0
393399
EOF"
394400
run_in_chroot "chmod +x /etc/rc.local"

0 commit comments

Comments
 (0)