init: initialize the building framework of androidu-5.15 for amlogic [1/1]

PD#SWPL-109858

Problem:
Initialize the building framework of androidu-5.15 for amlogic

Solution:
Initialize the building framework of androidu-5.15 for amlogic

Verify:
sc2

Change-Id: Icfbc29709af1545b802ed7794808a2ab560ed08a
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 25fdb7f..54ab6dd 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -59,7 +59,7 @@
 my $max_line_length = 100;
 my $ignore_perl_version = 0;
 my $minimum_perl_version = 5.10.0;
-my $min_conf_desc_length = 4;
+my $min_conf_desc_length = 2;
 my $spelling_file = "$D/spelling.txt";
 my $codespell = 0;
 my $codespellfile = "/usr/share/codespell/dictionary.txt";
@@ -457,8 +457,8 @@
 	}
 
 	if (!defined $root) {
-		print "Must be run from the top-level dir. of a kernel tree\n";
-		exit(2);
+		# print "Must be run from the top-level dir. of a kernel tree\n";
+		# exit(2);
 	}
 }
 
@@ -1147,7 +1147,7 @@
 sub is_SPDX_License_valid {
 	my ($license) = @_;
 
-	return 1 if (!$tree || which("python3") eq "" || !(-x "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
+	return 1 if (!$tree || which("python3") eq "" || !(-x "scripts/spdxcheck.py") || !(-e "$gitroot"));
 
 	my $root_path = abs_path($root);
 	my $status = `cd "$root_path"; echo "$license" | scripts/spdxcheck.py -`;
@@ -2860,7 +2860,7 @@
 
 			$p1_prefix = $1;
 			if (!$file && $tree && $p1_prefix ne '' &&
-			    -e "$root/$p1_prefix") {
+			    -e "$p1_prefix") {
 				WARN("PATCH_PREFIX",
 				     "patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
 			}
@@ -2884,10 +2884,10 @@
 		}
 
 		if ($found_file) {
-			if (is_maintained_obsolete($realfile)) {
-				WARN("OBSOLETE",
-				     "$realfile is marked as 'obsolete' in the MAINTAINERS hierarchy.  No unnecessary modifications please.\n");
-			}
+			# if (is_maintained_obsolete($realfile)) {
+			# 	WARN("OBSOLETE",
+			# 	     "$realfile is marked as 'obsolete' in the MAINTAINERS hierarchy.  No unnecessary modifications please.\n");
+			# }
 			if ($realfile =~ m@^(?:drivers/net/|net/|drivers/staging/)@) {
 				$check = 1;
 			} else {
@@ -2902,8 +2902,8 @@
 
 				if (($last_binding_patch != -1) &&
 				    ($last_binding_patch ^ $is_binding_patch)) {
-					WARN("DT_SPLIT_BINDING_PATCH",
-					     "DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst\n");
+					# WARN("DT_SPLIT_BINDING_PATCH",
+					#      "DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst\n");
 				}
 			}
 
@@ -2925,9 +2925,9 @@
 				$commit_log_lines++;	#could be a $signature
 			}
 		} elsif ($has_commit_log && $commit_log_lines < 2) {
-			WARN("COMMIT_MESSAGE",
-			     "Missing commit description - Add an appropriate one\n");
-			$commit_log_lines = 2;	#warn only once
+			# WARN("COMMIT_MESSAGE",
+			#      "Missing commit description - Add an appropriate one\n");
+			# $commit_log_lines = 2;	#warn only once
 		}
 
 # Check if the commit log has what seems like a diff which can confuse patch
@@ -3065,8 +3065,8 @@
 			my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
 			my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
 			if ($suggested_email eq "") {
-				ERROR("BAD_SIGN_OFF",
-				      "Unrecognized email address: '$email'\n" . $herecurr);
+				# ERROR("BAD_SIGN_OFF",
+				#       "Unrecognized email address: '$email'\n" . $herecurr);
 			} else {
 				my $dequoted = $suggested_email;
 				$dequoted =~ s/^"//;
@@ -3242,11 +3242,11 @@
 
 # Check for Gerrit Change-Ids not in any patch context
 		if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
-			if (ERROR("GERRIT_CHANGE_ID",
-			          "Remove Gerrit Change-Id's before submitting upstream\n" . $herecurr) &&
-			    $fix) {
-				fix_delete_line($fixlinenr, $rawline);
-			}
+			# if (ERROR("GERRIT_CHANGE_ID",
+			#           "Remove Gerrit Change-Id's before submitting upstream\n" . $herecurr) &&
+			#     $fix) {
+			# 	fix_delete_line($fixlinenr, $rawline);
+			# }
 		}
 
 # Check if the commit log is in a possible stack dump
@@ -3397,16 +3397,16 @@
 		}
 
 # Check for added, moved or deleted files
-		if (!$reported_maintainer_file && !$in_commit_log &&
-		    ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
-		     $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
-		     ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
-		      (defined($1) || defined($2))))) {
-			$is_patch = 1;
-			$reported_maintainer_file = 1;
-			WARN("FILE_PATH_CHANGES",
-			     "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
-		}
+		# if (!$reported_maintainer_file && !$in_commit_log &&
+		#     ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
+		#      $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
+		#      ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
+		#       (defined($1) || defined($2))))) {
+		# 	$is_patch = 1;
+		# 	$reported_maintainer_file = 1;
+		# 	WARN("FILE_PATH_CHANGES",
+		# 	     "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
+		# }
 
 # Check for adding new DT bindings not in schema format
 		if (!$in_commit_log &&
@@ -3640,8 +3640,8 @@
 			if ($needs_help &&
 			    $help_length < $min_conf_desc_length) {
 				my $stat_real = get_stat_real($linenr, $ln - 1);
-				WARN("CONFIG_DESCRIPTION",
-				     "please write a help paragraph that fully describes the config symbol\n" . "$here\n$stat_real\n");
+				# WARN("CONFIG_DESCRIPTION",
+				#      "please write a help paragraph that fully describes the config symbol\n" . "$here\n$stat_real\n");
 			}
 		}
 
@@ -3716,8 +3716,8 @@
 				$compat3 =~ s/\,([a-z]*)[0-9]*\-/\,$1<\.\*>\-/;
 				`grep -Erq "$compat|$compat2|$compat3" $dt_path`;
 				if ( $? >> 8 ) {
-					WARN("UNDOCUMENTED_DT_STRING",
-					     "DT compatible string \"$compat\" appears un-documented -- check $dt_path\n" . $herecurr);
+					# WARN("UNDOCUMENTED_DT_STRING",
+					#      "DT compatible string \"$compat\" appears un-documented -- check $dt_path\n" . $herecurr);
 				}
 
 				next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
@@ -3760,10 +3760,10 @@
 					     "Missing or malformed SPDX-License-Identifier tag in line $checklicenseline\n" . $herecurr);
 				} elsif ($rawline =~ /(SPDX-License-Identifier: .*)/) {
 					my $spdx_license = $1;
-					if (!is_SPDX_License_valid($spdx_license)) {
-						WARN("SPDX_LICENSE_TAG",
-						     "'$spdx_license' is not supported in LICENSES/...\n" . $herecurr);
-					}
+					# if (!is_SPDX_License_valid($spdx_license)) {
+					# 	WARN("SPDX_LICENSE_TAG",
+					# 	     "'$spdx_license' is not supported in LICENSES/...\n" . $herecurr);
+					# }
 					if ($realfile =~ m@^Documentation/devicetree/bindings/@ &&
 					    $spdx_license !~ /GPL-2\.0(?:-only)? OR BSD-2-Clause/) {
 						my $msg_level = \&WARN;
@@ -3786,8 +3786,8 @@
 
 # check for embedded filenames
 		if ($rawline =~ /^\+.*\b\Q$realfile\E\b/) {
-			WARN("EMBEDDED_FILENAME",
-			     "It's generally not useful to have the filename in the file\n" . $herecurr);
+			# WARN("EMBEDDED_FILENAME",
+			#      "It's generally not useful to have the filename in the file\n" . $herecurr);
 		}
 
 # check we are in a valid source file if not then ignore this hunk
@@ -3950,34 +3950,34 @@
 		}
 
 # check multi-line statement indentation matches previous line
-		if ($perl_version_ok &&
-		    $prevline =~ /^\+([ \t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declare\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|(?:\*\s*)*$Lval\s*=\s*$Ident\s*)\(.*(\&\&|\|\||,)\s*$/) {
-			$prevline =~ /^\+(\t*)(.*)$/;
-			my $oldindent = $1;
-			my $rest = $2;
+		# if ($perl_version_ok &&
+		#     $prevline =~ /^\+([ \t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declare\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|(?:\*\s*)*$Lval\s*=\s*$Ident\s*)\(.*(\&\&|\|\||,)\s*$/) {
+		# 	$prevline =~ /^\+(\t*)(.*)$/;
+		# 	my $oldindent = $1;
+		# 	my $rest = $2;
 
-			my $pos = pos_last_openparen($rest);
-			if ($pos >= 0) {
-				$line =~ /^(\+| )([ \t]*)/;
-				my $newindent = $2;
+		# 	my $pos = pos_last_openparen($rest);
+		# 	if ($pos >= 0) {
+		# 		$line =~ /^(\+| )([ \t]*)/;
+		# 		my $newindent = $2;
 
-				my $goodtabindent = $oldindent .
-					"\t" x ($pos / $tabsize) .
-					" "  x ($pos % $tabsize);
-				my $goodspaceindent = $oldindent . " "  x $pos;
+		# 		my $goodtabindent = $oldindent .
+		# 			"\t" x ($pos / $tabsize) .
+		# 			" "  x ($pos % $tabsize);
+		# 		my $goodspaceindent = $oldindent . " "  x $pos;
 
-				if ($newindent ne $goodtabindent &&
-				    $newindent ne $goodspaceindent) {
+		# 		if ($newindent ne $goodtabindent &&
+		# 		    $newindent ne $goodspaceindent) {
 
-					if (CHK("PARENTHESIS_ALIGNMENT",
-						"Alignment should match open parenthesis\n" . $hereprev) &&
-					    $fix && $line =~ /^\+/) {
-						$fixed[$fixlinenr] =~
-						    s/^\+[ \t]*/\+$goodtabindent/;
-					}
-				}
-			}
-		}
+		# 			if (CHK("PARENTHESIS_ALIGNMENT",
+		# 				"Alignment should match open parenthesis\n" . $hereprev) &&
+		# 			    $fix && $line =~ /^\+/) {
+		# 				$fixed[$fixlinenr] =~
+		# 				    s/^\+[ \t]*/\+$goodtabindent/;
+		# 			}
+		# 		}
+		# 	}
+		# }
 
 # check for space after cast like "(int) foo" or "(struct foo) bar"
 # avoid checking a few false positives:
@@ -6910,8 +6910,8 @@
 						if (!defined($stat_real)) {
 							$stat_real = get_stat_real($linenr, $lc);
 						}
-						WARN("VSPRINTF_SPECIFIER_PX",
-						     "Using vsprintf specifier '\%px' potentially exposes the kernel memory layout, if you don't really need the address please consider using '\%p'.\n" . "$here\n$stat_real\n");
+						# WARN("VSPRINTF_SPECIFIER_PX",
+						#      "Using vsprintf specifier '\%px' potentially exposes the kernel memory layout, if you don't really need the address please consider using '\%p'.\n" . "$here\n$stat_real\n");
 					}
 				}
 				if ($bad_specifier ne "") {
@@ -7175,14 +7175,14 @@
 		}
 
 # checks for new __setup's
-		if ($rawline =~ /\b__setup\("([^"]*)"/) {
-			my $name = $1;
+		# if ($rawline =~ /\b__setup\("([^"]*)"/) {
+		# 	my $name = $1;
 
-			if (!grep(/$name/, @setup_docs)) {
-				CHK("UNDOCUMENTED_SETUP",
-				    "__setup appears un-documented -- check Documentation/admin-guide/kernel-parameters.txt\n" . $herecurr);
-			}
-		}
+		# 	if (!grep(/$name/, @setup_docs)) {
+		# 		CHK("UNDOCUMENTED_SETUP",
+		# 		    "__setup appears un-documented -- check Documentation/admin-guide/kernel-parameters.txt\n" . $herecurr);
+		# 	}
+		# }
 
 # check for pointless casting of alloc functions
 		if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {