From f9d59f973399be2e665f2582e361e499e8c696bd Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 6 Aug 2006 11:03:05 +0000 Subject: [PATCH] Port netperf to -ng git-svn-id: svn://svn.openwrt.org/openwrt/packages@4478 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/6tunnel/Makefile | 50 -------- net/dhcp6/Makefile | 79 ------------ net/dhcp6/patches/01-remove_debug.patch | 118 ------------------ net/dhcp6/patches/02-gcc_lvalue.patch | 11 -- net/mrd6/Makefile | 64 ---------- net/mrd6/files/mrd6.conf | 14 --- net/mrd6/files/mrd6.init | 29 ----- net/mrd6/patches/01-ceilf_replacement.patch | 21 ---- net/netperf/Makefile | 50 ++++++++ net/netperf/files/netserver.init | 3 + .../patches/01-netperf-2.3pl1-openwrt.patch | 39 ++++++ 11 files changed, 92 insertions(+), 386 deletions(-) delete mode 100644 net/6tunnel/Makefile delete mode 100755 net/dhcp6/Makefile delete mode 100644 net/dhcp6/patches/01-remove_debug.patch delete mode 100644 net/dhcp6/patches/02-gcc_lvalue.patch delete mode 100644 net/mrd6/Makefile delete mode 100644 net/mrd6/files/mrd6.conf delete mode 100755 net/mrd6/files/mrd6.init delete mode 100644 net/mrd6/patches/01-ceilf_replacement.patch create mode 100644 net/netperf/Makefile create mode 100644 net/netperf/files/netserver.init create mode 100644 net/netperf/patches/01-netperf-2.3pl1-openwrt.patch diff --git a/net/6tunnel/Makefile b/net/6tunnel/Makefile deleted file mode 100644 index c830c717f..000000000 --- a/net/6tunnel/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# $Id: Makefile 4112 2006-07-02 20:33:21Z nico $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=6tunnel -PKG_VERSION:=0.11rc1 -PKG_RELEASE:=1 -PKG_MD5SUM:=b325fa9d238e32195fbb3fc3646b0d28 - -PKG_SOURCE_URL:=http://toxygen.net/6tunnel/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-0.11 -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(INCLUDE_DIR)/package.mk - -define Package/6tunnel - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpcap - TITLE:=IPv4 / IPv6 tunnel proxy - DESCRIPTION:=IPv4 / IPv6 tunnel proxy - URL:=http://toxygen.net/6tunnel/ -endef - -define Build/Configure -$(call Build/Configure/Default,,ac_cv_path_STRIP=$(STRIP) ac_cv_func_vsnprintf=yes) -endef - -define Build/Compile - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - default -endef - -define Package/6tunnel/install - install -m0755 -d $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,6tunnel)) diff --git a/net/dhcp6/Makefile b/net/dhcp6/Makefile deleted file mode 100755 index a7f16bfb0..000000000 --- a/net/dhcp6/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dhcp6 -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=86193dfa62137db3ea459543db4f1102 -PKG_SOURCE_URL:=@SF/dhcpv6-linux -PKG_SOURCE:=dhcpv6-linux-$(PKG_VERSION).zip -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CAT:=unzip - -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(INCLUDE_DIR)/package.mk - -define Package/dhcp6 - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libncurses - SUBMENU:=IPv6 DHCP server and client - TITLE:=IPv6 DHCP server and client - DESCRIPTION:=IPv6 DHCP server and client - URL:=http://sourceforge.net/projects/dhcpv6-linux -endef - -define Package/dhcp6-server - $(call Package/dhcp6) - DEFAULT:=m if ALL - TITLE:=DHCPv6 server - DESCRIPTION:=DHCPv6 server -endef - -define Package/dhcp6-server/conffiles -/etc/dhcpd6/dhcpd6.conf -/etc/dhcpd6/leases6.conf -/etc/dhcpd6/partial_leases6.conf -endef - -define Package/dhcp6-client - $(call Package/dhcp6) - DEFAULT:=m if ALL - TITLE:=DHCPv6 client - DESCRIPTION:=DHCPv6 client -endef - -define Package/dhcp6-client/conffiles -/etc/dhcp6/solicit.conf -endef - - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/server \ - CC="$(TARGET_CC)" STAGING_DIR=$(STAGING_DIR) - $(MAKE) -C $(PKG_BUILD_DIR)/client \ - CC="$(TARGET_CC)" STAGING_DIR=$(STAGING_DIR) -endef - -define Package/dhcp6-server/install - install -d -m0755 $(1)/usr/sbin $(1)/etc/dhcpd6 - install -m0755 $(PKG_BUILD_DIR)/server/serv $(1)/usr/sbin/dhcpd6 - install -m0755 $(PKG_BUILD_DIR)/server/*.conf $(1)/etc/dhcpd6/ -endef - -define Package/dhcp6-client/install - install -d $(1)/usr/sbin $(1)/etc/dhcp6 - install -m0755 $(PKG_BUILD_DIR)/client/cli $(1)/usr/sbin/dhcp6client - install -m0755 $(PKG_BUILD_DIR)/client/solicit.conf $(1)/etc/dhcp6/ -endef - -$(eval $(call BuildPackage,dhcp6-server)) -$(eval $(call BuildPackage,dhcp6-client)) diff --git a/net/dhcp6/patches/01-remove_debug.patch b/net/dhcp6/patches/01-remove_debug.patch deleted file mode 100644 index d39eeb126..000000000 --- a/net/dhcp6/patches/01-remove_debug.patch +++ /dev/null @@ -1,118 +0,0 @@ -diff -urN orig/dhcp6-1.0/client/Makefile dhcp6-1.0/client/Makefile ---- orig/dhcp6-1.0/client/Makefile 2025-06-28 23:21:40.000000000 +0200 -+++ dhcp6-1.0/client/Makefile 2005-12-13 13:43:11.000000000 +0100 -@@ -1,42 +1,40 @@ -- --CC = gcc - STD_HEADERS = stdhead.h head.h struct.h options_type.h message_type.h states.h timer_val.h constants.h macros.h status_codes.h - OBJECT_FILES = client.o solicit.o clilib.o parse.o request.o decline.o renew.o rebind.o release.o - HEADER_FILES = solicit.h clilib.h parse.h request.h decline.h renew.h rebind.h release.h -- -+IFLAGS = -I$(STAGING_DIR)/usr/include - - dhcpv6_client : dhcpv6_client.c cli -- $(CC) -g3 dhcpv6_client.c -o dhcpv6_client -+ $(CC) $(IFLAGS) dhcpv6_client.c -o dhcpv6_client - - cli : $(OBJECT_FILES) -- $(CC) -g3 $(OBJECT_FILES) -o cli -lncurses -+ $(CC) $(IFLAGS) $(OBJECT_FILES) -o cli -L$(STAGING_DIR)/usr/lib -lncurses - - client.o : client.c $(STD_HEADERS) $(HEADER_FILES) -- $(CC) -g3 -c client.c -o client.o -+ $(CC) $(IFLAGS) -c client.c -o client.o - - release.o : release.c release.h clilib.h -- $(CC) -g3 -c release.c -o release.o -+ $(CC) $(IFLAGS) -c release.c -o release.o - - rebind.o : rebind.c rebind.h clilib.h -- $(CC) -g3 -c rebind.c -o rebind.o -+ $(CC) $(IFLAGS) -c rebind.c -o rebind.o - - renew.o : renew.c renew.h clilib.h -- $(CC) -g3 -c renew.c -o renew.o -+ $(CC) $(IFLAGS) -c renew.c -o renew.o - - request.o : request.c request.h clilib.h -- $(CC) -g3 -c request.c -o request.o -+ $(CC) $(IFLAGS) -c request.c -o request.o - - decline.o : decline.c decline.h clilib.h parse.h solicit.h -- $(CC) -g3 -c decline.c -o decline.o -+ $(CC) $(IFLAGS) -c decline.c -o decline.o - - solicit.o : solicit.c solicit.h clilib.h parse.h -- $(CC) -g3 -c solicit.c -o solicit.o -+ $(CC) $(IFLAGS) -c solicit.c -o solicit.o - - clilib.o : clilib.c clilib.h parse.h -- $(CC) -g3 -c clilib.c -o clilib.o -+ $(CC) $(IFLAGS) -c clilib.c -o clilib.o - - parse.o : parse.c parse.h clilib.h -- $(CC) -g3 -c parse.c -o parse.o -+ $(CC) $(IFLAGS) -c parse.c -o parse.o - - clean : - rm -f *.o cli dhcpv6_client -diff -urN orig/dhcp6-1.0/client/clilib.c dhcp6-1.0/client/clilib.c ---- orig/dhcp6-1.0/client/clilib.c 2025-06-28 23:21:40.000000000 +0200 -+++ dhcp6-1.0/client/clilib.c 2005-12-13 13:42:43.000000000 +0100 -@@ -554,7 +554,7 @@ - - void generate_trans_id (u_int32_t *trans_id) - { -- extern u_int32_t g_trans_id; -+ extern int g_trans_id; - time_t t; - srand (time (&t)); - *trans_id = 0; -@@ -890,9 +890,7 @@ - break; - - default : --#if DEBUG == 3 - printf ("Unrecognized DUID type\n"); --#endif - } - - next_opt = (struct OPTIONS *) malloc (sizeof (struct OPTIONS)); -diff -urN orig/dhcp6-1.0/server/Makefile dhcp6-1.0/server/Makefile ---- orig/dhcp6-1.0/server/Makefile 2002-06-28 14:50:04.000000000 +0200 -+++ dhcp6-1.0/server/Makefile 2005-12-13 11:35:53.000000000 +0100 -@@ -1,27 +1,26 @@ --CC = gcc - STD_HEADERS = stdhead.h head.h struct.h options_type.h message_type.h macros.h status_codes.h constants.h - OBJECT_FILES = server.o lib.o advertise.o parse.o leases.o reply.o - - serv: $(OBJECT_FILES) -- $(CC) -g3 $(OBJECT_FILES) -o serv -+ $(CC) $(OBJECT_FILES) -o serv - - lib.o: lib.c lib.h $(STD_HEADERS) -- $(CC) -g3 -c lib.c -o lib.o -+ $(CC) -c lib.c -o lib.o - - parse.o: parse.c parse.h $(STD_HEADERS) -- $(CC) -g3 -c parse.c -o parse.o -+ $(CC) -c parse.c -o parse.o - - leases.o: leases.c leases.h $(STD_HEADERS) -- $(CC) -g3 -c leases.c -o leases.o -+ $(CC) -c leases.c -o leases.o - - advertise.o: advertise.c advertise.h $(STD_HEADERS) -- $(CC) -g3 -c advertise.c -o advertise.o -+ $(CC) -c advertise.c -o advertise.o - - reply.o: reply.c reply.h $(STD_HEADERS) -- $(CC) -g3 -c reply.c -o reply.o -+ $(CC) -c reply.c -o reply.o - - server.o: server.c lib.h advertise.h reply.h leases.h parse.h $(STD_HEADERS) -- $(CC) -g3 -c server.c -o server.o -+ $(CC) -c server.c -o server.o - - clean: - rm -f *.o serv diff --git a/net/dhcp6/patches/02-gcc_lvalue.patch b/net/dhcp6/patches/02-gcc_lvalue.patch deleted file mode 100644 index e5deda690..000000000 --- a/net/dhcp6/patches/02-gcc_lvalue.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- dhcp6-1.0/client/solicit.c 2025-06-28 23:21:40.000000000 -0700 -+++ dhcp6-1.0-patched/client/solicit.c 2006-04-27 15:32:52.000000000 -0700 -@@ -18,7 +18,7 @@ - dhcp_message_ptr -> opt = add_client_id_option (interface_details); - - opt_ptr = (struct OPTIONS *) dhcp_message_ptr -> opt; -- (struct OPTIONS *) ((struct DUID *) opt_ptr -> opt_data) -> opt = add_ia_option (interface_details); -+ ((struct DUID *) opt_ptr -> opt_data) -> opt = add_ia_option (interface_details); - return dhcp_message_ptr; - } - diff --git a/net/mrd6/Makefile b/net/mrd6/Makefile deleted file mode 100644 index 20803aff2..000000000 --- a/net/mrd6/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mrd6 -PKG_VERSION:=0.9.5 -PKG_RELEASE:=1 -PKG_MD5SUM:=24a08cf1407000d628a272b08a415dda - -PKG_SOURCE_URL:=http://hng.av.it.pt/mrd6/download/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(INCLUDE_DIR)/package.mk - -define Package/mrd6 - SECTION:=net - CATEGORY:=Network - DEPENDS:=+uclibcxx - TITLE:=IPv6 multicast routing daemon - DESCRIPTION:=Multicast is becoming a major component in next generation\\\ - networks, used in several scenarios, from video broadcasting\\\ - to multimedia conferencing. In order to be implemented, new\\\ - technology needs supporting hardware and software across a set\\\ - of devices and systems. MRD6 is an implementation of a modular\\\ - IPv6 Multicast Routing Framework for the Linux operating system\\\ - and provides MLDv2 (as well as MLDv1), PIM-SM and MBGP support.\\\ - URL:=http://artemis.av.it.pt/mrd6/ -endef - -define Package/mrd6/conffiles -/etc/mrd6.conf -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - OPTIMIZE=yes \ - SPACE_OPTIMIZE=yes \ - FULL_STATIC=yes \ - CFLAGS="$(TARGET_CFLAGS) -DNO_INET6_OPTION" \ - CXX=$(TARGET_CROSS)g++ \ - CC=$(TARGET_CC) \ - STAGING_DIR=$(STAGING_DIR) \ - DESTDIR=$(PKG_INSTALL_DIR) \ - PREFIX=/usr/ \ - install -endef - -define Package/mrd6/install - install -d -m0755 $(1)/etc/init.d - install -m0644 files/mrd6.conf $(1)/etc - install -m0755 files/mrd6.init $(1)/etc/init.d/S60mrd6 -endef - -$(eval $(call BuildPackage,mrd6)) diff --git a/net/mrd6/files/mrd6.conf b/net/mrd6/files/mrd6.conf deleted file mode 100644 index 84ce923a3..000000000 --- a/net/mrd6/files/mrd6.conf +++ /dev/null @@ -1,14 +0,0 @@ -log { - attach stderr normal; - attach default "/var/log/mrd6.log" message_err; -} - -interfaces br0 enable = false; // Should be vlan0 + eth1 but Linux bridge seems broken for multicast -interfaces eth0 enable = false; // Interface to internal bridge -handle-proper-bridge = true; // use ETH_P_ALL to see all packets on wrt54g - -// The default configured RP is m6bone's Renater RP. -// Change this according to your setup - -groups ff00::/8 pim rp = 2001:660:3007:300:1::; - diff --git a/net/mrd6/files/mrd6.init b/net/mrd6/files/mrd6.init deleted file mode 100755 index 886723f15..000000000 --- a/net/mrd6/files/mrd6.init +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -case $1 in -start) - /sbin/lsmod | grep ipv6 > /dev/null - if [ "$?" != "0" ] - then - echo -n "IPv6 stack required by mrd6. Loading ipv6 module: " - /sbin/insmod ipv6 - echo "Done." - fi - echo -n "Starting IPv6 multicast router (mrd6): " - /usr/sbin/mrd6 -f /etc/mrd6.conf -D - echo "Done." - ;; -stop) - echo -n "Stopping IPv6 multicast router (mrd6): " - killall mrd6 - echo "Done." - ;; -restart) - $0 stop - $0 start - ;; -*) - echo "Usage: $0 {start | stop | restart}" - ;; -esac -exit 0 diff --git a/net/mrd6/patches/01-ceilf_replacement.patch b/net/mrd6/patches/01-ceilf_replacement.patch deleted file mode 100644 index 1b4ac6213..000000000 --- a/net/mrd6/patches/01-ceilf_replacement.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -urN mrd6-0.9.5/src/Makefile mrd6-0.9.5.new/src/Makefile ---- mrd6-0.9.5/src/Makefile 2005-12-18 19:15:04.000000000 +0100 -+++ mrd6-0.9.5.new/src/Makefile 2006-02-11 18:30:44.000000000 +0100 -@@ -43,7 +43,7 @@ - CFLAGS += -DNO_INET6_OPTION - endif - --DEST_PREFIX = $(DESTDIR)$(PREFIX) -+DEST_PREFIX = $(DESTDIR)/$(PREFIX) - - ifeq ($(OPTIMIZE),yes) - ifeq ($(SPACE_OPTIMIZE),yes) -@@ -97,7 +97,7 @@ - endif - endif - --LDFLAGS += -lm -+LDFLAGS += -lm -lnotimpl -L$(STAGING_DIR)/usr/lib - ifeq ($(PLATFORM),OS_LINUX) - LDFLAGS += -ldl - endif diff --git a/net/netperf/Makefile b/net/netperf/Makefile new file mode 100644 index 000000000..2f623f1b7 --- /dev/null +++ b/net/netperf/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=netperf +PKG_VERSION:=2.3pl1 +PKG_RELEASE:=1 +PKG_MD5SUM:=b74314d78af31cb13516fb9a372d2e86 + +PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/archive/ \ + ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/netperf + SECTION:=net + CATEGORY:=Network + TITLE:=network performance measurement tool + DESCRIPTION:=Program and service to do network performance measurement. + URL:=http://www.netperf.org +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + TARGET_NETPERF_HOME="/etc/netperf.conf" \ + TARGET_CC=$(TARGET_CROSS)gcc \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_LIBS="" \ + all +endef + +define Package/netperf/install + install -d -m0755 $(1)/etc/init.d + install -m0755 ./files/netserver.init $(1)/etc/init.d/S51netserver + install -d -m0755 $(1)/usr/bin + install -m0755 $(PKG_BUILD_DIR)/netperf $(1)/usr/bin/ + install -m0755 $(PKG_BUILD_DIR)/netserver $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,netperf)) diff --git a/net/netperf/files/netserver.init b/net/netperf/files/netserver.init new file mode 100644 index 000000000..2900b570a --- /dev/null +++ b/net/netperf/files/netserver.init @@ -0,0 +1,3 @@ +#!/bin/sh +test -n "$FAILSAFE" && exit +/usr/bin/netserver diff --git a/net/netperf/patches/01-netperf-2.3pl1-openwrt.patch b/net/netperf/patches/01-netperf-2.3pl1-openwrt.patch new file mode 100644 index 000000000..b83ca1167 --- /dev/null +++ b/net/netperf/patches/01-netperf-2.3pl1-openwrt.patch @@ -0,0 +1,39 @@ +--- netperf-2.3pl1.orig/makefile 2004-09-21 23:33:40.000000000 +0200 ++++ netperf-2.3pl1/makefile 2005-12-30 15:35:08.924238576 +0100 +@@ -15,8 +15,7 @@ + # for the rest of the world, it is probably better to put the binaries + # in /usr/local/netperf or /opt/netperf + # +-#NETPERF_HOME = /usr/local/netperf +-NETPERF_HOME = /opt/netperf ++NETPERF_HOME = $(TARGET_NETPERF_HOME) + + # The compiler on your system might be somewhere else, and/or have + # a different name. +@@ -40,7 +39,7 @@ + # You may safely ignore that warning. + # + +-CC = cc ++CC = $(TARGET_CC) + + # Adding flags to CFLAGS enables some non-mainline features. For + # more information, please consult the source code. +@@ -113,7 +112,7 @@ + # netserver via the netperf command line with -T + + LOG_FILE=DEBUG_LOG_FILE="\"/tmp/netperf.debug\"" +-CFLAGS = -O -D$(LOG_FILE) -DNEED_MAKEFILE_EDIT ++CFLAGS = -D$(LOG_FILE) $(TARGET_CFLAGS) + + # Some platforms, and some options, require additional libraries. + # you can add to the "LIBS =" line to accomplish this. if you find +@@ -136,7 +135,7 @@ + # -lresolv - required for -DDO_DNS on RedHat 7.1 + # -lsocket -lbind - required for Zeta OS + +-LIBS= -lm ++LIBS= -lm $(TARGET_LIBS) + + # --------------------------------------------------------------- + # it should not be the case that anything below this line needs to