From af0200e35feed47a8cb2dd622371f32c8f94691b Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Jul 03 2015 09:57:54 +0000 Subject: imx6: use a single means of writing SPL or traditional u-boot --- diff --git a/socs.d/imx6 b/socs.d/imx6 index 59d49b0..eebbffe 100644 --- a/socs.d/imx6 +++ b/socs.d/imx6 @@ -1,3 +1,11 @@ -# write uboot +if [ -f "$PREFIX/usr/share/uboot/$TARGET/SPL" ]; then +# write a SPL uboot if it's present +echo "= Writing SPL ...." +dd if=$PREFIX/usr/share/uboot/$TARGET/SPL of=$MEDIA seek=1 bs=1k +echo "= Writing u-boot.img ...." +sudo dd if=$PREFIX/usr/share/uboot/$TARGET/u-boot.img of=$MEDIA bs=1k seek=69 conv=fsync; sync +else +# else fail back to traditional uboot echo "= Writing u-boot.imx ...." sudo dd if=/tmp/root/usr/share/uboot/$TARGET/u-boot.imx of=$MEDIA bs=1k seek=1 conv=fsync; sync +fi