Bug 216278
Summary: | ubi: support disabling fastmap for certain ubi device | ||
---|---|---|---|
Product: | Drivers | Reporter: | Zhihao Cheng (chengzhihao1) |
Component: | Other | Assignee: | drivers_other |
Status: | NEW --- | ||
Severity: | normal | CC: | wangzhaolong1 |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.19-rc7 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
test.sh
mtd-utils modifications |
Description
Zhihao Cheng
2022-07-25 09:04:16 UTC
Created attachment 301481 [details]
test.sh
Created attachment 301482 [details]
mtd-utils modifications
Apply mtd-utils modifications to mtd-utils, and compile ubiattach. 用法: 加载ubi模块或内核命令行参数是mtd=xxx的第5个参数控制fastmap是否打开,0为关闭,1为使能 CONFIG_MTD_UBI_FASTMAP=Y $ ID="0x20,0xa5,0x00,0x26" # 2G nand flash $ modprobe nandsim id_bytes=$ID parts=4096 # 两个1G的分区 $ modprobe ubi mtd=1,0,0,1,1 mtd=2,0,0,2,0 fm_autoconvert=1 # 预期 mtd1 -> ubi1(开启fastmap) mtd2 -> ubi2(不开启fastmap)成功 $ modprobe -r ubi # 移除模块,或 ubidetach $ modprobe ubi mtd=1,0,0,1,0 mtd=2,0,0,2,1 fm_autoconvert=1 # 预期 mtd1(旧的镜像) -> ubi1(关闭fastmap) mtd2(旧的镜像) -> ubi2(开启fastmap)成功 (In reply to wangzhaolong1 from comment #4) > 用法: > > 加载ubi模块或内核命令行参数是mtd=xxx的第5个参数控制fastmap是否打开,0为关闭,1为使能 > > CONFIG_MTD_UBI_FASTMAP=Y > > $ ID="0x20,0xa5,0x00,0x26" # 2G nand flash > > $ modprobe nandsim id_bytes=$ID parts=4096 # 两个1G的分区 > > $ modprobe ubi mtd=1,0,0,1,1 mtd=2,0,0,2,0 fm_autoconvert=1 > # 预期 mtd1 -> ubi1(开启fastmap) mtd2 -> ubi2(不开启fastmap)成功 > > $ modprobe -r ubi # 移除模块,或 ubidetach > > $ modprobe ubi mtd=1,0,0,1,0 mtd=2,0,0,2,1 fm_autoconvert=1 > # 预期 mtd1(旧的镜像) -> ubi1(关闭fastmap) mtd2(旧的镜像) -> ubi2(开启fastmap)成功 I'm sorry!!I misplaced it. |