#!/bin/bash echo "Uploading..." scp uImage-with-dtb alarm@amx-tablet:/tmp/uImage echo "Flashing and rebooting..." ssh alarm@amx-tablet 'sudo dd if=/tmp/uImage of=/dev/mmcblk0 bs=512 seek=2048 conv=notrunc; sync; sudo reboot'