K3C硬件相关信息及备份
采用128M的nand Flash
K3C_V32.1.22.113版本下操作
root@K3C:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "uboot"
mtd1: 00040000 00020000 "ubootconfigA"
mtd2: 00040000 00020000 "ubootconfigB"
mtd3: 00040000 00020000 "gphyfirmware"
mtd4: 00100000 00020000 "calibration"
mtd5: 01000000 00020000 "bootcore"
mtd6: 00040000 00020000 "pro_info"
mtd7: 00040000 00020000 "dev_info"
mtd8: 06c00000 00020000 "system_sw"
mtd9: 000c0000 00020000 "res"
mtd10: 002e8000 0001f000 "kernelA"
mtd11: 0103a000 0001f000 "rootfsA"
mtd12: 002e8000 0001f000 "kernelB"
mtd13: 01059000 0001f000 "rootfsB"
mtd14: 0028b000 0001f000 "bootcoreA"
mtd15: 0028b000 0001f000 "bootcoreB"
mtd16: 0141a000 0001f000 "data_vol"
各个分区的实际地址和大小:
地址范围 大小 名称
0x000000-0x100000 1M uboot
0x100000-0x140000 256K ubootconfigA
0x140000-0x180000 256K ubootconfigB
0x180000-0x1C0000 256K gphyfirmware
0x1C0000-0x2C0000 1M calibration
0x2C0000-0x12C0000 16M bootcore
0x12C0000-0x1300000 256K pro_info
0x1300000-0x1340000 256K dev_info
0x1340000-0x7f40000 108M system_sw
0x7f40000-0x8000000 768K res
全备份只需备份MTD0-MTD9(总大小128M),MTD10-MTD16为system_sw区的分解
kernelA、rootfsA是当前的内核及文件系统
kernelB、rootfsB是上一个版本的内核及文件系统
备份命令:
插入U盘,输入命令:
dd if=/dev/mtd0 of=/ramdisk/usb/.run/mountd/sda1/mtd0
U盘路径可以用mount命令查看,以上命令备份mtd0分区,其他分区修改mtd0即可
固件缺省开启网络共享,备份后可访问\\192.168.2.1将U盘内容拷贝到计算机
K3C版本升级(293):
先调用/usr/sbin/check_image.sh进行固件检查,会用如下命令分解固件
/usr/sbin/img_dec $INFILE $FWINFO_FILE $OWINFO_FILE $UBOOT_FILE $GPHY_FILE $BOOTCORE_FILE $KERNELFS_FILE
INFILE=/tmp/fullimage.img
KERNELFS_FILE=/tmp/firmware.img
UBOOT_FILE=/tmp/uboot.bin
GPHY_FILE=/tmp/gphy.bin
BOOTCORE_FILE=/tmp/bootcore.bin
FWINFO_FILE=/tmp/fw_info.json
OWINFO_FILE=/tmp/ow_info.json
接着调用\usr\lib\lua\luci\adapter\libphi_cgi.so的"firmware_upg"方法
相关程序
/usr/sbin/upgrade
/usr/sbin/vol_mgmt
评论:7