$ unrar-nonfree x M218B056firmware.rar
UNRAR 4.00 beta 3 freeware Copyright (c) 1993-2010 Alexander Roshal
Extracting from M218B056firmware.rar
Creating firmware OK
Extracting firmware/M218B-v0.56.bin OK
Creating reflash_nor OK
Extracting reflash_nor/md5sum_32 OK
Extracting reflash_nor/md5sum_64 OK
Extracting reflash_nor/mtd032 OK
Extracting reflash_nor/mtd064 OK
Extracting reflash_nor/mtd1 OK
Extracting reflash_nor/mtd2 OK
Extracting reflash_nor/upgrade.sh OK
All OK
$ cat reflash_nor/upgrade.sh
#!/bin/sh
REFLASH_NOR=/mnt/sd1/reflash_nor
PKERNEL=mtd1
ROOTFS=mtd2
BOOTLOADER_DEST=/dev/mtdblock0
PKERNEL_DEST=/dev/mtdblock1
ROOTFS_DEST=/dev/mtdblock2
MEM_SIZE=`cat /proc/cmdline | cut -d '=' -f3 | cut -d ' ' -f1`
test $MEM_SIZE = "32M" && BOOTLOADER=mtd032
test $MEM_SIZE = "64M" && BOOTLOADER=mtd064
echo "Upgrading Bootloader"
dd "if=$REFLASH_NOR/$BOOTLOADER" "of=$BOOTLOADER_DEST"
echo "Upgrading P-Kernel"
dd "if=$REFLASH_NOR/$PKERNEL" "of=$PKERNEL_DEST"
echo "Upgrading Pminiroot"
dd "if=$REFLASH_NOR/$ROOTFS" "of=$ROOTFS_DEST"
echo "done"
No comments:
Post a Comment