这个按分区编的 具体测试反馈一下
手动备份 MMC 分区
确定分区信息:根据之前列出的分区信息,准备好每个分区的 LBA 起始地址和结束地址。以下是前面的分区信息,以便引用:
表格
执行备份命令:通过
mmc read
命令逐个读取分区并保存为镜像文件。以下是示例命令,假设你要读取第一个分区(分区 1):bash
mmc read 0x82000000 0x22 0x600
0x82000000
是你希望读取到的内存地址(可以根据需要调整)。0x22
是 LBA 起始地址。0x600
是读取的大小(读取到结束 LBA 的数量)。
生成镜像文件:将读取的数据写入文件并按照顺序为每个分区命名。以下是命令示例,为分区
0:SBL1
创建0:SBL1_1.bin
:bash
save mmc 0:1 0x82000000 0x600
重复上述步骤:对每个分区执行相同的
mmc read
和save
命令,命名格式为0:<分区名称>_<编号>.bin
。例如:0:BOOTCONFIG_2.bin
0:BOOTCONFIG1_3.bin
0:QSEE_4.bin
TFTP 上传:一旦你创建了所有的镜像文件,可以通过 TFTP 将它们上传到服务器。使用类似以下的命令:
bash
tftp <TFTP_SERVER_IP> put 0:SBL1_1.bin put 0:BOOTCONFIG_2.bin
最后注意事项
确保你的 TFTP 服务器设置正确,能够接收文件,并且没有防火墙阻止连接。
读取分区和生成文件的过程中要小心,以确保数据的完整性。
可以使用相同的方式来实现后续镜像数据的备份。
TTL备份
# 读取和备份 GPT
mmc read 0x50000000 0x00000000 0x00000022 && tftpput 0x50000000 0x00004400 mmcblk0p_GPT.bin
# 读取和备份 SBL1
mmc read 0x50000000 0x00000022 0x00000600 && tftpput 0x50000000 0x000c0000 mmcblk0p1_0SBL1.bin
# 读取和备份 BOOTCONFIG
mmc read 0x50000000 0x00000622 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p2_0BOOTCONFIG.bin
# 读取和备份 BOOTCONFIG1
mmc read 0x50000000 0x00000822 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p3_0BOOTCONFIG1.bin
# 读取和备份 QSEE
mmc read 0x50000000 0x00000A22 0x00000800 && tftpput 0x50000000 0x00100000 mmcblk0p4_0QSEE.bin
# 读取和备份 QSEE_1
mmc read 0x50000000 0x00001222 0x00000800 && tftpput 0x50000000 0x00200000 mmcblk0p5_0QSEE_1.bin
# 读取和备份 DEVCFG
mmc read 0x50000000 0x00001A22 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p6_0DEVCFG.bin
# 读取和备份 DEVCFG_1
mmc read 0x50000000 0x00001C22 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p7_0DEVCFG_1.bin
# 读取和备份 RPM
mmc read 0x50000000 0x00001E22 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p8_0RPM.bin
# 读取和备份 RPM_1
mmc read 0x50000000 0x00002022 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p9_0RPM_1.bin
# 读取和备份 CDT
mmc read 0x50000000 0x00002222 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p10_0CDT.bin
# 读取和备份 CDT_1
mmc read 0x50000000 0x00002422 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p11_0CDT_1.bin
# 读取和备份 APPSBLENV
mmc read 0x50000000 0x00002622 0x00000600 && tftpput 0x50000000 0x000c0000 mmcblk0p12_0APPSBLENV.bin
# 读取和备份 APPSBL
mmc read 0x50000000 0x00002C22 0x00000600 && tftpput 0x50000000 0x000c0000 mmcblk0p13_0APPSBL.bin
# 读取和备份 APPSBL_1
mmc read 0x50000000 0x00003222 0x00000600 && tftpput 0x50000000 0x000c0000 mmcblk0p14_0APPSBL_1.bin
# 读取和备份 ART
mmc read 0x50000000 0x00003822 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p15_0ART.bin
# 读取和备份 HLOS
mmc read 0x50000000 0x00003A22 0x00003000 && tftpput 0x50000000 0x00600000 mmcblk0p16_0HLOS.bin
# 读取和备份 HLOS_1
mmc read 0x50000000 0x00006A22 0x00002000 && tftpput 0x50000000 0x00400000 mmcblk0p17_0HLOS_1.bin
# 读取和备份 rootfs
mmc read 0x50000000 0x00008A22 0x00400000 && tftpput 0x50000000 0x08000000 mmcblk0p18_rootfs.bin
# 读取和备份 WIFIFW
mmc read 0x50000000 0x0040A022 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p19_0WIFIFW.bin
# 读取和备份 rootfs_1
mmc read 0x50000000 0x0040C022 0x00400000 && tftpput 0x50000000 0x08000000 mmcblk0p20_rootfs_1.bin
# 读取和备份 WIFIFW_1
mmc read 0x50000000 0x0042A022 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p21_0WIFIFW_1.bin
# 读取和备份 rootfs_data
mmc read 0x50000000 0x0042C022 0x00006000 && tftpput 0x50000000 0x00C00000 mmcblk0p22_rootfs_data.bin
# 读取和备份 ETHPHYFW
mmc read 0x50000000 0x00436022 0x00000200 && tftpput 0x50000000 0x00040000 mmcblk0p23_0ETHPHYFW.bin
# 读取和备份 plugin
mmc read 0x50000000 0x00436422 0x00002000 && tftpput 0x50000000 0x00400000 mmcblk0p24_plugin.bin
# 读取和备份 log
mmc read 0x50000000 0x00462022 0x00002000 && tftpput 0x50000000 0x00400000 mmcblk0p25_log.bin
# 读取和备份 swap
mmc read 0x50000000 0x004F8022 0x00004000 && tftpput 0x50000000 0x00800000 mmcblk0p26_swap.bin
写入还原 ttl备份写入
有些分区过大可能会报错。。。 但 主要就 gpt uboot cdt art 这几个分区而已。。。
# 还原 GPT
tftpboot $fileaddr mmcblk0p_GPT.bin && mmc write $fileaddr 0x00000000 0x22
# 还原 SBL1
tftpboot $fileaddr mmcblk0p1_0SBL1.bin && mmc write $fileaddr 0x00000022 0x600
# 还原 BOOTCONFIG
tftpboot $fileaddr mmcblk0p2_0BOOTCONFIG.bin && mmc write $fileaddr 0x00000622 0x200
# 还原 BOOTCONFIG1
tftpboot $fileaddr mmcblk0p3_0BOOTCONFIG1.bin && mmc write $fileaddr 0x00000822 0x200
# 还原 QSEE
tftpboot $fileaddr mmcblk0p4_0QSEE.bin && mmc write $fileaddr 0x00000A22 0x800
# 还原 QSEE_1
tftpboot $fileaddr mmcblk0p5_0QSEE_1.bin && mmc write $fileaddr 0x00001222 0x800
# 还原 DEVCFG
tftpboot $fileaddr mmcblk0p6_0DEVCFG.bin && mmc write $fileaddr 0x00001A22 0x200
# 还原 DEVCFG_1
tftpboot $fileaddr mmcblk0p7_0DEVCFG_1.bin && mmc write $fileaddr 0x00001C22 0x200
# 还原 RPM
tftpboot $fileaddr mmcblk0p8_0RPM.bin && mmc write $fileaddr 0x00001E22 0x200
# 还原 RPM_1
tftpboot $fileaddr mmcblk0p9_0RPM_1.bin && mmc write $fileaddr 0x00002022 0x200
# 还原 CDT
tftpboot $fileaddr mmcblk0p10_0CDT.bin && mmc write $fileaddr 0x00002222 0x200
# 还原 CDT_1
tftpboot $fileaddr mmcblk0p11_0CDT_1.bin && mmc write $fileaddr 0x00002422 0x200
# 还原 APPSBLENV
tftpboot $fileaddr mmcblk0p12_0APPSBLENV.bin && mmc write $fileaddr 0x00002622 0x600
# 还原 APPSBL
tftpboot $fileaddr mmcblk0p13_0APPSBL.bin && mmc write $fileaddr 0x00002C22 0x600
# 还原 APPSBL_1
tftpboot $fileaddr mmcblk0p14_0APPSBL_1.bin && mmc write $fileaddr 0x00003222 0x600
# 还原 ART
tftpboot $fileaddr mmcblk0p15_0ART.bin && mmc write $fileaddr 0x00003822 0x200
# 还原 HLOS
tftpboot $fileaddr mmcblk0p16_0HLOS.bin && mmc write $fileaddr 0x00003A22 0x3000
# 还原 HLOS_1
tftpboot $fileaddr mmcblk0p17_0HLOS_1.bin && mmc write $fileaddr 0x00006A22 0x2000
# 还原 rootfs
tftpboot $fileaddr mmcblk0p18_rootfs.bin && mmc write $fileaddr 0x00008A22 0x400000
# 还原 WIFIFW
tftpboot $fileaddr mmcblk0p19_0WIFIFW.bin && mmc write $fileaddr 0x0040A022 0x200
# 还原 rootfs_1
tftpboot $fileaddr mmcblk0p20_rootfs_1.bin && mmc write $fileaddr 0x0040C022 0x400000
# 还原 WIFIFW_1
tftpboot $fileaddr mmcblk0p21_0WIFIFW_1.bin && mmc write $fileaddr 0x0042A022 0x200
# 还原 rootfs_data
tftpboot $fileaddr mmcblk0p22_rootfs_data.bin && mmc write $fileaddr 0x0042C022 0x6000
# 还原 ETHPHYFW
tftpboot $fileaddr mmcblk0p23_0ETHPHYFW.bin && mmc write $fileaddr 0x00436022 0x200
# 还原 plugin
tftpboot $fileaddr mmcblk0p24_plugin.bin && mmc write $fileaddr 0x00436422 0x2000
# 还原 log
tftpboot $fileaddr mmcblk0p25_log.bin && mmc write $fileaddr 0x00462022 0x2000
# 还原 swap
tftpboot $fileaddr mmcblk0p26_swap.bin && mmc write $fileaddr 0x004F8022 0x4000