清空記錄
歷史記錄
取消
清空記錄
歷史記錄
本文適用OpenHarmony開源鴻蒙系統(tǒng),本次使用的是開源鴻蒙主板,搭載瑞芯微RK3568芯片。
深圳觸覺智能專注研發(fā)生產(chǎn)OpenHarmony開源鴻蒙硬件,包括核心板、開發(fā)板、嵌入式主板,
工控整機等,提供瑞芯微RK3566、RK3568、RK3588、RK3562、RK3576等國產(chǎn)化嵌入式產(chǎn)品方案。
/vendor/etc/
,如下圖所示:C:\Users\industio>hdc shell
# cd vendor/etc/
# ls
audio fstab.rk3568 iqfil.json soc_perf
battery hdfconfig iqfiles thermal_config
cgroup_sched init ons
distributedhardware init.rk3568.cfg param
firmware init.rk3568.usb.cfg ressched"
將需要需要修改的cfg文件從文件系統(tǒng)中拉下來放在本地目錄,命令
是:hdc file recv '系統(tǒng)路徑' '本地文件路徑'
,如下圖所示:
C:\Users\industio>hdc file recv /vendor/etc/init.rk3568.cfg D:\
[I][2024-07-25 10:49:35] HdcFile::TransferSummary success
FileTransfer finish, Size:3581, File count = 1, time:127ms rate:28.20kB/s
三、修改文件
在cfg文件中增加權(quán)限,注意在對文件修改不要使用TAB鍵,復(fù)制前一行代碼后再修改防止出錯
{
"import" : [
"init.${ohos.boot.hardware}.usb.cfg"
],
"jobs" : [{
"name" : "pre-init",
"cmds" : [
"write /proc/sys/vm/min_free_kbytes 10240",
"mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755",
"write /sys/kernel/debug/hisi_inno_phy/role peripheral"
]
}, {
"name" : "init",
"cmds" : [
"write /proc/1/oom_score_adj -1000",
"chown system system /sys/kernel/hungtask/userlist",
"symlink /dev/block/platform/fe310000.sdhci/by-name /dev/block/by-name"
]
}, {
"name" : "boot", //在此位置添加設(shè)備權(quán)限
"cmds" : [
"write /sys/block/zram0/disksize 1024M",
"mkswap /dev/block/zram0",
"swapon /dev/block/zram0",
"chmod 777 /dev/ttyAMA2",
+ "chmod 666 /dev/bus/usb/005/001"
+ "chmod 666 /dev/bus/usb/005/002"
"chmod 775 /sys/class/rfkill/rfkill0/state",
]
}, {
"name" : "post-fs-data",
"cmds" : [
"restorecon",
"restorecon /data/updater"
]
}
],
"services" : [{
"name" : "ispserver",
"path" : ["/vendor/bin/ispserver"],
"once" : 1,
"secon" : "u:r:ispserver:s0",
"uid": "ispserver",
"gid": [ "ispserver", "camera_host" ]
}
]
}
當修改完成后將文件推送回去,命令如下:
hdc shell mount -o remount,rw /vendor //重新掛載設(shè)備,將設(shè)備改為可讀可寫
hdc file send “本地路徑” “/vendor/etc/init.rkxxx.cfg” //將修改好的文件覆蓋到系統(tǒng)當中
hdc shell reboot //將文件推送回去,系統(tǒng)重啟
RK3568鴻蒙開發(fā)板 購買鏈接
https://item.taobao.com/item.htm?ft=t&id=803728133226
END