linuxer
Published on 2024-12-02 / 17 Visits
0
1

JDX-RE07 太乙 根据分区编的 单一ttl备份 写入指令

这个按分区编的 具体测试反馈一下

手动备份 MMC 分区

  1. 确定分区信息:根据之前列出的分区信息,准备好每个分区的 LBA 起始地址和结束地址。以下是前面的分区信息,以便引用:

    表格

    分区名称

    起始 LBA

    结束 LBA

    0:SBL1

    0x22

    0x621

    0:BOOTCONFIG

    0x622

    0x821

    0:BOOTCONFIG1

    0x822

    0xa21

    0:QSEE

    0xa22

    0x1821

    0:QSEE_1

    0x1822

    0x2621

    0:DEVCFG

    0x2622

    0x2821

    0:DEVCFG_1

    0x2822

    0x2a21

    0:RPM

    0x2a22

    0x2c21

    0:RPM_1

    0x2c22

    0x2e21

    0:CDT

    0x2e22

    0x3021

    0:CDT_1

    0x3022

    0x3221

    0:APPSBLENV

    0x3222

    0x3421

    0:APPSBL

    0x3422

    0x3921

    0:APPSBL_1

    0x3922

    0x3e21

    0:ART

    0x3e22

    0x4021

    0:HLOS

    0x4022

    0x7021

    0:HLOS_1

    0x7022

    0xa021

    rootfs

    0xa022

    0x40a021

    0:WIFIFW

    0x40a022

    0x40c021

    rootfs_1

    0x40c022

    0x42a021

    0:WIFIFW_1

    0x42a022

    0x42c021

    rootfs_data

    0x42c022

    0x436021

    0:ETHPHYFW

    0x436022

    0x436421

    plugin

    0x436422

    0x462021

    log

    0x462022

    0x4f8021

    swap

    0x4f8022

    0x5f8021

  2. 执行备份命令:通过 mmc read 命令逐个读取分区并保存为镜像文件。以下是示例命令,假设你要读取第一个分区(分区 1):

    bash

    mmc read 0x82000000 0x22 0x600

    • 0x82000000 是你希望读取到的内存地址(可以根据需要调整)。

    • 0x22 是 LBA 起始地址。

    • 0x600 是读取的大小(读取到结束 LBA 的数量)。

  3. 生成镜像文件:将读取的数据写入文件并按照顺序为每个分区命名。以下是命令示例,为分区 0:SBL1 创建 0:SBL1_1.bin

    bash

    save mmc 0:1 0x82000000 0x600

  4. 重复上述步骤:对每个分区执行相同的 mmc readsave 命令,命名格式为 0:<分区名称>_<编号>.bin。例如:

    • 0:BOOTCONFIG_2.bin

    • 0:BOOTCONFIG1_3.bin

    • 0:QSEE_4.bin

  5. 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


Comment