summaryrefslogtreecommitdiffstats
path: root/src/usr/errl
diff options
context:
space:
mode:
authorVenkatesh Sainath <vsainath@in.ibm.com>2018-06-06 09:53:43 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-11-15 10:52:51 -0600
commit73cad1f1ae2a9f7b4876f61c5db85c35bbd08db3 (patch)
tree4f198743adf5a35cb176c10b0ae5950aad7db94b /src/usr/errl
parent208f80eb821cc1226bbcd76b0ba108754c2a091e (diff)
downloadtalos-hostboot-73cad1f1ae2a9f7b4876f61c5db85c35bbd08db3.tar.gz
talos-hostboot-73cad1f1ae2a9f7b4876f61c5db85c35bbd08db3.zip
Pushing HB plugins and related files for building errltool
Change-Id: I91d432a901fb4ee6de469ca8076637eaa2e1315d Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/60027 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Sampa Misra <sampmisr@in.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
-rwxr-xr-xsrc/usr/errl/parser/genErrlParsers.pl55
-rwxr-xr-xsrc/usr/errl/plugins/errludparser.H6
-rw-r--r--src/usr/errl/plugins/errludsensor.H3
-rw-r--r--src/usr/errl/plugins/errludstate.H3
4 files changed, 63 insertions, 4 deletions
diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl
index ff9bb8461..1d3af664d 100755
--- a/src/usr/errl/parser/genErrlParsers.pl
+++ b/src/usr/errl/parser/genErrlParsers.pl
@@ -979,6 +979,59 @@ foreach my $dir(@pluginDirsToParse)
}
#------------------------------------------------------------------------------
+# Generate the makefile that builds the Hostboot error log parsers for errltool
+#------------------------------------------------------------------------------
+$outputFileName = $outputDir . "/Makefile";
+open(OFILE, ">", $outputFileName) or die("Cannot open: $outputFileName: $!");
+
+print OFILE "\# Automatically generated by Hostboot's $0\n";
+print OFILE "\# Do not modify this file in the errltool tree, it is provided by\n";
+print OFILE "\# Hostboot and will be overwritten\n";
+print OFILE "\#\n";
+
+print OFILE "CXXFLAGS += -D__HOSTBOOT_MODULE -DLOGPARSER \n\n";
+print OFILE "CXXFLAGS += -I. -I../ -I../targeting -I../../include -I../../include/util -I../../include/extras -I../../include/genfiles\n\n";
+
+print OFILE "LDFLAGS += -static\n\n";
+
+print OFILE "\#-------------------------------------------------------------\n";
+print OFILE "\# Call PRD makefile for prdf plugins\n";
+print OFILE "\#-------------------------------------------------------------\n";
+print OFILE "SUBDIRS = prdf\n\n";
+
+print OFILE "CMDS = libhbplugins.a\n\n";
+
+print OFILE "\#-------------------------------------------------------------\n";
+print OFILE "\# SRC Parsers\n";
+print OFILE "\#-------------------------------------------------------------\n";
+
+print OFILE "HB_PLUGIN_SRC_OBJS = ";
+foreach my $compValue (keys %compValueToParseHash)
+{
+ print OFILE "\\\n";
+ print OFILE " hbfwSrcParse$compValue.o ";
+}
+
+print OFILE "\n\n";
+print OFILE "all: \$(CMDS)\n";
+print OFILE "\t\@\$(MAKE) -C prdf\n\n";
+print OFILE "libhbplugins.a: \$(HB_PLUGIN_SRC_OBJS)\n";
+print OFILE "\t\@echo \"LD \$(WORK_DIR)/\$\@\"\n";
+print OFILE "\tar rvs \$\@ \$(HB_PLUGIN_SRC_OBJS)\n\n";
+
+print OFILE "\$(HB_PLUGIN_SRC_OBJS):%.o: %.C\n";
+print OFILE "\t\@echo \"\$(CC) \$(CXXFLAGS) \$(WORK_DIR)/\$\@\"\n";
+print OFILE "\t\$(CC) \$(CXXFLAGS) -c \$<\n\n";
+
+print OFILE "clean:\n";
+print OFILE "\t\@echo \"Cleaning up \$(WORK_DIR) files...\"\n";
+print OFILE "\trm -rf \$(CMDS) \$(HB_PLUGIN_SRC_OBJS)\n";
+print OFILE "\t\@\$(foreach d,\$(SUBDIRS), \$(MAKE) -C \$d clean;)\n\n";
+
+print OFILE "\n\ninclude ../../rules.mk\n";
+
+close(OFILE);
+#------------------------------------------------------------------------------
# Generate the FSP makefile that builds the Hostboot error log parsers
#------------------------------------------------------------------------------
$outputFileName = $outputDir . "/makefile";
@@ -989,7 +1042,7 @@ 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 "CFLAGS += -DPARSER \n\n";
print OFILE "EXPLIBS =\n\n";
print OFILE "\#-------------------------------------------------------------\n";
diff --git a/src/usr/errl/plugins/errludparser.H b/src/usr/errl/plugins/errludparser.H
index 7b44109bc..ddaadade7 100755
--- a/src/usr/errl/plugins/errludparser.H
+++ b/src/usr/errl/plugins/errludparser.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -33,6 +35,7 @@
#include <netinet/in.h>
+#ifndef LOGPARSER
/**
* @brief Endian swap a uint64_t. This is not provided by in.h
*/
@@ -57,6 +60,7 @@ inline uint64_t ntohll( uint64_t i )
#else
#error Unexpected endian context.
#endif
+#endif
// FSP includes
#include <errlplugins.H>
diff --git a/src/usr/errl/plugins/errludsensor.H b/src/usr/errl/plugins/errludsensor.H
index cdca6631e..630b45591 100644
--- a/src/usr/errl/plugins/errludsensor.H
+++ b/src/usr/errl/plugins/errludsensor.H
@@ -33,8 +33,9 @@
*/
#include "errluserdetails.H"
+#ifndef LOGPARSER
#include <targeting/common/target.H>
-
+#endif
namespace ERRORLOG
{
diff --git a/src/usr/errl/plugins/errludstate.H b/src/usr/errl/plugins/errludstate.H
index ac6517b17..99d53c260 100644
--- a/src/usr/errl/plugins/errludstate.H
+++ b/src/usr/errl/plugins/errludstate.H
@@ -33,8 +33,9 @@
*/
#include "errluserdetails.H"
+#ifndef LOGPARSER
#include <targeting/common/target.H>
-
+#endif
namespace ERRORLOG
{
OpenPOWER on IntegriCloud