aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2017-03-03 03:11:58 +0000
committerNavdeep Parhar <np@FreeBSD.org>2017-03-03 03:11:58 +0000
commit54912308c8cf41f59bc0cc29d107975896bdc7dd (patch)
tree72a0437b09761d429b487b1a480e3a9b98ef62d2
parent401032c67d5b3bfd8b710cd0909190399604ce20 (diff)
downloadsrc-54912308c8cf41f59bc0cc29d107975896bdc7dd.tar.gz
src-54912308c8cf41f59bc0cc29d107975896bdc7dd.zip
Add cxgbetool(8) to the base system.
Move cxgbetool from tools/tools to usr.sbin. Compile and install it on platforms where cxgbe(4) is built by default. Knobs (WITH_CXGBETOOL and WITHOUT_CXGBETOOL) have been added so that the user can override the default setting. Reviewed by: ngie@, gnn@, bdrewery@ MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D9854
Notes
Notes: svn path=/head/; revision=314579
-rw-r--r--share/mk/src.opts.mk7
-rw-r--r--targets/pseudo/userland/Makefile.depend4
-rw-r--r--tools/build/options/WITHOUT_CXGBETOOL3
-rw-r--r--tools/build/options/WITH_CXGBETOOL3
-rw-r--r--tools/tools/cxgbetool/Makefile9
-rw-r--r--usr.sbin/Makefile1
-rw-r--r--usr.sbin/cxgbetool/Makefile8
-rw-r--r--usr.sbin/cxgbetool/Makefile.depend19
-rw-r--r--usr.sbin/cxgbetool/cxgbetool.8 (renamed from tools/tools/cxgbetool/cxgbetool.8)0
-rw-r--r--usr.sbin/cxgbetool/cxgbetool.c (renamed from tools/tools/cxgbetool/cxgbetool.c)0
-rw-r--r--usr.sbin/cxgbetool/reg_defs_t4.c (renamed from tools/tools/cxgbetool/reg_defs_t4.c)0
-rw-r--r--usr.sbin/cxgbetool/reg_defs_t4vf.c (renamed from tools/tools/cxgbetool/reg_defs_t4vf.c)0
-rw-r--r--usr.sbin/cxgbetool/reg_defs_t5.c (renamed from tools/tools/cxgbetool/reg_defs_t5.c)0
-rw-r--r--usr.sbin/cxgbetool/reg_defs_t6.c (renamed from tools/tools/cxgbetool/reg_defs_t6.c)0
14 files changed, 45 insertions, 9 deletions
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index ec4bf66fc9e3..23065688d999 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -275,6 +275,13 @@ BROKEN_OPTIONS+=SSP
BROKEN_OPTIONS+=EFI
.endif
+.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \
+ ${__T} == "powerpc64" || ${__T} == "sparc64"
+__DEFAULT_YES_OPTIONS+=CXGBETOOL
+.else
+__DEFAULT_NO_OPTIONS+=CXGBETOOL
+.endif
+
.include <bsd.mkopt.mk>
#
diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend
index 1201a233c36d..43fe71d61984 100644
--- a/targets/pseudo/userland/Makefile.depend
+++ b/targets/pseudo/userland/Makefile.depend
@@ -895,6 +895,10 @@ DIRDEPS+= \
usr.sbin/blacklistd
.endif
+.if ${MK_CXGBETOOL} != "no"
+DIRDEPS+= usr.sbin/cxgbetool
+.endif
+
.if ${MK_GPL_DTC} != "yes"
DIRDEPS+= usr.bin/dtc
.endif
diff --git a/tools/build/options/WITHOUT_CXGBETOOL b/tools/build/options/WITHOUT_CXGBETOOL
new file mode 100644
index 000000000000..d7aef386344b
--- /dev/null
+++ b/tools/build/options/WITHOUT_CXGBETOOL
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build
+.Xr cxgbetool 8
diff --git a/tools/build/options/WITH_CXGBETOOL b/tools/build/options/WITH_CXGBETOOL
new file mode 100644
index 000000000000..b9c26a09c2e5
--- /dev/null
+++ b/tools/build/options/WITH_CXGBETOOL
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to build
+.Xr cxgbetool 8
diff --git a/tools/tools/cxgbetool/Makefile b/tools/tools/cxgbetool/Makefile
deleted file mode 100644
index 1430a5a09062..000000000000
--- a/tools/tools/cxgbetool/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= cxgbetool
-SRCS= cxgbetool.c
-MAN= cxgbetool.8
-CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I.
-BINDIR?= /usr/sbin
-
-.include <bsd.prog.mk>
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 9eb92da76f23..ac33d277b73a 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -123,6 +123,7 @@ SUBDIR.${MK_BOOTPARAMD}+= bootparamd
SUBDIR.${MK_BSDINSTALL}+= bsdinstall
SUBDIR.${MK_BSNMP}+= bsnmpd
SUBDIR.${MK_CTM}+= ctm
+SUBDIR.${MK_CXGBETOOL}+= cxgbetool
SUBDIR.${MK_DIALOG}+= bsdconfig
SUBDIR.${MK_EFI}+= efivar
SUBDIR.${MK_FLOPPY}+= fdcontrol
diff --git a/usr.sbin/cxgbetool/Makefile b/usr.sbin/cxgbetool/Makefile
new file mode 100644
index 000000000000..f8291aff0a1b
--- /dev/null
+++ b/usr.sbin/cxgbetool/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+PROG= cxgbetool
+MAN= cxgbetool.8
+CFLAGS+= -I${SRCTOP}/sys/dev/cxgbe -I${SRCTOP}/sys -I.
+WARNS?= 2
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/cxgbetool/Makefile.depend b/usr.sbin/cxgbetool/Makefile.depend
new file mode 100644
index 000000000000..54c1f6f1442e
--- /dev/null
+++ b/usr.sbin/cxgbetool/Makefile.depend
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/tools/tools/cxgbetool/cxgbetool.8 b/usr.sbin/cxgbetool/cxgbetool.8
index bdc4eb7ea75e..bdc4eb7ea75e 100644
--- a/tools/tools/cxgbetool/cxgbetool.8
+++ b/usr.sbin/cxgbetool/cxgbetool.8
diff --git a/tools/tools/cxgbetool/cxgbetool.c b/usr.sbin/cxgbetool/cxgbetool.c
index 71f07dfefc04..71f07dfefc04 100644
--- a/tools/tools/cxgbetool/cxgbetool.c
+++ b/usr.sbin/cxgbetool/cxgbetool.c
diff --git a/tools/tools/cxgbetool/reg_defs_t4.c b/usr.sbin/cxgbetool/reg_defs_t4.c
index 5207073b2498..5207073b2498 100644
--- a/tools/tools/cxgbetool/reg_defs_t4.c
+++ b/usr.sbin/cxgbetool/reg_defs_t4.c
diff --git a/tools/tools/cxgbetool/reg_defs_t4vf.c b/usr.sbin/cxgbetool/reg_defs_t4vf.c
index 34909036d42b..34909036d42b 100644
--- a/tools/tools/cxgbetool/reg_defs_t4vf.c
+++ b/usr.sbin/cxgbetool/reg_defs_t4vf.c
diff --git a/tools/tools/cxgbetool/reg_defs_t5.c b/usr.sbin/cxgbetool/reg_defs_t5.c
index ff84f00f297a..ff84f00f297a 100644
--- a/tools/tools/cxgbetool/reg_defs_t5.c
+++ b/usr.sbin/cxgbetool/reg_defs_t5.c
diff --git a/tools/tools/cxgbetool/reg_defs_t6.c b/usr.sbin/cxgbetool/reg_defs_t6.c
index f8a353b446de..f8a353b446de 100644
--- a/tools/tools/cxgbetool/reg_defs_t6.c
+++ b/usr.sbin/cxgbetool/reg_defs_t6.c