完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
1.分区表参数文件修改 device/rockchip/rk3288/parameter.txt
新增128M bkdata分区: 0x00040000@0x006BC000(bkdata),-@0x006FC000(userdata) FIRMWARE_VER:7.1 MACHINE_MODEL:rk3288 MACHINE_ID:007 MANUFACTURER:RK3288 MAGIC: 0x5041524B ATAG: 0x60000800 MACHINE: 3288 CHECK_MASK: 0x80 PWR_HLD: 0,0,A,0,1 CMDLINE: console=ttyFIQ0 androidboot.baseband=N/A androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00002000@0x00004000(trust),0x00002000@0x00006000(misc),0x00008000@0x00008000(resource),0x0000C000@0x00010000(kernel),0x00010000@0x0001C000(boot),0x00010000@0x0002C000(recovery),0x00038000@0x0003C000(backup),0x00040000@0x00074000(cache),0x00500000@0x000B4000(system),0x00008000@0x005B4000(metadata),0x00080000@0x005BC000(vendor0),0x00080000@0x0063C000(vendor1),0x00040000@0x006BC000(bkdata),-@0x006FC000(userdata) 在内核log信息中可以看到 [ 1.025640] bkdata: 0x0d7800000 -- 0x0df800000 (128 MB) [ 1.025259] mmcblk1rpmb: mmc1:0001 8GTF4R partition 3 512 KiB [ 1.025534] uboot: 0x000400000 -- 0x000800000 (4 MB) [ 1.025544] trust: 0x000800000 -- 0x000c00000 (4 MB) [ 1.025551] misc: 0x000c00000 -- 0x001000000 (4 MB) [ 1.025574] resource: 0x001000000 -- 0x002000000 (16 MB) [ 1.025581] kernel: 0x002000000 -- 0x003800000 (24 MB) [ 1.025588] boot: 0x003800000 -- 0x005800000 (32 MB) [ 1.025594] recovery: 0x005800000 -- 0x007800000 (32 MB) [ 1.025601] backup: 0x007800000 -- 0x00e800000 (112 MB) [ 1.025607] cache: 0x00e800000 -- 0x016800000 (128 MB) [ 1.025614] system: 0x016800000 -- 0x0b6800000 (2560 MB) [ 1.025620] metadata: 0x0b6800000 -- 0x0b7800000 (16 MB) [ 1.025627] vendor0: 0x0b7800000 -- 0x0c7800000 (256 MB) [ 1.025633] vendor1: 0x0c7800000 -- 0x0d7800000 (256 MB) [ 1.025640] bkdata: 0x0d7800000 -- 0x0df800000 (128 MB) [ 1.025646] userdata: 0x0df800000 -- 0x1d1c00000 (3876 MB) [ 1.025674] mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 分区定义说明: 1、为了兼容性,目前RK所有AP都是用rk29xxnand做标识。 2、单个分区说明: 例如:0x00002000@0x00008000(boot),@符号之前的数值是分区大小,@符号之后的数值是分区的起始位置,括号里面的字符是分区的名字。所有数值的单位是sector,1个sector为512Bytes.上例中,boot分区起始位置为0x8000 sectors位置,大小为0x2000 sectors(4MB)。 3、为了性能,每个分区起始地址需要32KB(64 sectors)对齐,大小也需要32KB的整数倍。 4、如果使用sparse格式的镜像,升级时会擦除数据,为了兼容性更好,对应的分区最好按4MB对齐,大小也按4MB整数倍配置。 2.fstab文件中添加相关配置 2.1 在device/rockchip/rk3288/fstab.rk30board.bootmode.emmc.rk3288w中添加分区文件系统格式的静态信息 /dev/block/platform/ff0f0000.dwmmc/by-name/bkdata /bkdata ext4 noatime,nodiratime,nosuid ,nodev,discard wait0,auto_da_alloc,discard wait0,check 2.2在device/rockchip/rk3f288/recovery.emm stab中添加分区,recovery中需要分区的时候使用 /dev/block/platform/fff0000.dwmmc/by-name/ bkdata /bkdata ext4 defaults defaults 3.init.*.rc文件中添加相关配置 3.1 在device/rockchip/common/recovery/etc/init.rc中创建目录,recovery中使用 mkdir /bkdata 3.2 在device/rockchip/common /init.rockchip.rc中添加挂载方式,修改挂载目录权限 mkdir /bkdata 0777系统系统 mount ext4 mtd@bkdata /bkdata wait noatime nodiratime nosuid nodev noauto_da_alloc 3.3 in device/rockchip/common/init.rk30board.rc中初始化安全 restorecon_recursive /bkdata 4.若开启了Selinux权限,需要 在device/rockchip/common添加selinux /sepolicy/file_contexts中添加 /bkdata(/.*)? u:object_r:metadata_file:s0 5.recovery对新增分bkdata分区的处理 在bootable/recovery/recovery.cpp中添加SureBkdataMount(),recovery时会挂去/bkdata挂载目录,如果载载不上,则格式化这个分区方法。 参考SureMetadataMount()添加SureBkdataMount() void SureBkdataMount() { if (ensure_path_mounted(“/bkdata”)) { printf(“mount bkdata fail,so formate.。.n”); tmplog_offset = 0; format_volume(“/bkdata”); ensure_path_mounted(“/bkdata”); } } 将SureBkdataMount();添加到 SureMetadataMount(); 后边 void SureCacheMount() { if(ensure_path_mounted(“/cache”)) { printf(“mount cache fail,so formate.。.n”); @@ -1805,6 +1816,9 @@ int main(int argc, char **argv) { SureCacheMount(); SureMetadataMount(); + // start add /bkdata by lpz 20210731 + SureBkdataMount(); + // end add /bkdata by lpz 20210731 //dump ro.bootmode type char bootmode[256]; 6.完整补丁 diff --git a/bootable/recovery/recovery.cpp b/bootable/recovery/recovery.cpp index 1981544..52fd3f0 100755 --- a/bootable/recovery/recovery.cpp +++ b/bootable/recovery/recovery.cpp @@ -1468,6 +1468,17 @@ void SureMetadataMount() { } } +// start add /bkdata by lpz 20210731 +void SureBkdataMount() { + if (ensure_path_mounted(“/bkdata”)) { + printf(“mount bkdata fail,so formate.。.n”); + tmplog_offset = 0; + format_volume(“/bkdata”); + ensure_path_mounted(“/bkdata”); + } +} +// end add /bkdata by lpz 20210731 + void SureCacheMount() { if(ensure_path_mounted(“/cache”)) { printf(“mount cache fail,so formate.。.n”); @@ -1805,6 +1816,9 @@ int main(int argc, char **argv) { SureCacheMount(); SureMetadataMount(); + // 开始添加 /bkdata by lpz 20210731 + SureBkdataMount(); + // end add /bkdata by lpz 20210731 //dump ro.bootmode type char bootmode[256]; diff --git a/device/rockchip/common/init.rk30board.rc b/device/rockchip/common/init.rk30board.rc index 179f7b7..44cbfca 100755 --- a/device/rockchip/common/init.rk30board .rc +++ b/device/rockchip/common/init.rk30board.rc @@ -64,6 +64,9 @@ on init on boot + # start add /bkdata by lpz 20210731 + restorecon_recursive /bkdata + # end通过 lpz 添加 /bkdata 20210731 restorecon_recursive /sys/devices/system/cpu/cpufreq/interactive chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate diff --git a/device/rockchip/common/init.rockchip.rc b/device/rockchip/common/init.rockchip.rc index 4b3e0fe..ab93473 100755 --- a/device/rockchip/common/init.rockchip.rc +++ b/device/rockchip/common/init.rockchip.rc @@ -44,6 +44,11 @@ on post-fs-data # For a remount only the flags and the target mount point are relevant. mount dummy dummy /data remount nosuid nodev noatime rw seclabel,background_gc=on,user_xattr,acl,errors=panic + # start add /bkdata by lpz 20210731 + mkdir /bkdata 0777 system system + mount ext4 mtd@bkdata /bkdata wait noatime nodiratime nosuid nodev noauto_da_alloc + # end add /bkdata by lpz 20210731 + # we will remap this as /mnt/sdcard with the sdcard fuse tool mkdir /data/media 0770 media_rw media_rw chown media_rw media_rw /data/media diff --git a/device/rockchip/common/recovery/etc/init.rc b/device/rockchip/common/recovery/etc/init.rc old mode 100644 new mode 100755 index 2ed0ea6..93f52e5 --- a/device/rockchip/common/recovery/etc/init.rc +++ b/device/rockchip/common/recovery/etc/init.rc @@ -28,6 +28,9 @@ on init mkdir /mnt/u***_storage mkdir /system mkdir /metadata + # start add /bkdata by lpz 20210731 + mkdir /bkdata + # end add /bkdata by lpz 20210731 mkdir /radical_update mkdir /data mkdir /cache diff --git a/device/rockchip/common/sepolicy/file_contexts b/device/ rockchip/common/sepolicy/file_contexts 索引 fc98a5a..13882ec 100755 --- a/device/rockchip/common/sepolicy/file_contexts +++ b/device/rockchip/common/sepolicy/file_contexts @@ -25,6 +25, 9 @@ /data/misc/akmd(/.*)? u:object_r:akmd_file:s0 /metadata(/.*)? u:object_r:metadata_file:s0 +# start add /bkdata by lpz 20210731 +/bkdata(/.*)? u:object_r:metadata_file:s0 +# end add /bkdata by lpz 20210731 /dev/mma8452_daemon u:object_r:sensor_device:s0 /data/camera(/.*)? u:object_r:camdata_file:s0 @@ -93,6 +96,7 @@ /dev/block/platform/ff0f0000.dwmmc/by-name/userdata u:object_r:userdata_block_device:s0 /dev/block/platform/ff0f0000.dwmmc/by-name/boot u:object_r:boot_block_device:s0 /dev/block/platform/ff0f0000.dwmmc/by-name/recovery u:object_r:recovery_block_device:s0 +/dev/block/platform/ff0f0000.dwmmc/by-name/bkdate u:object_r:e2fsck_bkdata_block_device:s0 #for 312x emmc device /dev/block/platform/1021c000.rksdmmc/by-name/frp u:object_r:frp_block_device:s0 diff --git a/device/rockchip/rk3288/fstab.rk30board.bootmode.emmc.rk3288w b/device/rockchip/rk3288/fstab.rk30board.bootmode.emmc.rk3288w 索引 26280fb..0419ec7 100755 --- a/device/rockchip/rk3288/fstab.rk30board.bootmode.emmc.rk3288w +++ b/device/rockchip/rk3288/fstab.rk30board.bootmode.emmc.rk3288w @@ -9 ,6 +9,9 @@ /dev/block/platform/ff0f0000.dwmmc/by-name/vendor1 /vendor ext4 ro,noatime,nodiratime,nosuid,nodev,noauto_da_alloc,放弃等待 /dev/block/platform/ff0f0000。 dwmmc/by-name/cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check /dev/block/platform/ff0f0000.dwmmc/by-name/metadata /metadata ext4 noatime,nodiratime,nosuid,nodev ,noauto_da_alloc,discard wait,check +# start add /bkdata by lpz 20210731 +/dev/block/platform/ff0f0000.dwmmc/by-name/bkdata /bkdata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check +# end add /bkdata by lpz 20210731 /dev/block/platform/ ff0f0000.dwmmc/by-name/userdata /data f2fs noatime,nodiratime,nosuid,nodev,discard,inline_xattr wait,check,notrim,encryptable=/metadata/key_file #/dev/block/platform/ff0f0000.dwmmc/by-name /userdata /data ext4 noatime,nodiratime,nosuid,nodev,barrier=1,noauto_da_alloc,data=ordered wait,check,formattable,encryptable=/metadata/key_file,quota |
|
|
|
/dev/block/platform/ff0f0000.dwmmc/by-name/userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,encryptable=/metadata/key_file
diff --git a/ device/rockchip/rk3288/parameter_system_2.5G.txt b/device/rockchip/rk3288/parameter_system_2.5G.txt index 6bdaa5d..a24c6a2 100755 --- a/device/rockchip/rk3288/parameter_system_2.5G.txt +++ b /device/rockchip/rk3288/parameter_system_2.5G.txt @@ -7,4 +7,4 @@ ATAG: 0x60000800 MACHINE: 3288 CHECK_MASK: 0x80 PWR_HLD: 0,0,A,0,1 -CMDLINE: console=ttyFIQ0 androidboot.baseband=N/A androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x000020000(uboot@00000000,x 0x00004000(信任),0x00002000 @ 0x00006000(MISC),0x00008000 @ 0x00008000(资源),0x0000c000 @ 0x00010000(kernel),0x00010000 @ 0x0001c000(boot),0x00010000 @ 0x0002c000(recovery),0x00038000 @ 0x0003c000(备份),0x00040000 @ 0x00074000 (缓存),0x00500000@0x000B4000(系统),0x00008000@0x005B4000(元数据),0x00080000@0x005BC000(vendor0),0x00080000@0x0063C000(vendor1),-@0x006BC000(userdata) +CMDLINE: console=ttyFIQ0 androidboot.baseband=N/A androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x000020000(uboot@00000,x 0x00004000(信任),0x00002000 @ 0x00006000(MISC),0x00008000 @ 0x00008000(资源),0x0000c000 @ 0x00010000(kernel),0x00010000 @ 0x0001c000(boot),0x00010000 @ 0x0002c000(recovery),0x00038000 @ 0x0003c000(备份),0x00040000 @ 0x00074000 (缓存),0x00500000 @ 0x000b4000(系统),0x00008000 @ 0x005b4000(元数据),0x00080000 @ 0x005bc000(vendor0),0x00080000 @ 0x0063c000(vendor1),0x00040000 @ 0x006bc000(bkdata), - @ 0x006fc000(userdata) diff --git a /device/rockchip/rk3288/recovery.emmc.fstab b/device/rockchip/rk3288/recovery.emmc.fstab 索引 a8df7f7..b85e392 100755 --- a/device/rockchip/rk3288/recovery.emmc.fstab +++ b/device/rockchip/rk3288/recovery.emmc.fstab @@ -5,6 +5,9 @@ /dev/block/platform/ff0f0000.dwmmc/by-name/system /system ext4 defaults defaults /dev/block/platform/ff0f0000.dwmmc/by-name/cache /cache ext4 defaults defaults /dev/block/platform/ff0f0000.dwmmc/by-name/metadata /metadata ext4 defaults defaults +# start add /bkdata by lpz 20210731 +/dev/block/platform/ff0f0000.dwmmc/by-name/bkdata /bkdata ext4 defaults defaults +# end add /bkdata by lpz 20210731 /dev/block/platform/ff0f0000.dwmmc/by-name/userdata /data ext4 defaults defaults /dev/block/platform/ff0f0000.dwmmc/by-name/cust /cust ext4 defaults defaults /dev/block/platform/ff0f0000.dwmmc/by-name/custom /custom ext4 defaults defaults |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1348 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
1391 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
2970 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
浏览过的版块 |
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-3 04:10 , Processed in 0.537163 second(s), Total 75, Slave 58 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号