summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeihong huang <Pei-Hong.Huang@Sun.COM>2009-09-12 12:23:55 +0800
committerpeihong huang <Pei-Hong.Huang@Sun.COM>2009-09-12 12:23:55 +0800
commita799b1e741b6f59012a469e6b57c40cb8061127b (patch)
tree64e69fc80a57db8a3c13d639a760237523f662fe
parent1816cb7076d3ec8a78ef9ac9f895574e13c43645 (diff)
downloadillumos-joyent-a799b1e741b6f59012a469e6b57c40cb8061127b.tar.gz
6858954 check_rtime issues with fwflash plugins (scsi transports)
6858961 check_rtime issues with fwflash plugins (IB transports) 6872320 tidy up MANUFACTURING_MODE in fwflash 6878624 fwflash plugins Makefile outsmarts closed-bins build
-rw-r--r--exception_lists/check_rtime20
-rw-r--r--usr/src/cmd/fwflash/Makefile25
-rw-r--r--usr/src/cmd/fwflash/Makefile.com63
-rw-r--r--usr/src/cmd/fwflash/Makefile.targ87
-rw-r--r--usr/src/cmd/fwflash/common/fwflash.c8
-rw-r--r--usr/src/cmd/fwflash/common/fwflash.h13
-rw-r--r--usr/src/cmd/fwflash/i386/Makefile69
-rw-r--r--usr/src/cmd/fwflash/plugins/Makefile22
-rw-r--r--usr/src/cmd/fwflash/plugins/Makefile.targ75
-rw-r--r--usr/src/cmd/fwflash/plugins/i386/Makefile72
-rw-r--r--usr/src/cmd/fwflash/plugins/sparc/Makefile72
-rw-r--r--usr/src/cmd/fwflash/plugins/transport/Makefile21
-rw-r--r--usr/src/cmd/fwflash/plugins/transport/Makefile.targ91
-rw-r--r--usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers57
-rw-r--r--usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers-hermon46
-rw-r--r--usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers-plus (renamed from usr/src/cmd/fwflash/common/Makefile)33
-rw-r--r--usr/src/cmd/fwflash/plugins/transport/i386/Makefile74
-rw-r--r--usr/src/cmd/fwflash/plugins/transport/sparc/Makefile74
-rw-r--r--usr/src/cmd/fwflash/plugins/vendor/mapfile-vers54
-rw-r--r--usr/src/cmd/fwflash/sparc/Makefile69
-rw-r--r--usr/src/pkgdefs/SUNWfwflash/prototype_com18
21 files changed, 518 insertions, 545 deletions
diff --git a/exception_lists/check_rtime b/exception_lists/check_rtime
index 0c4d11c355..1e9603319d 100644
--- a/exception_lists/check_rtime
+++ b/exception_lists/check_rtime
@@ -204,23 +204,3 @@ NOSYMSORT lib/sparcv9/libsun_fc\.so\.1 # C++
UNREF_OBJ lib/(libdevinfo|libcfgadm)\.so\.1; .*\ of\ .*SUNW,Netra-CP2300/lib/libprtdiag_psr\.so\.1
-# Remove this once the following integrates:
-# 6858961 check_rtime issues with fwflash plugins (IB transports)
-#
-SKIP ^usr/lib/fwflash/identify/hermon\.so$
-SKIP ^usr/lib/fwflash/identify/tavor\.so$
-SKIP ^usr/lib/fwflash/verify/hermon-MELLANOX\.so$
-SKIP ^usr/lib/fwflash/verify/tavor-MELLANOX\.so$
-
-
-# Remove this once the following integrates:
-# 6858954 check_rtime issues with fwflash plugins (scsi transports)
-#
-SKIP ^usr/lib/fwflash/identify/sd\.so$
-SKIP ^usr/lib/fwflash/identify/ses\.so$
-SKIP ^usr/lib/fwflash/identify/sgen\.so$
-SKIP ^usr/lib/fwflash/verify/sd-GENERIC\.so$
-SKIP ^usr/lib/fwflash/verify/ses-LSILOGIC\.so$
-SKIP ^usr/lib/fwflash/verify/ses-SUN\.so$
-SKIP ^usr/lib/fwflash/verify/sgen-LSILOGIC\.so$
-SKIP ^usr/lib/fwflash/verify/sgen-SUN\.so$
diff --git a/usr/src/cmd/fwflash/Makefile b/usr/src/cmd/fwflash/Makefile
index bf3e3e73e2..f4b718d3a0 100644
--- a/usr/src/cmd/fwflash/Makefile
+++ b/usr/src/cmd/fwflash/Makefile
@@ -18,21 +18,25 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
# cmd/fwflash/Makefile
#
-
+include $(SRC)/Makefile.master
PROG= fwflash
-SUBDIRS= $(MACH) plugins
+COMMON_SUBDIRS= $(MACH)
+IDF_SUBDIRS= plugins/transport
+VRF_SUBDIRS= plugins
+SUBDIRS= $(COMMON_SUBDIRS) .WAIT \
+ $(IDF_SUBDIRS) .WAIT \
+ $(VRF_SUBDIRS)
all := TARGET= all
clean := TARGET= clean
clobber := TARGET= clobber
+check := TARGET= check
install := TARGET= install
install_h := TARGET= install_h
lint := TARGET= lint
@@ -41,14 +45,13 @@ msg := TARGET= msg
all clean clobber install lint msg _msg: $(SUBDIRS)
-
+check install_h: $(COMMON_SUBDIRS)
$(SUBDIRS): FRC
@if [ -f $@/Makefile ]; then \
- cd $@; pwd; $(MAKE) $(TARGET); \
- else \
- true; \
- fi
+ cd $@; pwd; $(MAKE) $(TARGET); \
+ else \
+ true; \
+ fi
-# empty rule
FRC:
diff --git a/usr/src/cmd/fwflash/Makefile.com b/usr/src/cmd/fwflash/Makefile.com
index a3988a6e76..b4bd85b8a5 100644
--- a/usr/src/cmd/fwflash/Makefile.com
+++ b/usr/src/cmd/fwflash/Makefile.com
@@ -24,53 +24,50 @@
# cmd/fwflash/Makefile.com
#
#
-
# common rules for $SRC/cmd/fwflash
CLOSED= $(SRC)/../closed
-ROOTLIB= $(ROOT)/usr/lib
-ROOTLIBFWFLASH= $(ROOTLIB)/fwflash
-ROOTLIBFWFLASHPLUGINS= $(ROOTLIBFWFLASH)/identify
-ROOTLIBFWFLASHVERIFY= $(ROOTLIBFWFLASH)/verify
ROOTUSR= $(ROOT)/usr
-ROOTUSRINCLUDE= $(ROOTUSR)/include
-ROOTUSRINCLUDEFWFLASH= $(ROOTUSRINCLUDE)/fwflash
-ROOTUSRSBIN= $(ROOT)/usr/sbin
-
-LDLIBS += -lscf
-
-$(ROOTLIB):
- $(INS.dir)
+ROOTUSRINCLD= $(ROOTUSR)/include
+ROOTUSRINCLDFWFLASH= $(ROOTUSRINCLD)/fwflash
+ROOTUSRLIB= $(ROOTUSR)/lib
+ROOTUSRLIBFWFLASH= $(ROOTUSRLIB)/fwflash
+ROOTUSRLIBFWFLASHIDF= $(ROOTUSRLIBFWFLASH)/identify
+ROOTUSRLIBFWFLASHVRF= $(ROOTUSRLIBFWFLASH)/verify
+ROOTUSRSBIN= $(ROOTUSR)/sbin
-$(ROOTLIBFWFLASH): $(ROOTLIB)
+$(ROOTUSR):
$(INS.dir)
-$(ROOTLIBFWFLASH)/%: $(ROOTLIB) %
+$(ROOTUSRINCLD): $(ROOTUSR)
$(INS.dir)
-$(ROOTLIBFWFLASHPLUGINS): $(ROOTLIBFWFLASH)
+$(ROOTUSRINCLDFWFLASH):
$(INS.dir)
-$(ROOTLIBFWFLASHPLUGINS)/%: $(ROOTLIBFWFLASHPLUGINS) %
+$(ROOTUSRINCLDFWFLASH)/%: $(ROOTUSRINCLDFWFLASH) %
$(INS.file)
-$(ROOTLIBFWFLASHVERIFY): $(ROOTLIBFWFLASH)
+$(ROOTUSRLIB):
$(INS.dir)
-$(ROOTLIBFWFLASHVERIFY)/%: $(ROOTLIBFWFLASHVERIFY) %
- $(INS.file)
+$(ROOTUSRLIBFWFLASH): $(ROOTUSRLIB)
+ $(INS.dir)
-$(ROOTUSR):
+$(ROOTUSRLIBFWFLASH)/%: $(ROOTUSRLIB) %
$(INS.dir)
-$(ROOTUSRINCLUDE): $(ROOTUSR)
+$(ROOTUSRLIBFWFLASHIDF): $(ROOTUSRLIBFWFLASH)
$(INS.dir)
-$(ROOTUSRINCLUDEFWFLASH):
+$(ROOTUSRLIBFWFLASHIDF)/%: $(ROOTUSRLIBFWFLASHIDF) %
+ $(INS.file)
+
+$(ROOTUSRLIBFWFLASHVRF): $(ROOTUSRLIBFWFLASH)
$(INS.dir)
-$(ROOTUSRINCLUDEFWFLASH)/%: $(ROOTUSRINCLUDEFWFLASH) %
+$(ROOTUSRLIBFWFLASHVRF)/%: $(ROOTUSRLIBFWFLASHVRF) %
$(INS.file)
$(ROOTUSRSBIN): $(ROOTUSR)
@@ -79,9 +76,21 @@ $(ROOTUSRSBIN): $(ROOTUSR)
$(ROOTUSRSBIN)/%: %
$(INS.file)
-BUILD.SO= $(CC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS)
-POST_PROCESS_O += ; $(CTFCONVERT_POST)
-POST_PROCESS_SO += ; $(CTFMERGE_POST)
+
+
+%.ln: $(SRCDIR)/%.c
+ $(LINT.c) $(LINTFLAGS) -c $<
+
+%.po: $(SRCDIR)/%.c
+ $(RM) messages.po
+ $(XGETTEXT) $(XGETFLAGS) \
+ `($(GREP) -l gettext $< || echo /dev/null)`
+ $(SED) "/^domain/d" messages.po > $@
+ $(RM) messages.po
+
+$(POFILE): $(POFILES)
+ $(RM) $@
+ cat $(POFILES) >$@
LINTFLAGS += -D_POSIX_PTHREAD_SEMANTICS -erroff=E_CONSTANT_CONDITION \
-erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
diff --git a/usr/src/cmd/fwflash/Makefile.targ b/usr/src/cmd/fwflash/Makefile.targ
new file mode 100644
index 0000000000..b0da734aff
--- /dev/null
+++ b/usr/src/cmd/fwflash/Makefile.targ
@@ -0,0 +1,87 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#
+# cmd/fwflash
+#
+#
+
+include $(SRC)/Makefile.master
+include $(SRC)/cmd/Makefile.cmd
+
+SRCS= fwflash.c
+HDRS= fwflash.h
+
+PROG= $(SRCS:%.c=%)
+OBJS= $(SRCS:%.c=%.o)
+LINTFILE= $(SRCS:%.c=%.ln)
+POFILES= $(SRCS:%.c=%.po)
+
+POFILE= fwflash_msg.po
+
+HDRDIR=../common
+SRCDIR=../common
+
+include ../Makefile.com
+
+ROOTHDRS= $(HDRS:%=$(ROOTUSRINCLDFWFLASH)/%)
+HDRSRCS= $(HDRS:%=$(HDRDIR)/%)
+CHECKHDRS= $(HDRSRCS:%.h=%.check)
+
+$(ROOTUSRSBIN)/$(PROG) := FILEMODE = 0555
+$(ROOTUSRINCLDFWFLASH)/%.h := FILEMODE = 0644
+
+
+CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
+LDLIBS += -ldevinfo -lumem -lscf
+
+
+$(ROOTUSRINCLDFWFLASH)/%: $(HDRDIR)/%
+ $(INS.file)
+
+
+$(PROG): install_h $(OBJS)
+ $(LINK.c) -o $(PROG) $(OBJS) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
+ $(POST_PROCESS)
+
+%.o: $(SRCDIR)/%.c
+ $(COMPILE.c) $(CFLAGS) -o $@ $<
+
+
+all: $(PROG)
+
+clean:
+ $(RM) $(POFILE) $(POFILES) $(LINTFILE) $(PROG)
+
+clobber: clean
+ $(RM) $(OBJS)
+
+check: $(CHECKHDRS)
+
+install: all $(ROOTUSRSBIN) $(ROOTUSRSBIN)/$(PROG)
+
+install_h:$(ROOTUSRINCLDFWFLASH) $(ROOTHDRS)
+
+lint: $(LINTFILE)
+
+_msg msg: $(POFILE)
diff --git a/usr/src/cmd/fwflash/common/fwflash.c b/usr/src/cmd/fwflash/common/fwflash.c
index 12a7a93665..8bc95e681d 100644
--- a/usr/src/cmd/fwflash/common/fwflash.c
+++ b/usr/src/cmd/fwflash/common/fwflash.c
@@ -73,6 +73,14 @@ static char *sla [] = { "Copyright 2007 Sun Microsystems, Inc., 4150 Network "
int fwflash_arg_list = 0;
char *filelist[10];
+/* exposed global args */
+di_node_t rootnode;
+struct PLUGINLIST *fw_pluginlist;
+struct DEVICELIST *fw_devices;
+struct vrfyplugin *verifier;
+struct fw_plugin *self;
+int fwflash_debug = 0;
+
/* are we writing to flash? */
static int fwflash_in_write = 0;
diff --git a/usr/src/cmd/fwflash/common/fwflash.h b/usr/src/cmd/fwflash/common/fwflash.h
index 54c140896d..46bffe3372 100644
--- a/usr/src/cmd/fwflash/common/fwflash.h
+++ b/usr/src/cmd/fwflash/common/fwflash.h
@@ -41,7 +41,6 @@ extern "C" {
#define MSG_INFO 0
#define MSG_WARN 1
#define MSG_ERROR 2
-int fwflash_debug;
#define FWFLASH_SUCCESS 0
#define FWFLASH_FAILURE 1
@@ -341,12 +340,14 @@ struct vrfyplugin {
/* global variables for fwflash */
TAILQ_HEAD(PLUGINLIST, pluginlist);
TAILQ_HEAD(DEVICELIST, devicelist);
-struct PLUGINLIST *fw_pluginlist;
-struct DEVICELIST *fw_devices;
-struct vrfyplugin *verifier;
-di_node_t rootnode;
-struct fw_plugin *self;
+/* exposed global args */
+extern di_node_t rootnode;
+extern struct PLUGINLIST *fw_pluginlist;
+extern struct DEVICELIST *fw_devices;
+extern struct vrfyplugin *verifier;
+extern struct fw_plugin *self;
+extern int fwflash_debug;
/*
* utility defines and macros, since the firmware image we get
diff --git a/usr/src/cmd/fwflash/i386/Makefile b/usr/src/cmd/fwflash/i386/Makefile
index 252eb5b146..698f13d4f7 100644
--- a/usr/src/cmd/fwflash/i386/Makefile
+++ b/usr/src/cmd/fwflash/i386/Makefile
@@ -18,76 +18,11 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
#
# cmd/fwflash/i386/Makefile
#
-#
-
-
-PROG= fwflash
-OBJS= fwflash.o
-SRCS= fwflash.c
-LINTFILE= fwflash.ln
-
-
-all: $(PROG)
-lint: lint_SRCS
-
-include $(SRC)/Makefile.master
-include $(SRC)/cmd/Makefile.cmd
-include ../Makefile.com
-
-$(ROOTUSRSBIN)/$(PROG) := FILEMODE = 0555
-
-#
-# Message catalog
-#
-POFILES= $(SRCS:%.c=%.po)
-POFILE= fwflash_msg.po
-
-CFLAGS += -g -D_POSIX_PTHREAD_SEMANTICS
-MANUFACTURING_MODE=0
-CFLAGS += -DMANUFACTURING_MODE=$(MANUFACTURING_MODE)
-LDLIBS += -ldevinfo -lumem
-
-#
-# Message catalog
-#
-
-$(POFILES): ../common/$(SRCS)
- $(RM) messages.po
- $(XGETTEXT) $(XGETFLAGS) \
- `($(GREP) -l gettext ../common/fwflash.c || echo /dev/null)`
- $(SED) "/^domain/d" messages.po > $@
- $(RM) messages.po
-
-$(POFILE): $(POFILES)
- $(RM) $@
- cat $(POFILES) > $@
-
-
-clean:
- $(RM) $(PROG) $(OBJS)
-
-clobber: clean
- $(RM) $(POFILE) $(POFILES) $(LINTFILE)
-
-install_h:
- @cd ../common ; $(MAKE) install_h
-
-$(PROG): install_h $(OBJS)
- $(LINK.c) -o $(PROG) $(OBJS) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
- $(POST_PROCESS)
-
-%.o: ../common/%.c
- $(COMPILE.c) $(CFLAGS) -o $@ $<
-
-install: all $(ROOTUSRSBIN) $(ROOTUSRSBIN)/$(PROG)
-
-lint_SRCS: ../common/$(SRCS:%.c=%.ln)
-_msg msg: $(POFILE)
+include ../Makefile.targ
diff --git a/usr/src/cmd/fwflash/plugins/Makefile b/usr/src/cmd/fwflash/plugins/Makefile
index 3a28e5a923..01ffa9f559 100644
--- a/usr/src/cmd/fwflash/plugins/Makefile
+++ b/usr/src/cmd/fwflash/plugins/Makefile
@@ -24,15 +24,12 @@
#
# cmd/fwflash/plugins
#
+include $(SRC)/Makefile.master
-include $(SRC)/cmd/Makefile.cmd
+COMMON_SUBDIRS= $(MACH)
+$(CLOSED_BUILD)COMMON_SUBDIRS += $(CLOSED)/cmd/fwflash/plugins
-COMMON_SUBDIRS= $(MACH) transport
-CLOSED_SUBDIRS= $(CLOSED)/cmd/fwflash/plugins
-
-SUBDIRS= $(COMMON_SUBDIRS) $(CLOSED_SUBDIRS)
-
-MSGSUBDIRS= $(COMMON_SUBDIRS) $(CLOSED_SUBDIRS)
+SUBDIRS= $(COMMON_SUBDIRS)
all := TARGET= all
install := TARGET= install
@@ -42,19 +39,10 @@ lint := TARGET= lint
_msg := TARGET= _msg
msg := TARGET= msg
-include $(SRC)/cmd/fwflash/Makefile.com
-
.KEEP_STATE:
-all: $(SUBDIRS)
-lint: $(SUBDIRS)
-install: $(SUBDIRS)
-clean: $(SUBDIRS)
-clobber: $(SUBDIRS)
-
-
-msg _msg: $(MSGSUBDIRS)
+all clean clobber install lint msg _msg: $(SUBDIRS)
$(SUBDIRS): FRC
diff --git a/usr/src/cmd/fwflash/plugins/Makefile.targ b/usr/src/cmd/fwflash/plugins/Makefile.targ
new file mode 100644
index 0000000000..8650ee545b
--- /dev/null
+++ b/usr/src/cmd/fwflash/plugins/Makefile.targ
@@ -0,0 +1,75 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# cmd/fwflash/plugins
+#
+include $(SRC)/lib/Makefile.lib
+
+HERMON-MELLANOX_LIB= hermon-MELLANOX.so
+TAVOR-MELLANOX_LIB= tavor-MELLANOX.so
+SD-GENERIC_LIB= sd-GENERIC.so
+
+PLUGINS= $(HERMON-MELLANOX_LIB) $(TAVOR-MELLANOX_LIB) $(SD-GENERIC_LIB)
+
+OBJECTS= $(PLUGINS:%.so=%.o)
+DYNLIB= $(PLUGINS:%=%)
+POFILES= $(PLUGINS:%.so=%.po)
+LINTFILE= $(PLUGINS:%.so=%.ln)
+
+POFILE= fwflash_verify_msg.po
+SRCDIR= ../vendor
+
+include $(SRC)/cmd/fwflash/Makefile.com
+
+CLEANFILES= $(PLUGINS) $(POFILE) $(POFILES) $(LINTFILE)
+
+LIBS= $(DYNLIB)
+CFLAGS += $(C_PICFLAGS)
+ROOTLIBDIR= $(ROOTUSRLIBFWFLASHVRF)
+MAPFILES= ../vendor/mapfile-vers
+LDLIBS += -lc
+FILEMODE = 0755
+
+$(HERMON-MELLANOX_LIB):= PICS= pics/$(HERMON-MELLANOX_LIB:%.so=%.o)
+$(TAVOR-MELLANOX_LIB):= PICS = pics/$(TAVOR-MELLANOX_LIB:%.so=%.o)
+$(SD-GENERIC_LIB):= PICS= pics/$(SD-GENERIC_LIB:%.so=%.o)
+
+$(HERMON-MELLANOX_LIB):= SONAME = $(HERMON-MELLANOX_LIB)
+$(TAVOR-MELLANOX_LIB):= SONAME = $(TAVOR-MELLANOX_LIB)
+$(SD-GENERIC_LIB):= SONAME = $(SD-GENERIC_LIB)
+
+$(HERMON-MELLANOX_LIB):= DYNFLAGS += -R/usr/lib/fwflash/identify
+$(HERMON-MELLANOX_LIB):= LDLIBS += -L. $(ROOT)/usr/lib/fwflash/identify/hermon.so
+
+
+.KEEP STATE:
+
+all: $(LIBS)
+
+install: all $(ROOTLIBS)
+
+lint: $(LINTFILE)
+
+_msg msg: $(POFILE)
+
+include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/cmd/fwflash/plugins/i386/Makefile b/usr/src/cmd/fwflash/plugins/i386/Makefile
index d359c556e6..b32da48a17 100644
--- a/usr/src/cmd/fwflash/plugins/i386/Makefile
+++ b/usr/src/cmd/fwflash/plugins/i386/Makefile
@@ -24,74 +24,4 @@
# cmd/fwflash/plugins/i386
#
-SRCS= tavor-MELLANOX.c hermon-MELLANOX.c sd-GENERIC.c
-OBJECTS= $(SRCS:%.c=%.o)
-PLUGINS= $(SRCS:%.c=%.so)
-POFILES= $(SRCS:%.c=%.po)
-LINTFILE= $(SRCS:%.c=%.ln)
-
-VERIFYPOFILE= fwflash_verify_msg.po
-
-CLOBBERFILES= $(PLUGINS) $(OBJECTS) $(LINTFILE) \
- $(POFILES) $(VERIFYPOFILE)
-TEXT_DOMAIN= SUNW_OST_OSCMD
-
-all: $(PLUGINS)
-
-
-include $(SRC)/Makefile.master
-include $(SRC)/cmd/fwflash/Makefile.com
-
-
-CFLAGS += -g -D_POSIX_PTHREAD_SEMANTICS -I$(ROOT)/usr/include
-MANUFACTURING_MODE=0
-CFLAGS += -DMANUFACTURING_MODE=$(MANUFACTURING_MODE)
-LDLIBS += -ldevinfo -lumem -lc
-DYNFLAGS += -Bdynamic
-LIBS= $(DYNLIB)
-
-BUILD.SO= $(LD) -o $@ $(HERMON_LDFLAGS) -G $(DYNFLAGS)
-
-hermon-MELLANOX.so := HERMON_LDFLAGS += -N/usr/lib/fwflash/identify/hermon.so
-
-%.o: ../vendor/%.c
- $(COMPILE.c) $<
- $(POST_PROCESS_O)
-
-%.so: %.o
- $(BUILD.SO) $<
- $(POST_PROCESS)
-
-%.ln: ../vendor/%.c
- $(LINT.c) $(LINTFLAGS) -c $<
-
-%.po: ../vendor/%.c
- $(RM) messages.po
- $(XGETTEXT) $(XGETFLAGS) \
- `($(GREP) -l gettext $< || echo /dev/null)`
- $(SED) "/^domain/d" messages.po > $@
- $(RM) messages.po
-
-#
-# Message catalog
-#
-
-$(VERIFYPOFILE): $(POFILES)
- $(RM) $@
- cat $(POFILES) > $@
-
-install: $(ROOTLIBFWFLASHVERIFY) \
- $(ROOTLIBFWFLASHVERIFY)/tavor-MELLANOX.so \
- $(ROOTLIBFWFLASHVERIFY)/hermon-MELLANOX.so \
- $(ROOTLIBFWFLASHVERIFY)/sd-GENERIC.so
-
-clean:
- $(RM) $(OBJECTS)
-
-clobber: clean
- $(RM) $(CLOBBERFILES)
-
-lint: lint_SRCS
-lint_SRCS: $(LINTFILE)
-
-_msg msg: $(VERIFYPOFILE)
+include ../Makefile.targ
diff --git a/usr/src/cmd/fwflash/plugins/sparc/Makefile b/usr/src/cmd/fwflash/plugins/sparc/Makefile
index fedee291ee..7381ebb77a 100644
--- a/usr/src/cmd/fwflash/plugins/sparc/Makefile
+++ b/usr/src/cmd/fwflash/plugins/sparc/Makefile
@@ -24,74 +24,4 @@
# cmd/fwflash/plugins/sparc
#
-SRCS= tavor-MELLANOX.c hermon-MELLANOX.c sd-GENERIC.c
-OBJECTS= $(SRCS:%.c=%.o)
-PLUGINS= $(SRCS:%.c=%.so)
-POFILES= $(SRCS:%.c=%.po)
-LINTFILE= $(SRCS:%.c=%.ln)
-
-VERIFYPOFILE= fwflash_verify_msg.po
-
-CLOBBERFILES= $(PLUGINS) $(OBJECTS) $(LINTFILE) \
- $(POFILES) $(VERIFYPOFILE)
-TEXT_DOMAIN= SUNW_OST_OSCMD
-
-all: $(PLUGINS)
-
-
-include $(SRC)/Makefile.master
-include $(SRC)/cmd/fwflash/Makefile.com
-
-
-CFLAGS += -g -D_POSIX_PTHREAD_SEMANTICS -I$(ROOT)/usr/include
-MANUFACTURING_MODE=0
-CFLAGS += -DMANUFACTURING_MODE=$(MANUFACTURING_MODE)
-LDLIBS += -ldevinfo -lumem -lc
-DYNFLAGS += -Bdynamic
-LIBS= $(DYNLIB)
-
-BUILD.SO= $(LD) -o $@ $(HERMON_LDFLAGS) -G $(DYNFLAGS)
-
-hermon-MELLANOX.so := HERMON_LDFLAGS += -N/usr/lib/fwflash/identify/hermon.so
-
-%.o: ../vendor/%.c
- $(COMPILE.c) $<
- $(POST_PROCESS_O)
-
-%.so: %.o
- $(BUILD.SO) $<
- $(POST_PROCESS)
-
-%.ln: ../vendor/%.c
- $(LINT.c) $(LINTFLAGS) -c $<
-
-%.po: ../vendor/%.c
- $(RM) messages.po
- $(XGETTEXT) $(XGETFLAGS) \
- `($(GREP) -l gettext $< || echo /dev/null)`
- $(SED) "/^domain/d" messages.po > $@
- $(RM) messages.po
-
-#
-# Message catalog
-#
-
-$(VERIFYPOFILE): $(POFILES)
- $(RM) $@
- cat $(POFILES) > $@
-
-install: $(ROOTLIBFWFLASHVERIFY) \
- $(ROOTLIBFWFLASHVERIFY)/tavor-MELLANOX.so \
- $(ROOTLIBFWFLASHVERIFY)/hermon-MELLANOX.so \
- $(ROOTLIBFWFLASHVERIFY)/sd-GENERIC.so
-
-clean:
- $(RM) $(OBJECTS)
-
-clobber: clean
- $(RM) $(CLOBBERFILES)
-
-lint: lint_SRCS
-lint_SRCS: $(LINTFILE)
-
-_msg msg: $(VERIFYPOFILE)
+include ../Makefile.targ
diff --git a/usr/src/cmd/fwflash/plugins/transport/Makefile b/usr/src/cmd/fwflash/plugins/transport/Makefile
index d70dedc310..c594def918 100644
--- a/usr/src/cmd/fwflash/plugins/transport/Makefile
+++ b/usr/src/cmd/fwflash/plugins/transport/Makefile
@@ -18,23 +18,17 @@
#
# CDDL HEADER END
#
-#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# cmd/fwflash/plugins/transport
#
-
-include $(SRC)/cmd/Makefile.cmd
+include $(SRC)/Makefile.master
COMMON_SUBDIRS= $(MACH)
SUBDIRS= $(COMMON_SUBDIRS)
-MSGSUBDIRS= $(COMMON_SUBDIRS)
-
all := TARGET= all
install := TARGET= install
clean := TARGET= clean
@@ -43,20 +37,11 @@ lint := TARGET= lint
_msg := TARGET= _msg
msg := TARGET= msg
-include $(SRC)/cmd/fwflash/Makefile.com
-
.KEEP_STATE:
-all: $(SUBDIRS)
-lint: $(SUBDIRS)
-
-msg _msg: $(MSGSUBDIRS)
-
+all clean clobber install lint msg _msg: $(SUBDIRS)
-install: $(SUBDIRS)
-clean: $(SUBDIRS)
-clobber: $(SUBDIRS)
$(SUBDIRS): FRC
diff --git a/usr/src/cmd/fwflash/plugins/transport/Makefile.targ b/usr/src/cmd/fwflash/plugins/transport/Makefile.targ
new file mode 100644
index 0000000000..fa2b078452
--- /dev/null
+++ b/usr/src/cmd/fwflash/plugins/transport/Makefile.targ
@@ -0,0 +1,91 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# cmd/fwflash/plugins/transport
+#
+include $(SRC)/lib/Makefile.lib
+
+SES_LIB= ses.so
+TAVOR_LIB= tavor.so
+HERMON_LIB= hermon.so
+SD_LIB= sd.so
+
+PLUGINS= $(SES_LIB) $(TAVOR_LIB) $(HERMON_LIB) $(SD_LIB)
+
+OBJECTS= $(PLUGINS:%.so=%.o)
+DYNLIB= $(PLUGINS:%=%)
+POFILES= $(PLUGINS:%.so=%.po)
+LINTFILE= $(PLUGINS:%.so=%.ln)
+
+SLINKS= sgen.so
+POFILE= fwflash_transport_identify_ses.po
+SRCDIR= ../common
+
+include $(SRC)/cmd/fwflash/Makefile.com
+
+CLEANFILES= $(PLUGINS) $(POFILES) $(POFILE) $(LINTFILE) $(SLINKS)
+
+LIBS= $(DYNLIB)
+CFLAGS += $(C_PICFLAGS)
+ROOTLIBDIR= $(ROOTUSRLIBFWFLASHIDF)
+LDLIBS += -ldevinfo -lc
+MAPFILES= ../common/mapfile-vers
+FILEMODE= 0755
+
+$(SES_LIB):= PICS= pics/$(SES_LIB:%.so=%.o)
+$(TAVOR_LIB):= PICS= pics/$(TAVOR_LIB:%.so=%.o)
+$(HERMON_LIB):= PICS= pics/$(HERMON_LIB:%.so=%.o)
+$(SD_LIB):= PICS= pics/$(SD_LIB:%.so=%.o)
+
+$(SES_LIB):= SONAME = $(SES_LIB)
+$(TAVOR_LIB):= SONAME = $(TAVOR_LIB)
+$(HERMON_LIB):= SONAME = $(HERMON_LIB)
+$(SD_LIB):= SONAME = $(SD_LIB)
+
+$(HERMON_LIB):= MAPFILES += ../common/mapfile-vers-hermon
+$(SD_LIB):= MAPFILES += ../common/mapfile-vers-plus
+
+$(SES_LIB):= LDLIBS += -L$(ROOT)/usr/lib/scsi -lscsi -lses -lnvpair
+$(SD_LIB):= LDLIBS += -L$(ROOT)/usr/lib/scsi -lscsi -lumem
+
+$(SES_LIB):= DYNFLAGS += -R/usr/lib/scsi
+$(SD_LIB):= DYNFLAGS += -R/usr/lib/scsi
+
+.KEEP STATE:
+
+$(ROOTUSRLIBFWFLASHIDF)/$(SLINKS) : $(ROOTUSRLIBFWFLASHIDF)/$(SES_LIB)
+ @$(RM) $@
+ $(SYMLINK) $(SES_LIB) $@
+
+all: $(LIBS)
+
+install: all $(ROOTLIBS) \
+ $(ROOTUSRLIBFWFLASHIDF)/$(SLINKS)
+
+lint: $(LINTFILE)
+
+_msg msg: $(POFILE)
+
+include $(SRC)/lib/Makefile.targ
+
+
diff --git a/usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers b/usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers
new file mode 100644
index 0000000000..4944d228e7
--- /dev/null
+++ b/usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers
@@ -0,0 +1,57 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+#
+# MAPFILE HEADER START
+#
+# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+# usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
+#
+
+SUNWprivate {
+ global:
+ fw_devices = PARENT;
+ fw_pluginlist = PARENT;
+ fwflash_debug = PARENT;
+ rootnode = PARENT;
+ self = PARENT;
+ verifier = PARENT;
+ logmsg = PARENT;
+ drivername;
+ fw_devinfo;
+ fw_identify;
+ fw_readfw;
+ fw_writefw;
+ local:
+ *;
+};
+
diff --git a/usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers-hermon b/usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers-hermon
new file mode 100644
index 0000000000..d5415013d8
--- /dev/null
+++ b/usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers-hermon
@@ -0,0 +1,46 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+#
+# MAPFILE HEADER START
+#
+# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+# usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
+#
+
+SUNWprivate {
+ global:
+ cnx_crc16;
+ cnx_is_magic_pattern_present;
+ cnx_parse_img_info;
+};
+
diff --git a/usr/src/cmd/fwflash/common/Makefile b/usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers-plus
index 39032700fa..a5018ff9af 100644
--- a/usr/src/cmd/fwflash/common/Makefile
+++ b/usr/src/cmd/fwflash/plugins/transport/common/mapfile-vers-plus
@@ -18,24 +18,27 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
+
#
-# cmd/fwflash/common/Makefile
+# MAPFILE HEADER START
#
+# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+# usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
#
-HDRS= fwflash.h
-
-all: install_h
-
-include $(SRC)/Makefile.master
-include ../Makefile.com
-
-$(ROOTUSRINCLUDEFWFLASH)/%.h := FILEMODE= 0644
-
-install_h: $(ROOTUSRINCLUDEFWFLASH) \
- $(ROOTUSRINCLUDEFWFLASH)/$(HDRS)
-
+SUNWprivate {
+ global:
+ fw_cleanup;
+};
+
diff --git a/usr/src/cmd/fwflash/plugins/transport/i386/Makefile b/usr/src/cmd/fwflash/plugins/transport/i386/Makefile
index 25737381d7..60c1ee45cb 100644
--- a/usr/src/cmd/fwflash/plugins/transport/i386/Makefile
+++ b/usr/src/cmd/fwflash/plugins/transport/i386/Makefile
@@ -24,76 +24,4 @@
# cmd/fwflash/plugins/transport/i386
#
-SRCS= ses.c tavor.c hermon.c sd.c
-
-OBJECTS= $(SRCS:%.c=%.o)
-PLUGINS= $(SRCS:%.c=%.so)
-POFILES= $(SRCS:%.c=%.po)
-IDENTPOFILE= fwflash_transport_identify_ses.po
-LINTFILE= $(SRCS:%.c=%.ln)
-SLINKS= sgen.so
-
-CLEANFILES= $(OBJECTS)
-CLOBBERFILES= $(PLUGINS) $(POFILES) $(IDENTPOFILE) $(LINTFILE) $(SLINKS)
-
-
-
-all: $(PLUGINS)
-_msg msg: $(IDENTPOFILE)
-
-
-include $(SRC)/Makefile.master
-include $(SRC)/cmd/fwflash/Makefile.com
-
-CFLAGS += -g -D_POSIX_PTHREAD_SEMANTICS
-DYNFLAGS += -Bdynamic
-LDLIBS += -L$(ROOT)/usr/lib/scsi -ldevinfo -lumem -lc -lscsi -lses
-LDFLAGS += -R/usr/lib/scsi
-
-BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(LDFLAGS) $(LDLIBS)
-
-$(PLUGINS) := FILEMODE = 0555
-
-
-$(ROOTLIBFWFLASHPLUGINS)/$(SLINKS) : $(ROOTLIBFWFLASHPLUGINS)/ses.so
- @$(RM) $@
- $(SYMLINK) ses.so $@
-
-install: all $(ROOTLIBFWFLASHPLUGINS) \
- $(ROOTLIBFWFLASHPLUGINS)/ses.so \
- $(ROOTLIBFWFLASHPLUGINS)/tavor.so \
- $(ROOTLIBFWFLASHPLUGINS)/hermon.so \
- $(ROOTLIBFWFLASHPLUGINS)/sd.so \
- $(ROOTLIBFWFLASHPLUGINS)/$(SLINKS)
-
-clobber clean:
- $(RM) $(CLEANFILES) $(CLOBBERFILES)
-
-lint_SRCS: $(LINTFILE)
-lint: lint_SRCS
-
-%.o: ../common/%.c
- $(COMPILE.c) $<
- $(POST_PROCESS_O)
-
-%.so: %.o
- $(BUILD.SO) $<
-
-%.ln: ../common/%.c
- $(LINT.c) $(LINTFLAGS) -c $<
-
-
-#
-# Message catalog
-#
-%.po: ../common/%.c
- $(RM) messages.po
- $(XGETTEXT) $(XGETFLAGS) \
- `($(GREP) -l gettext $< || echo /dev/null)`
- $(SED) "/^domain/d" messages.po > $@
- $(RM) messages.po
-
-$(IDENTPOFILE): $(POFILES)
- $(RM) $@
- cat $(POFILES) > $@
-
+include ../Makefile.targ
diff --git a/usr/src/cmd/fwflash/plugins/transport/sparc/Makefile b/usr/src/cmd/fwflash/plugins/transport/sparc/Makefile
index 3e413393e4..9778a13984 100644
--- a/usr/src/cmd/fwflash/plugins/transport/sparc/Makefile
+++ b/usr/src/cmd/fwflash/plugins/transport/sparc/Makefile
@@ -24,76 +24,4 @@
# cmd/fwflash/plugins/transport/sparc
#
-SRCS= ses.c tavor.c hermon.c sd.c
-
-OBJECTS= $(SRCS:%.c=%.o)
-PLUGINS= $(SRCS:%.c=%.so)
-POFILES= $(SRCS:%.c=%.po)
-IDENTPOFILE= fwflash_transport_identify_ses.po
-LINTFILE= $(SRCS:%.c=%.ln)
-SLINKS= sgen.so
-
-CLEANFILES= $(OBJECTS)
-CLOBBERFILES= $(PLUGINS) $(POFILES) $(IDENTPOFILE) $(LINTFILE) $(SLINKS)
-
-
-
-all: $(PLUGINS)
-_msg msg: $(IDENTPOFILE)
-
-
-include $(SRC)/Makefile.master
-include $(SRC)/cmd/fwflash/Makefile.com
-
-CFLAGS += -g -D_POSIX_PTHREAD_SEMANTICS
-DYNFLAGS += -Bdynamic
-LDLIBS += -L$(ROOT)/usr/lib/scsi -ldevinfo -lumem -lc -lscsi -lses
-LDFLAGS += -R/usr/lib/scsi
-
-BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(LDFLAGS) $(LDLIBS)
-
-$(PLUGINS) := FILEMODE = 0555
-
-
-$(ROOTLIBFWFLASHPLUGINS)/$(SLINKS) : $(ROOTLIBFWFLASHPLUGINS)/ses.so
- @$(RM) $@
- $(SYMLINK) ses.so $@
-
-install: all $(ROOTLIBFWFLASHPLUGINS) \
- $(ROOTLIBFWFLASHPLUGINS)/ses.so \
- $(ROOTLIBFWFLASHPLUGINS)/tavor.so \
- $(ROOTLIBFWFLASHPLUGINS)/hermon.so \
- $(ROOTLIBFWFLASHPLUGINS)/sd.so \
- $(ROOTLIBFWFLASHPLUGINS)/$(SLINKS)
-
-clobber clean:
- $(RM) $(CLEANFILES) $(CLOBBERFILES)
-
-lint_SRCS: $(LINTFILE)
-lint: lint_SRCS
-
-%.o: ../common/%.c
- $(COMPILE.c) $<
- $(POST_PROCESS_O)
-
-%.so: %.o
- $(BUILD.SO) $<
-
-%.ln: ../common/%.c
- $(LINT.c) $(LINTFLAGS) -c $<
-
-
-#
-# Message catalog
-#
-%.po: ../common/%.c
- $(RM) messages.po
- $(XGETTEXT) $(XGETFLAGS) \
- `($(GREP) -l gettext $< || echo /dev/null)`
- $(SED) "/^domain/d" messages.po > $@
- $(RM) messages.po
-
-$(IDENTPOFILE): $(POFILES)
- $(RM) $@
- cat $(POFILES) > $@
-
+include ../Makefile.targ
diff --git a/usr/src/cmd/fwflash/plugins/vendor/mapfile-vers b/usr/src/cmd/fwflash/plugins/vendor/mapfile-vers
new file mode 100644
index 0000000000..0592197c9c
--- /dev/null
+++ b/usr/src/cmd/fwflash/plugins/vendor/mapfile-vers
@@ -0,0 +1,54 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+#
+# MAPFILE HEADER START
+#
+# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+# usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
+#
+
+SUNWprivate {
+ global:
+ fw_devices = PARENT;
+ fw_pluginlist = PARENT;
+ fwflash_debug = PARENT;
+ rootnode = PARENT;
+ self = PARENT;
+ verifier = PARENT;
+ logmsg = PARENT;
+ vendorvrfy;
+ vendor;
+ local:
+ *;
+};
+
diff --git a/usr/src/cmd/fwflash/sparc/Makefile b/usr/src/cmd/fwflash/sparc/Makefile
index ef29ccf140..d6722965f6 100644
--- a/usr/src/cmd/fwflash/sparc/Makefile
+++ b/usr/src/cmd/fwflash/sparc/Makefile
@@ -18,76 +18,11 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
#
# cmd/fwflash/sparc/Makefile
#
-#
-
-
-PROG= fwflash
-OBJS= fwflash.o
-SRCS= fwflash.c
-LINTFILE= fwflash.ln
-
-
-all: $(PROG)
-lint: lint_SRCS
-
-include $(SRC)/Makefile.master
-include $(SRC)/cmd/Makefile.cmd
-include ../Makefile.com
-
-$(ROOTUSRSBIN)/$(PROG) := FILEMODE = 0555
-
-#
-# Message catalog
-#
-POFILES= $(SRCS:%.c=%.po)
-POFILE= fwflash_msg.po
-
-CFLAGS += -g -D_POSIX_PTHREAD_SEMANTICS
-MANUFACTURING_MODE=0
-CFLAGS += -DMANUFACTURING_MODE=$(MANUFACTURING_MODE)
-LDLIBS += -ldevinfo -lumem
-
-#
-# Message catalog
-#
-
-$(POFILES): ../common/$(SRCS)
- $(RM) messages.po
- $(XGETTEXT) $(XGETFLAGS) \
- `($(GREP) -l gettext ../common/fwflash.c || echo /dev/null)`
- $(SED) "/^domain/d" messages.po > $@
- $(RM) messages.po
-
-$(POFILE): $(POFILES)
- $(RM) $@
- cat $(POFILES) > $@
-
-
-clean:
- $(RM) $(PROG) $(OBJS)
-
-clobber: clean
- $(RM) $(POFILE) $(POFILES) $(LINTFILE)
-
-install_h:
- @cd ../common ; $(MAKE) install_h
-
-$(PROG): install_h $(OBJS)
- $(LINK.c) -o $(PROG) $(OBJS) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
- $(POST_PROCESS)
-
-%.o: ../common/%.c
- $(COMPILE.c) $(CFLAGS) -o $@ $<
-
-install: all $(ROOTUSRSBIN) $(ROOTUSRSBIN)/$(PROG)
-
-lint_SRCS: ../common/$(SRCS:%.c=%.ln)
-_msg msg: $(POFILE)
+include ../Makefile.targ
diff --git a/usr/src/pkgdefs/SUNWfwflash/prototype_com b/usr/src/pkgdefs/SUNWfwflash/prototype_com
index 9ae0b8b40d..9615ed6ff5 100644
--- a/usr/src/pkgdefs/SUNWfwflash/prototype_com
+++ b/usr/src/pkgdefs/SUNWfwflash/prototype_com
@@ -45,18 +45,18 @@ d none usr/lib 0755 root bin
d none usr/lib/fwflash 0755 root bin
d none usr/lib/fwflash/identify 0755 root bin
d none usr/lib/fwflash/verify 0755 root bin
-f none usr/lib/fwflash/verify/ses-SUN.so 0644 root bin
+f none usr/lib/fwflash/verify/ses-SUN.so 755 root bin
s none usr/lib/fwflash/verify/ses-LSILOGIC.so=ses-SUN.so
s none usr/lib/fwflash/verify/sgen-SUN.so=ses-SUN.so
s none usr/lib/fwflash/verify/sgen-LSILOGIC.so=ses-SUN.so
-f none usr/lib/fwflash/verify/tavor-MELLANOX.so 644 root bin
-f none usr/lib/fwflash/verify/hermon-MELLANOX.so 644 root bin
-f none usr/lib/fwflash/verify/sd-GENERIC.so 644 root bin
-f none usr/lib/fwflash/identify/ses.so 0644 root bin
-s none usr/lib/fwflash/identify/sgen.so=ses.so 644 root bin
-f none usr/lib/fwflash/identify/tavor.so 0644 root bin
-f none usr/lib/fwflash/identify/hermon.so 0644 root bin
-f none usr/lib/fwflash/identify/sd.so 0644 root bin
+f none usr/lib/fwflash/verify/tavor-MELLANOX.so 755 root bin
+f none usr/lib/fwflash/verify/hermon-MELLANOX.so 755 root bin
+f none usr/lib/fwflash/verify/sd-GENERIC.so 755 root bin
+f none usr/lib/fwflash/identify/ses.so 755 root bin
+s none usr/lib/fwflash/identify/sgen.so=ses.so 755 root bin
+f none usr/lib/fwflash/identify/tavor.so 755 root bin
+f none usr/lib/fwflash/identify/hermon.so 755 root bin
+f none usr/lib/fwflash/identify/sd.so 755 root bin
d none usr/include 0755 root bin
d none usr/include/fwflash 0755 root bin
f none usr/include/fwflash/fwflash.h 0644 root bin