diff --git a/usb-boot b/usb-boot index a999236..375dc36 100755 --- a/usb-boot +++ b/usb-boot @@ -1,10 +1,10 @@ #!/bin/sh -e top=`dirname $0` if [ $# -lt 2 ]; then - echo "Usage: $0 board u-boot.bin [boot.scr|-] [kernel script.bin [initramfs]]" + echo "Usage: $0 u-boot-spl.bin u-boot.bin [boot.scr|-] [kernel script.bin [initramfs]]" exit 1 fi -board=$1; shift || (echo "ERROR: Board must be specified"; exit 1;) +board=$1; shift || (echo "ERROR: u-boot-spl.bin must be specified"; exit 1;) uboot=$1; shift || (echo "ERROR: u-boot.bin must be specified"; exit 1;) bootscr=$top/felboot/ramboot.scr if [ ! -f $bootscr ]; then @@ -32,7 +32,11 @@ case $board in ;; esac if [ ! -f $felboot ]; then - echo "ERROR: Can't find fel-boot binary for ${board}" + echo "ERROR: Can't find SPL FEL binary ${board}" + exit 1 +fi +if [ `wc -c $felboot | cut '-d ' -f1` -gt 15616 ]; then + echo "ERROR: SPL FEL binary too large. Must be the FEL version of SPL" exit 1 fi if [ ! -f $bootscr ]; then