#!/bin/bash

s=$1
if [ -z "$s" ]; then
    s=../u-boot-1.1.2/u-boot.bin
fo

cat header $s > image.bin

{
echo 'script cmd'
sleep 2
echo 'flashmem 0x40000 image.bin'
sleep 2
echo "quit"
} | jtag