ddr: Rebuild DDR3 training lib by default

	For all new TIP SoCs enabled -d 2 option by default, if not configured DDR4 flag.

Change-Id: Ice09ecd1163fdb871b5a5cfda35b7a8dbc999425
Signed-off-by: Igor Petrik <igorp@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/19026
Reviewed-by: Omri Itach <omrii@marvell.com>
Tested-by: Omri Itach <omrii@marvell.com>
(cherry picked from commit 582b740b97a471830e4f9647ad1ea4ef99bacdde)
Signed-off-by: Bassel Saba <basselsa@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/23557
Tested-by: Star_Automation <star@marvell.com>
diff --git a/build.pl b/build.pl
index e9712f9..3733949 100755
--- a/build.pl
+++ b/build.pl
@@ -110,19 +110,24 @@
 	($opt_b eq "ac3_customer1") )
 {
 	$board = $opt_b;
+	$ddr3LibBuild="yes";
 	if( (substr $board,7 , 3) eq "370" ) {
 		$boardID="a370";
 		$targetBoard = substr $board, 11;
+		$ddr3LibBuild="no";
 	}
 	elsif ( (substr $board,7 , 2) eq "xp" ) {
 		$boardID="axp";
 		$targetBoard = substr $board, 10;
+		$ddr3LibBuild="no";
 	}
 	elsif ( (substr $board,7 , 2) eq "lp" ) {
 		$boardID="alp";
+		$ddr3LibBuild="no";
 	}
 	elsif ( (substr $board,7 , 3) eq "375" ) {
 		$boardID="a375";
+		$ddr3LibBuild="no";
 	}
 	elsif ( (substr $board,7 , 3) eq "38x" ) {
 		$boardID="a38x";
@@ -344,6 +349,12 @@
 	print "\n";
 }
 
+#by default -d 2 will be enabled for new TIP SoCs
+if( ($ddr3LibBuild eq "yes") and !($opt_m eq 4))
+{
+	$opt_d = 2;
+}
+
 if(defined $opt_d)
 {
 	system("echo \"DDR3LIB = $opt_d\" >> include/config.mk");