#!/bin/sh
mkdir /tmp/sd
mount /dev/mmcblk1p1 /tmp/sd

cp -R /system/etc/firmware /tmp/sd/

mkdir /tmp/sys_info
mount /dev/mmcblk0p11 /tmp/sys_info
cp -R /tmp/sys_info /tmp/sd/
umount /tmp/sys_info

dd if=/dev/mmcblk0 of=/tmp/sd/uboot-orig.img bs=512 skip=16384 count=8192
dd if=/tmp/sd/uboot.img of=/dev/mmcblk0 bs=512 seek=16384 conv=notrunc

umount /tmp/sd
reboot
