rk3588 根目录只读 想修改为可写
/etc/init/myinit.cfg
{
"import" : [],
"jobs" : [{
"name" : "init",
"cmds" : [
"exec /bin/mkdir -p /data/aa",
"exec /bin/mount -o remount,rw /"
]
}
]
}
aa 目录建立了,但是 mount 根目录 重新 安装为可写始终 不成功
放到其他位置一样。。
手工执行 /bin/mount -o remount,rw / 可以修改 可写
另外这里修改了 可读写 系统起来 也没有生效,必须手动执行命令 remount
# cat /vendor/etc/fstab.dayu210
# fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/fe2e0000.mmc/by-name/system / ext4 rw,barrier=1 wait,required
/dev/block/platform/fe2e0000.mmc/by-name/vendor /vendor ext4 ro,barrier=1 wait,required
/dev/block/platform/fe2e0000.mmc/by-name/sys-prod /sys_prod ext4 ro,barrier=1 wait
/dev/block/platform/fe2e0000.mmc/by-name/chip-prod /chip_prod ext4 ro,barrier=1 wait
/dev/block/platform/fe2e0000.mmc/by-name/userdata /data f2fs discard,noatime,nosuid,nodev,fscrypt=2:aes-256-cts:aes-256-xts wait,check,fileencryption=software,quota
/dev/block/platform/fe2e0000.mmc/by-name/misc /misc none none wait,required
# cat /proc/cmdline
earlycon=uart8250,mmio32,0xfeb50000 root=PARTUUID=614e0000-0000 rw rootwait rootfstype=ext4 console=ttyFIQ0 hardware=dayu210 default_boot_device=fe2e0000.mmc ohos.required_mount.system=/dev/block/
platform/fe2e0000.mmc/by-name/system@/usr@ext4@rw,barrier=1@wait,required ohos.required_mount.vendor=/dev/block/platform/fe2e0000.mmc/by-name/vendor@/vendor@ext4@rw,barrier=1@wait,required ohos.re
quired_mount.misc=/dev/block/platform/fe2e0000.mmc/by-name/misc@none@none@none@wait,required ohos.required_mount.bootctrl=/dev/block/platform/fe2e0000.mmc/by-name/bootctrl@none@none@none@wait,requ
ired
可以试试在init/services/init/standard/switch_root.c中SwitchRoot函数,mount函数添加读写权限参数
系统挂载system和vendor的时候优先会读取cmdline里面的配置,fstab.dayu210里面的对应配置并不会采用,可以尝试修改设备树里面的bootargs看看
device/soc/rockchip/rk3588/kernel/arch/arm64/boot/dts/rockchip/rk3588-linux.dtsi