From 9e46a35aeaa2a4a02b412f22ece8094d98ec61c1 Mon Sep 17 00:00:00 2001 From: sachin gupta Date: Mon, 15 Jul 2013 03:53:27 -0500 Subject: PRD: To use PRD plugin for error log parsing Change-Id: I676ae1e016a96a153f6b7bf4f1e0469001e4471c Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5400 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton Reviewed-by: A. Patrick Williams III --- src/usr/errl/parser/genErrlParsers.pl | 57 +++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 16 deletions(-) (limited to 'src/usr/errl/parser') diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl index da7fa1263..a21ae94e1 100755 --- a/src/usr/errl/parser/genErrlParsers.pl +++ b/src/usr/errl/parser/genErrlParsers.pl @@ -33,7 +33,7 @@ # - hbfwSrcParse3.C # It generates a file that contains IDs needed by the Hostboot User Detail Data # parsers -# - hbfwUdIds.H +# - hbfwUdIds.H # It generates a makefile that builds the Hostboot SRC/UserDetailData parsers # - makefile @@ -136,8 +136,11 @@ while (my $line = ) # Strip off any leading zeroes from the component value $compValue =~ s/^0//g; - - $compIdToValueHash{$compId} = $compValue; + # Do not add PRDF component ID + if ($compId ne "PRDF_COMP_ID") + { + $compIdToValueHash{$compId} = $compValue; + } } } @@ -432,7 +435,7 @@ foreach my $file (@filesToParse) for (my $lineNum = 0; $lineNum < $numLines; $lineNum++) { $line = $tag[$lineNum]; - + if ($line =~ /\@moduleid\s+(\S+)/i) { # Found a moduleid, find out the value @@ -736,9 +739,20 @@ print OFILE "\# Automatically generated by Hostboot's $0\n"; print OFILE "\# Do not modify this file in the FSP tree, it is provided by\n"; print OFILE "\# Hostboot and will be overwritten\n"; print OFILE "\#\n"; + print OFILE "CFLAGS += -DPARSER\n\n"; print OFILE "EXPLIBS =\n\n"; +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE "\# Call PRD makefile for prdf plugins\n"; +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE ".if ( \$(CONTEXT) != \"x86.nfp\" )\n"; +print OFILE "EXPLIB_SUBDIRS += prdf\n"; +print OFILE "EXPSHLIB_SUBDIRS += prdf\n"; +print OFILE ".else\n"; +print OFILE "EXPLIB_SUBDIRS += prdf\n"; +print OFILE ".endif\n"; + print OFILE "\#-------------------------------------------------------------\n"; print OFILE "\# SRC Parsers\n"; print OFILE "\#-------------------------------------------------------------\n"; @@ -757,12 +771,11 @@ print OFILE "\# User Detail Data Parsers\n"; print OFILE "\#-------------------------------------------------------------\n"; foreach my $compValue (keys %compValToUdFilesHash) { - print OFILE ".if ( \$(CONTEXT) != \"x86.nfp\" )\n"; - print OFILE "libB-$compValue" . "00.so_OFILES += $compValToUdFilesHash{$compValue}\n"; - print OFILE ".else\n"; - print OFILE "libB-$compValue" . "00.a_OFILES += $compValToUdFilesHash{$compValue}\n"; - print OFILE ".endif\n"; - + print OFILE ".if ( \$(CONTEXT) != \"x86.nfp\" )\n"; + print OFILE "libB-$compValue" . "00.so_OFILES += $compValToUdFilesHash{$compValue}\n"; + print OFILE ".else\n"; + print OFILE "libB-$compValue" . "00.a_OFILES += $compValToUdFilesHash{$compValue}\n"; + print OFILE ".endif\n"; } print OFILE ".if ( \$(CONTEXT) != \"x86.nfp\" )\n"; @@ -828,8 +841,12 @@ sub getReasonCodeFiles if (-d $dirEntryPath) { - # Recursively call this function - getReasonCodeFiles($dirEntryPath); + # Exclude PRD directory + if ( !($dirEntryPath =~ /prdf/) ) + { + # Recursively call this function + getReasonCodeFiles($dirEntryPath); + } } elsif(($dirEntry =~ /reasoncodes/i) || ($dirEntry =~ /service_codes/i) || @@ -860,8 +877,12 @@ sub getFilesToParse if (-d $dirEntryPath) { - # Recursively call this function - getFilesToParse($dirEntryPath); + # Exclude PRD directory + if ( !($dirEntryPath =~ /prdf/) ) + { + # Recursively call this function + getFilesToParse($dirEntryPath); + } } elsif($dirEntry =~ /\.[H|C]$/) { @@ -897,8 +918,12 @@ sub getPluginDirsToParse } else { - # Recursively call this function - getPluginDirsToParse($dirEntryPath); + # Exclude PRD directory + if ( !($dirEntryPath =~ /prdf/) ) + { + # Recursively call this function + getPluginDirsToParse($dirEntryPath); + } } } } -- cgit v1.2.3