Flashing and build script

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
diff --git a/build_flash/FWL1 b/build_flash/FWL1
new file mode 100644
index 0000000..f4f2ddc
--- /dev/null
+++ b/build_flash/FWL1
Binary files differ
diff --git a/build_flash/README b/build_flash/README
new file mode 100644
index 0000000..62bc856
--- /dev/null
+++ b/build_flash/README
@@ -0,0 +1,14 @@
+This Directory contains the following files:
+
+build.sh: 	Utility to build and flash the boar specific u-boot images
+
+export.sh: 	Utility to export the build environment. Please update the 
+		correct tool-chain path in this file.
+
+FWL1:		First 8K firmware for the needed for the emdkv310 EVT1 boards.
+
+NOTE******
+Please keep this directory in the TOPDIR(U-Boot-source).
+e.g. 	if u-boot source lies in a/u-boot-samsung
+	place this directory at a/u-boot-samsung
+
diff --git a/build_flash/build.sh b/build_flash/build.sh
new file mode 100755
index 0000000..353dc5a
--- /dev/null
+++ b/build_flash/build.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+. ./export.sh;
+cd ..;
+case $1 in
+	-h)	clear;
+		echo "This is a automated tool to build and flash"
+		echo "ORIGEN and SMDKV310(EVT0|EVT1) boards"
+		echo"";
+		echo "-b:	Build Image";
+		echo "-f:	Flash Image";
+		echo "-h:	Show Help";
+		echo "-v:	Show Version";
+		echo"";
+		echo "examples:"
+		echo "Build image: 	\$ build.sh  -b  origen|smdkv310";
+		echo"";
+		echo "Flash image: 	\$ build.sh  -f  origen|smdkv310|smdkv310_evt1";
+		echo"";
+		echo"";;
+			
+	-v)	clear;
+		echo "Version 1.0";
+		echo "";
+		echo "Written By: Chander kashyap";
+		echo "";;
+
+	-b)	make distclean;
+		
+		case $2 in
+			smdkv310 | smdkv310_evt1)	
+				make smdkv310_config;;
+			
+			origen)	
+				make origen_config;;
+		esac
+		make -j8;;
+
+	-f)	umount /media/*;
+		
+		case $2 in
+			smdkv310)
+				sudo dd if=spl/smdkv310-spl.bin of=/dev/sdc bs=512 count=32 seek=1;
+				sudo dd if=u-boot.bin of=/dev/sdc bs=512 count=1024 seek=65;;
+
+			origen)
+				sudo dd if=spl/origen-spl.bin of=/dev/sdc bs=512 count=32 seek=1;
+				sudo dd if=u-boot.bin of=/dev/sdc bs=512 count=1024 seek=65 ;;
+			smdkv310_evt1)	
+				cd  -;sudo dd if=FWL1 of=/dev/sdc bs=512 count=16 seek=1;cd -;
+				sudo dd if=spl/smdkv310-spl.bin of=/dev/sdc bs=512 count=32 seek=17;
+				sudo dd if=u-boot.bin of=/dev/sdc bs=512 count=1024 seek=49;;
+		esac
+esac
+cd -;
diff --git a/build_flash/export.sh b/build_flash/export.sh
new file mode 100644
index 0000000..afe5af3
--- /dev/null
+++ b/build_flash/export.sh
@@ -0,0 +1,2 @@
+export ARCH=arm
+export CROSS_COMPILE=/opt/linaro-gcc-4.5-arm-linux-gnueabi-32bit/bin/arm-linux-gnueabi-