#!/bin/sh

echo "Copy images from TFTP server 192.168.0.2"
cd /root
tftp -g -b 8192 -r uImage 192.168.0.2
tftp -g -b 8192 -r uImage_safe 192.168.0.2
tftp -g -b 8192 -r Kernel_modules.tar.gz 192.168.0.2

rm /mnt/mmcblk0p1/boot/uImage
rm /mnt/mmcblk0p1/boot/uImage_safe
rm -r /mnt/mmcblk0p1/lib/modules

cp ./uImage /mnt/mmcblk0p1/boot
cp ./uImage_safe /mnt/mmcblk0p1/boot
tar xf ./Kernel_modules.tar.gz -C /mnt/mmcblk0p1/

rm ./uImage
rm ./uImage_safe
rm ./Kernel_modules.tar.gz


