MT7628学习笔记(11)——分区信息查询及数据备份

1、查询FLASH上的分区信息:

root@Hiwooya:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 00fb0000 00010000 "firmware"
mtd4: 00118e3c 00010000 "kernel"
mtd5: 00e971c4 00010000 "rootfs"
mtd6: 009e0000 00010000 "rootfs_data"

2、分区释义 (启动LOG中打印)

[    0.500000] Creating 4 MTD partitions on "spi32766.0":
[    0.510000] 0x000000000000-0x000000030000 : "u-boot"
[    0.520000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.530000] 0x000000040000-0x000000050000 : "factory"
[    0.540000] 0x000000050000-0x000001000000 : "firmware"
[    0.580000] 2 uimage-fw partitions found on MTD device firmware
[    0.590000] 0x000000050000-0x000000168e3c : "kernel"
[    0.600000] 0x000000168e3c-0x000001000000 : "rootfs"
[    0.610000] mtd: device 5 (rootfs) set to be root filesystem
[    0.630000] 1 squashfs-split partitions found on MTD device rootfs
[    0.640000] 0x000000620000-0x000001000000 : "rootfs_data"
分区ID分区位置容量作用
u-boot0x000000000000-0x000000030000192KB引导程序,Bootloader
u-boot-env0x000000030000-0x00000004000064KBuboot的env存储,配置参数
factory0x000000040000-0x00000005000064KBMT7688校准、MAC地址等参数
firmware0x000000050000-0x00000100000015.68MB固件分区
kernel0x000000050000-0x000000168e3c1123KB固件分区内的Linux内核分区,大小会根据内核编译配置不同而有所变化
rootfs0x000000168e3c-0x00000100000014MB固件分区内的文件系统分区,包含rootfs_rom(只读)和rootfs_data(可写)
rootfs_data0x000000620000-0x0000010000009MB固件分区内的可写文件系统分区,常用做jffs2

3、拷贝factory(无线校准)数据到www文件夹

root@Hiwooya:~# dd if=/dev/mtd2 of=/www/factory.bin
128+0 records in
128+0 records out
root@Hiwooya:~# ls -l /www/factory.bin
-rw-r--r--    1 root     root         65536 Oct 14 15:37 /www/factory.bin

然后使用FTP或者SCP把文件拷贝出来。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值