博客
关于我
MT7628学习笔记(11)——分区信息查询及数据备份
阅读量:172 次
发布时间:2019-02-28

本文共 1669 字,大约阅读时间需要 5 分钟。

1. 查询FLASH上的分区信息

通过查看/proc/mtd文件,可以获取设备上的分区信息。以下是示例输出:

root@Hiwooya:~# cat /proc/mtdmtd0: 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"

以下是各分区的详细信息:

分区名称 分区范围 容量 作用
u-boot 0x000000000000-0x000000030000 192KB 引导程序,Bootloader
u-boot-env 0x000000030000-0x000000040000 64KB uboot的env存储,配置参数
factory 0x000000040000-0x000000050000 64KB MT7688校准、MAC地址等参数
firmware 0x000000050000-0x000001000000 15.68MB 固件分区
kernel 0x000000050000-0x000000168e3c 1123KB 固件分区内的Linux内核分区
rootfs 0x000000168e3c-0x000001000000 14MB 固件分区内的文件系统分区
rootfs_data 0x000000620000-0x000001000000 9MB 固件分区内的可写文件系统分区

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

执行以下命令将factory分区数据复制到指定目录:

root@Hiwooya:~# dd if=/dev/mtd2 of=/www/factory.bin128+0 records in128+0 records outroot@Hiwooya:~# ls -l /www/factory.bin

完成后,可以通过FTP或SCP将文件传输到目标服务器。

以上操作完成后,factory分区的数据即可通过网络访问。

转载地址:http://zyzi.baihongyu.com/

你可能感兴趣的文章
python+flask计算机毕业设计高校校内景点平台(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校校园线上跳蚤市场的系统设计(程序+开题+论文)
查看>>
Python图形处理
查看>>
python+flask计算机毕业设计高校物品使用互益平台的设计与实现(程序+开题+论文)
查看>>
Python函数,匿名函数,高阶函数,内置函数——08
查看>>
python+flask计算机毕业设计高校疫情防控管理平台(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校网上迎新系统(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校运动会(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校选课系统(程序+开题+论文)
查看>>
Python+Jenkins+Allure Report接口自动化测试持续集成
查看>>
python+locust电商全流程性能测试
查看>>
Python函数运行的可执行文件的终端输出如何以一般方式静音?
查看>>
Python+Pytest+Allure+Git+Jenkins接口自动化框架
查看>>
python+pytest接口自动化 —— 参数关联
查看>>
python+pytest接口自动化 —— 参数关联
查看>>
Python+pytest接口自动化 —— 接口测试基础
查看>>
python+pytest接口自动化 —— 自动化用例编写思路 (使用pytest编写一个测试脚本)
查看>>
Python+pytest接口自动化之cookie绕过登录(保持登录状态)
查看>>
python+pytest接口自动化:接口测试
查看>>
Python+requests+unittest执行接口自动化测试详情
查看>>