|
|
本帖最后由 weion92 于 2024-8-31 00:06 编辑
以前也刷过openwrt,后来恢复官方了。
今天按照Wiki又折腾openwrt,
我觉得关键步骤是这里:
- root@XiaoQiang:~# nvram get flag_boot_rootfs
- 0
- root@XiaoQiang:~# ubiformat /dev/mtd13 -f /tmp/tmp/openwrt-23.05.4-ipq807x-generic-redmi_ax6-initramfs-factory.ubi -s 2048 -O 2048
- ubiformat: mtd13 (nand), size 37486592 bytes (35.7 MiB), 286 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
- libscan: scanning eraseblock 285 -- 100 % complete
- ubiformat: 226 eraseblocks have valid erase counter, mean value is 0
- ubiformat: 60 eraseblocks are supposedly empty
- ubiformat: warning!: only 226 of 286 eraseblocks have valid erase counter
- ubiformat: mean erase counter 0 will be used for the rest of eraseblock
- ubiformat: continue? (y/N) y
- ubiformat: use erase counter 0 for all eraseblocks
- ubiformat: flashing eraseblock 99 -- 100 % complete
- ubiformat: formatting eraseblock 285 -- 100 % complete
- root@XiaoQiang:~# nvram set flag_last_success=1
- root@XiaoQiang:~# nvram set flag_boot_rootfs=1
- root@XiaoQiang:~# nvram commit
- root@XiaoQiang:~# reboot
复制代码
得到结果就是,软件包磁盘空间有62M多
总感觉这个磁盘空间有点大,印象中跟之前不一样。
- root@OpenWrt:~# cat /proc/partitions
- major minor #blocks name
- 31 0 1024 mtdblock0
- 31 1 1024 mtdblock1
- 31 2 3072 mtdblock2
- 31 3 512 mtdblock3
- 31 4 512 mtdblock4
- 31 5 512 mtdblock5
- 31 6 512 mtdblock6
- 31 7 1024 mtdblock7
- 31 8 512 mtdblock8
- 31 9 512 mtdblock9
- 31 10 1024 mtdblock10
- 31 11 36608 mtdblock11
- 31 12 84096 mtdblock12
- 254 0 7192 ubiblock0_0
复制代码
- root@OpenWrt:~# cat /proc/mtd
- dev: size erasesize name
- mtd0: 00100000 00020000 "0:sbl1"
- mtd1: 00100000 00020000 "0:mibib"
- mtd2: 00300000 00020000 "0:qsee"
- mtd3: 00080000 00020000 "0:devcfg"
- mtd4: 00080000 00020000 "0:rpm"
- mtd5: 00080000 00020000 "0:cdt"
- mtd6: 00080000 00020000 "0:appsblenv"
- mtd7: 00100000 00020000 "0:appsbl"
- mtd8: 00080000 00020000 "0:art"
- mtd9: 00080000 00020000 "bdata"
- mtd10: 00100000 00020000 "pstore"
- mtd11: 023c0000 00020000 "ubi_kernel"
- mtd12: 05220000 00020000 "rootfs"
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|